Enable dump-skp-on-shader-compilation in drive (#43022)

This commit is contained in:
liyuqian
2019-10-24 11:04:59 -07:00
committed by Jonah Williams
parent c1d3ca07fe
commit 4f385c8fb7
3 changed files with 120 additions and 9 deletions

View File

@@ -276,6 +276,7 @@ Future<LaunchResult> _startApp(DriveCommand command) async {
observatoryPort: command.observatoryPort,
verboseSystemLogs: command.verboseSystemLogs,
cacheSkSL: command.cacheSkSL,
dumpSkpOnShaderCompilation: command.dumpSkpOnShaderCompilation,
),
platformArgs: platformArgs,
prebuiltApplication: !command.shouldBuild,

View File

@@ -43,7 +43,15 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
)
..addFlag('cache-sksl',
negatable: false,
help: 'Only cache the shader in SkSL instead of binary or GLSL.',)
help: 'Only cache the shader in SkSL instead of binary or GLSL.',
)
..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. ',
)
..addOption('route',
help: 'Which route to load when running the app.',
)
@@ -63,6 +71,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
bool get traceStartup => argResults['trace-startup'];
bool get cacheSkSL => argResults['cache-sksl'];
bool get dumpSkpOnShaderCompilation => argResults['dump-skp-on-shader-compilation'];
String get route => argResults['route'];
}
@@ -98,13 +107,6 @@ 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"), '
@@ -309,7 +311,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'],
dumpSkpOnShaderCompilation: dumpSkpOnShaderCompilation,
cacheSkSL: cacheSkSL,
observatoryPort: observatoryPort,
verboseSystemLogs: argResults['verbose-system-logs'],