diff options
author | Siva Velusamy <vsiva@google.com> | 2012-03-09 16:24:04 -0800 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-03-12 12:18:53 -0700 |
commit | 92a8b22e7410e74e1cba1b856333116652af8a5c (patch) | |
tree | fd340b33bdcf7d2b5f84d9f9454a5805efff54b6 /core/java/android/app/ActivityThread.java | |
parent | 64d10a1da0a702ffeb086ad9c4a632f2712f1dad (diff) | |
download | frameworks_base-92a8b22e7410e74e1cba1b856333116652af8a5c.zip frameworks_base-92a8b22e7410e74e1cba1b856333116652af8a5c.tar.gz frameworks_base-92a8b22e7410e74e1cba1b856333116652af8a5c.tar.bz2 |
ActivityManager: add option to allow OpenGL trace.
This patch adds an option to enable tracing of OpenGL functions.
OpenGL tracing can be enabled by passing "--opengl-trace" option
to am start. This option requires either a device in debug mode,
or that the application itself has debug permission set.
Change-Id: I77788bfe97c9108943b1f947ce81afe8293d78a0
Diffstat (limited to 'core/java/android/app/ActivityThread.java')
-rw-r--r-- | core/java/android/app/ActivityThread.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index aa15f39..2610d87 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -376,6 +376,7 @@ public final class ActivityThread { Bundle instrumentationArgs; IInstrumentationWatcher instrumentationWatcher; int debugMode; + boolean enableOpenGlTrace; boolean restrictedBackupMode; boolean persistent; Configuration config; @@ -676,8 +677,8 @@ public final class ActivityThread { ComponentName instrumentationName, String profileFile, ParcelFileDescriptor profileFd, boolean autoStopProfiler, Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher, - int debugMode, boolean isRestrictedBackupMode, boolean persistent, - Configuration config, CompatibilityInfo compatInfo, + int debugMode, boolean enableOpenGlTrace, boolean isRestrictedBackupMode, + boolean persistent, Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings) { if (services != null) { @@ -695,6 +696,7 @@ public final class ActivityThread { data.instrumentationArgs = instrumentationArgs; data.instrumentationWatcher = instrumentationWatcher; data.debugMode = debugMode; + data.enableOpenGlTrace = enableOpenGlTrace; data.restrictedBackupMode = isRestrictedBackupMode; data.persistent = persistent; data.config = config; @@ -3912,6 +3914,11 @@ public final class ActivityThread { } } + // Enable OpenGL tracing if required + if (data.enableOpenGlTrace) { + GLUtils.enableTracing(); + } + /** * Initialize the default http proxy in this process for the reasons we set the time zone. */ |