Commit ba36008a authored by Carlo Bernaschina's avatar Carlo Bernaschina Committed by GitHub

Add --trace-skia parameter to flutter run (#12070)

* Add --trace-skia parameter to flutter run

Skia tracing is extremely useful for internal debug, but reduces the
amount of space available in the Dart Timeline buffers.
Disable skia tracing by default and expose them via the --trace-skia
flag.

* Roll Engine to 57a1445a45964d386500c39f5e8d06db060abadb
parent 44ded0fe
31d03de019794a4b0e3c98c04cf7be501fb962fb
57a1445a45964d386500c39f5e8d06db060abadb
......@@ -404,6 +404,8 @@ class AndroidDevice extends Device {
cmd.addAll(<String>['--es', 'route', route]);
if (debuggingOptions.enableSoftwareRendering)
cmd.addAll(<String>['--ez', 'enable-software-rendering', 'true']);
if (debuggingOptions.traceSkia)
cmd.addAll(<String>['--ez', 'trace-skia', 'true']);
if (debuggingOptions.debuggingEnabled) {
if (debuggingOptions.buildInfo.isDebug)
cmd.addAll(<String>['--ez', 'enable-checked-mode', 'true']);
......
......@@ -96,6 +96,11 @@ class RunCommand extends RunCommandBase {
'when testing Flutter on emulators. By default, Flutter will\n'
'attempt to either use OpenGL or Vulkan and fall back to software\n'
'when neither is available.');
argParser.addFlag('trace-skia',
defaultsTo: false,
negatable: false,
help: 'Enable tracing of Skia code. This is useful when debugging\n'
'the GPU thread. By default, Flutter will not log skia code.');
argParser.addFlag('use-test-fonts',
negatable: true,
defaultsTo: false,
......@@ -237,6 +242,7 @@ class RunCommand extends RunCommandBase {
startPaused: argResults['start-paused'],
useTestFonts: argResults['use-test-fonts'],
enableSoftwareRendering: argResults['enable-software-rendering'],
traceSkia: argResults['trace-skia'],
observatoryPort: observatoryPort,
diagnosticPort: diagnosticPort,
);
......
......@@ -317,6 +317,7 @@ class DebuggingOptions {
DebuggingOptions.enabled(this.buildInfo, {
this.startPaused: false,
this.enableSoftwareRendering: false,
this.traceSkia: false,
this.useTestFonts: false,
this.observatoryPort,
this.diagnosticPort
......@@ -327,6 +328,7 @@ class DebuggingOptions {
useTestFonts = false,
startPaused = false,
enableSoftwareRendering = false,
traceSkia = false,
observatoryPort = null,
diagnosticPort = null;
......@@ -335,6 +337,7 @@ class DebuggingOptions {
final BuildInfo buildInfo;
final bool startPaused;
final bool enableSoftwareRendering;
final bool traceSkia;
final bool useTestFonts;
final int observatoryPort;
final int diagnosticPort;
......
......@@ -214,6 +214,9 @@ class IOSDevice extends Device {
if (debuggingOptions.enableSoftwareRendering)
launchArguments.add('--enable-software-rendering');
if (debuggingOptions.traceSkia)
launchArguments.add('--trace-skia');
if (platformArgs['trace-startup'] ?? false)
launchArguments.add('--trace-startup');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment