Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02daab6f authored by Stan Iliev's avatar Stan Iliev
Browse files

Add a debug property to enable Skia systrace

Add a "debug.hwui.skia_atrace_enabled" property that allows to
record a systrace with skia drawing ops. App need to be restarted
after setting the new propety to true.

Test: collected skia trace with systemui
Change-Id: I2d1c5911714bfc911894f633ec2df2f6bb953b48
parent ce774071
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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) ||
+5 −0
Original line number Diff line number Diff line
@@ -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.
 */