Merge "Add a debug property to enable Skia systrace"

This commit is contained in:
TreeHugger Robot
2018-07-02 14:21:24 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 0 deletions

View File

@@ -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) ||

View File

@@ -170,6 +170,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.
*/