Unverified Commit 21c514fc authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Wire up support for --skia-deterministic-rendering (#14802)

https://github.com/flutter/flutter/issues/14519
parent 50b7fad6
585610456326bc455ffeb257f6d33d476b4ee3fc
ead227f118077d1f2b57842a32abaf105b573b8a
......@@ -420,6 +420,8 @@ class AndroidDevice extends Device {
cmd.addAll(<String>['--es', 'route', route]);
if (debuggingOptions.enableSoftwareRendering)
cmd.addAll(<String>['--ez', 'enable-software-rendering', 'true']);
if (debuggingOptions.skiaDeterministicRendering)
cmd.addAll(<String>['--ez', 'skia-deterministic-rendering', 'true']);
if (debuggingOptions.traceSkia)
cmd.addAll(<String>['--ez', 'trace-skia', 'true']);
if (debuggingOptions.debuggingEnabled) {
......
......@@ -90,6 +90,10 @@ 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('skia-deterministic-rendering',
negatable: false,
help: 'When combined with --enable-software-rendering, provides 100%\n'
'deterministic Skia rendering.');
argParser.addFlag('trace-skia',
negatable: false,
help: 'Enable tracing of Skia code. This is useful when debugging\n'
......@@ -229,6 +233,7 @@ class RunCommand extends RunCommandBase {
startPaused: argResults['start-paused'],
useTestFonts: argResults['use-test-fonts'],
enableSoftwareRendering: argResults['enable-software-rendering'],
skiaDeterministicRendering: argResults['skia-deterministic-rendering'],
traceSkia: argResults['trace-skia'],
observatoryPort: observatoryPort,
);
......
......@@ -320,6 +320,7 @@ class DebuggingOptions {
DebuggingOptions.enabled(this.buildInfo, {
this.startPaused: false,
this.enableSoftwareRendering: false,
this.skiaDeterministicRendering: false,
this.traceSkia: false,
this.useTestFonts: false,
this.observatoryPort,
......@@ -330,6 +331,7 @@ class DebuggingOptions {
useTestFonts = false,
startPaused = false,
enableSoftwareRendering = false,
skiaDeterministicRendering = false,
traceSkia = false,
observatoryPort = null;
......@@ -338,6 +340,7 @@ class DebuggingOptions {
final BuildInfo buildInfo;
final bool startPaused;
final bool enableSoftwareRendering;
final bool skiaDeterministicRendering;
final bool traceSkia;
final bool useTestFonts;
final int observatoryPort;
......
......@@ -210,6 +210,9 @@ class IOSDevice extends Device {
if (debuggingOptions.enableSoftwareRendering)
launchArguments.add('--enable-software-rendering');
if (debuggingOptions.skiaDeterministicRendering)
launchArguments.add('--skia-deterministic-rendering');
if (debuggingOptions.traceSkia)
launchArguments.add('--trace-skia');
......
......@@ -332,6 +332,8 @@ class IOSSimulator extends Device {
args.add('--enable-checked-mode');
if (debuggingOptions.startPaused)
args.add('--start-paused');
if (debuggingOptions.skiaDeterministicRendering)
args.add('--skia-deterministic-rendering');
if (debuggingOptions.useTestFonts)
args.add('--use-test-fonts');
......
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