diff options
| author | 2018-07-02 14:21:24 +0000 | |
|---|---|---|
| committer | 2018-07-02 14:21:24 +0000 | |
| commit | aefe326db03a13c5660c061658b1b4fece2aa00a (patch) | |
| tree | 2017f8852be6a56da1267e980f70e4043a92f9fe /libs | |
| parent | 817c832eb4d1e1248d6b5a86eb2e5492efe6b89c (diff) | |
| parent | 02daab6ff28f6a09098c226c30472307686dfb30 (diff) | |
Merge "Add a debug property to enable Skia systrace"
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/hwui/Properties.cpp | 4 | ||||
| -rw-r--r-- | libs/hwui/Properties.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index d284269986d6..0338a3aba97d 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -17,6 +17,7 @@ #include "Properties.h" #include "Debug.h" #include "DeviceInfo.h" +#include "SkTraceEventCommon.h" #include <algorithm> #include <cstdlib> @@ -140,6 +141,9 @@ bool Properties::load() { skpCaptureEnabled = debuggingEnabled && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false); + SkAndroidFrameworkTraceUtil::setEnableTracing( + property_get_bool(PROPERTY_SKIA_ATRACE_ENABLED, false)); + runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false); return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw) || diff --git a/libs/hwui/Properties.h b/libs/hwui/Properties.h index 657f9aa5466e..d640c749d829 100644 --- a/libs/hwui/Properties.h +++ b/libs/hwui/Properties.h @@ -171,6 +171,11 @@ enum DebugLevel { #define PROPERTY_CAPTURE_SKP_ENABLED "debug.hwui.capture_skp_enabled" /** + * Allows to record Skia drawing commands with systrace. + */ +#define PROPERTY_SKIA_ATRACE_ENABLED "debug.hwui.skia_atrace_enabled" + +/** * Defines how many frames in a sequence to capture. */ #define PROPERTY_CAPTURE_SKP_FRAMES "debug.hwui.capture_skp_frames" |