Rename HWUI's Skia tracing sysprop and add new sysprop for Perfetto in Skia

Bug: 259248961
Test: none?
Change-Id: Ieb6cc796e31ae5567206a07ae61391ac91ed488d
This commit is contained in:
Nolan Scobie
2022-12-05 21:12:16 -05:00
parent a98324556a
commit 799b574b2d
2 changed files with 28 additions and 3 deletions

View File

@@ -138,7 +138,9 @@ bool Properties::load() {
skpCaptureEnabled = debuggingEnabled && base::GetBoolProperty(PROPERTY_CAPTURE_SKP_ENABLED, false);
SkAndroidFrameworkTraceUtil::setEnableTracing(
base::GetBoolProperty(PROPERTY_SKIA_ATRACE_ENABLED, false));
base::GetBoolProperty(PROPERTY_SKIA_TRACING_ENABLED, false));
SkAndroidFrameworkTraceUtil::setUsePerfettoTrackEvents(
base::GetBoolProperty(PROPERTY_SKIA_USE_PERFETTO_TRACK_EVENTS, false));
runningInEmulator = base::GetBoolProperty(PROPERTY_IS_EMULATOR, false);

View File

@@ -143,9 +143,32 @@ enum DebugLevel {
#define PROPERTY_CAPTURE_SKP_ENABLED "debug.hwui.capture_skp_enabled"
/**
* Allows to record Skia drawing commands with systrace.
* Allows broad recording of Skia drawing commands.
*
* If disabled, a very minimal set of trace events *may* be recorded.
* If enabled, a much broader set of trace events *may* be recorded.
*
* In either case, trace events are only recorded if an appropriately configured tracing session is
* active.
*
* Use debug.hwui.skia_use_perfetto_track_events to determine if ATrace (default) or Perfetto is
* used as the tracing backend.
*/
#define PROPERTY_SKIA_ATRACE_ENABLED "debug.hwui.skia_atrace_enabled"
#define PROPERTY_SKIA_TRACING_ENABLED "debug.hwui.skia_tracing_enabled"
/**
* Switches Skia's tracing to use Perfetto's Track Event system instead of ATrace.
*
* If disabled, ATrace will be used by default, which will record trace events from any of Skia's
* tracing categories if overall system tracing is active and the "gfx" and "view" ATrace categories
* are enabled.
*
* If enabled, then Perfetto's Track Event system will be used instead, which will only record if an
* active Perfetto tracing session is targeting the correct apps and Skia tracing categories with
* the Track Event data source enabled. This approach may be used to selectively filter out
* undesired Skia tracing categories, and events will contain more data fields.
*/
#define PROPERTY_SKIA_USE_PERFETTO_TRACK_EVENTS "debug.hwui.skia_use_perfetto_track_events"
/**
* Defines how many frames in a sequence to capture.