Add dump-shader-skp flag to flutter tools (#29258)
This is the accompanying change for https://github.com/flutter/engine/pull/8148 and it needs the engine PR to land first. For https://github.com/flutter/flutter/issues/813
This commit is contained in:
@@ -430,6 +430,8 @@ class AndroidDevice extends Device {
|
||||
cmd.addAll(<String>['--ez', 'trace-skia', 'true']);
|
||||
if (debuggingOptions.traceSystrace)
|
||||
cmd.addAll(<String>['--ez', 'trace-systrace', 'true']);
|
||||
if (debuggingOptions.dumpSkpOnShaderCompilation)
|
||||
cmd.addAll(<String>['--ez', 'dump-skp-on-shader-compilation', 'true']);
|
||||
if (debuggingOptions.debuggingEnabled) {
|
||||
if (debuggingOptions.buildInfo.isDebug) {
|
||||
cmd.addAll(<String>['--ez', 'enable-checked-mode', 'true']);
|
||||
|
||||
@@ -99,6 +99,13 @@ class RunCommand extends RunCommandBase {
|
||||
help: 'Enable tracing to the system tracer. This is only useful on '
|
||||
'platforms where such a tracer is available (Android and Fuchsia).',
|
||||
)
|
||||
..addFlag('dump-skp-on-shader-compilation',
|
||||
negatable: false,
|
||||
help: 'Automatically dump the skp that triggers new shader compilations. '
|
||||
'This is useful for wrting custom ShaderWarmUp to reduce jank. '
|
||||
'By default, this is not enabled to reduce the overhead. '
|
||||
'This is only available in profile or debug build. ',
|
||||
)
|
||||
..addFlag('await-first-frame-when-tracing',
|
||||
defaultsTo: true,
|
||||
help: 'Whether to wait for the first frame when tracing startup ("--trace-startup"), '
|
||||
@@ -259,6 +266,7 @@ class RunCommand extends RunCommandBase {
|
||||
skiaDeterministicRendering: argResults['skia-deterministic-rendering'],
|
||||
traceSkia: argResults['trace-skia'],
|
||||
traceSystrace: argResults['trace-systrace'],
|
||||
dumpSkpOnShaderCompilation: argResults['dump-skp-on-shader-compilation'],
|
||||
observatoryPort: observatoryPort,
|
||||
verboseSystemLogs: argResults['verbose-system-logs'],
|
||||
);
|
||||
|
||||
@@ -371,6 +371,7 @@ class DebuggingOptions {
|
||||
this.skiaDeterministicRendering = false,
|
||||
this.traceSkia = false,
|
||||
this.traceSystrace = false,
|
||||
this.dumpSkpOnShaderCompilation = false,
|
||||
this.useTestFonts = false,
|
||||
this.verboseSystemLogs = false,
|
||||
this.observatoryPort,
|
||||
@@ -384,6 +385,7 @@ class DebuggingOptions {
|
||||
skiaDeterministicRendering = false,
|
||||
traceSkia = false,
|
||||
traceSystrace = false,
|
||||
dumpSkpOnShaderCompilation = false,
|
||||
verboseSystemLogs = false,
|
||||
observatoryPort = null;
|
||||
|
||||
@@ -395,6 +397,7 @@ class DebuggingOptions {
|
||||
final bool skiaDeterministicRendering;
|
||||
final bool traceSkia;
|
||||
final bool traceSystrace;
|
||||
final bool dumpSkpOnShaderCompilation;
|
||||
final bool useTestFonts;
|
||||
final bool verboseSystemLogs;
|
||||
final int observatoryPort;
|
||||
|
||||
@@ -297,6 +297,9 @@ class IOSDevice extends Device {
|
||||
if (debuggingOptions.traceSkia)
|
||||
launchArguments.add('--trace-skia');
|
||||
|
||||
if (debuggingOptions.dumpSkpOnShaderCompilation)
|
||||
launchArguments.add('--dump-skp-on-shader-compilation');
|
||||
|
||||
if (debuggingOptions.verboseSystemLogs) {
|
||||
launchArguments.add('--verbose-logging');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user