Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
208a418a
Unverified
Commit
208a418a
authored
Jun 02, 2022
by
Jenn Magder
Committed by
GitHub
Jun 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flutter drive --enable-software-rendering --skia-deterministic-rendering (#105161)
parent
ff110fb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
15 deletions
+55
-15
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+15
-13
drive_test.dart
...lutter_tools/test/commands.shard/hermetic/drive_test.dart
+19
-1
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+21
-1
No files found.
packages/flutter_tools/lib/src/commands/run.dart
View file @
208a418a
...
...
@@ -133,6 +133,19 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
'this comma separated list of allowed prefixes.'
,
valueHelp:
'skia.gpu,skia.shaders'
,
)
..
addFlag
(
'enable-software-rendering'
,
negatable:
false
,
help:
'Enable rendering using the Skia software backend. '
'This is useful when testing Flutter on emulators. By default, '
'Flutter will attempt to either use OpenGL or Vulkan and fall back '
'to software when neither is available.'
,
)
..
addFlag
(
'skia-deterministic-rendering'
,
negatable:
false
,
help:
'When combined with "--enable-software-rendering", this should provide completely '
'deterministic (i.e. reproducible) Skia rendering. This is useful for testing purposes '
'(e.g. when comparing screenshots).'
,
)
..
addMultiOption
(
'dart-entrypoint-args'
,
abbr:
'a'
,
help:
'Pass a list of arguments to the Dart entrypoint at application '
...
...
@@ -184,6 +197,8 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
String
get
traceAllowlist
=>
stringArgDeprecated
(
'trace-allowlist'
);
/// Create a debugging options instance for the current `run` or `drive` invocation.
@visibleForTesting
@protected
Future
<
DebuggingOptions
>
createDebuggingOptions
(
bool
webMode
)
async
{
final
BuildInfo
buildInfo
=
await
getBuildInfo
();
final
int
browserDebugPort
=
featureFlags
.
isWebEnabled
&&
argResults
.
wasParsed
(
'web-browser-debug-port'
)
...
...
@@ -268,19 +283,6 @@ class RunCommand extends RunCommandBase {
addMultidexOption
();
addIgnoreDeprecationOption
();
argParser
..
addFlag
(
'enable-software-rendering'
,
negatable:
false
,
help:
'Enable rendering using the Skia software backend. '
'This is useful when testing Flutter on emulators. By default, '
'Flutter will attempt to either use OpenGL or Vulkan and fall back '
'to software when neither is available.'
,
)
..
addFlag
(
'skia-deterministic-rendering'
,
negatable:
false
,
help:
'When combined with "--enable-software-rendering", this should provide completely '
'deterministic (i.e. reproducible) Skia rendering. This is useful for testing purposes '
'(e.g. when comparing screenshots).'
,
)
..
addFlag
(
'await-first-frame-when-tracing'
,
defaultsTo:
true
,
help:
'Whether to wait for the first frame when tracing startup ("--trace-startup"), '
...
...
packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart
View file @
208a418a
...
...
@@ -208,7 +208,7 @@ void main() {
Pub:
()
=>
FakePub
(),
});
testUsingContext
(
'
--enable-impeller flag propagates
to debugging options'
,
()
async
{
testUsingContext
(
'
flags propagate
to debugging options'
,
()
async
{
final
DriveCommand
command
=
DriveCommand
(
fileSystem:
fileSystem
,
logger:
logger
,
platform:
platform
);
fileSystem
.
file
(
'lib/main.dart'
).
createSync
(
recursive:
true
);
fileSystem
.
file
(
'test_driver/main_test.dart'
).
createSync
(
recursive:
true
);
...
...
@@ -216,12 +216,30 @@ void main() {
await
expectLater
(()
=>
createTestCommandRunner
(
command
).
run
(<
String
>[
'drive'
,
'--start-paused'
,
'--disable-service-auth-codes'
,
'--trace-skia'
,
'--trace-systrace'
,
'--verbose-system-logs'
,
'--null-assertions'
,
'--native-null-assertions'
,
'--enable-impeller'
,
'--enable-software-rendering'
,
'--skia-deterministic-rendering'
,
]),
throwsToolExit
());
final
DebuggingOptions
options
=
await
command
.
createDebuggingOptions
(
false
);
expect
(
options
.
startPaused
,
true
);
expect
(
options
.
disableServiceAuthCodes
,
true
);
expect
(
options
.
traceSkia
,
true
);
expect
(
options
.
traceSystrace
,
true
);
expect
(
options
.
verboseSystemLogs
,
true
);
expect
(
options
.
nullAssertions
,
true
);
expect
(
options
.
nativeNullAssertions
,
true
);
expect
(
options
.
enableImpeller
,
true
);
expect
(
options
.
enableSoftwareRendering
,
true
);
expect
(
options
.
skiaDeterministicRendering
,
true
);
},
overrides:
<
Type
,
Generator
>{
Cache:
()
=>
Cache
.
test
(
processManager:
FakeProcessManager
.
any
()),
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
208a418a
...
...
@@ -721,16 +721,36 @@ void main() {
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
testUsingContext
(
'
--enable-impeller flag propagates
to debugging options'
,
()
async
{
testUsingContext
(
'
flags propagate
to debugging options'
,
()
async
{
final
RunCommand
command
=
RunCommand
();
await
expectLater
(()
=>
createTestCommandRunner
(
command
).
run
(<
String
>[
'run'
,
'--start-paused'
,
'--disable-service-auth-codes'
,
'--use-test-fonts'
,
'--trace-skia'
,
'--trace-systrace'
,
'--verbose-system-logs'
,
'--null-assertions'
,
'--native-null-assertions'
,
'--enable-impeller'
,
'--enable-software-rendering'
,
'--skia-deterministic-rendering'
,
]),
throwsToolExit
());
final
DebuggingOptions
options
=
await
command
.
createDebuggingOptions
(
false
);
expect
(
options
.
startPaused
,
true
);
expect
(
options
.
disableServiceAuthCodes
,
true
);
expect
(
options
.
useTestFonts
,
true
);
expect
(
options
.
traceSkia
,
true
);
expect
(
options
.
traceSystrace
,
true
);
expect
(
options
.
verboseSystemLogs
,
true
);
expect
(
options
.
nullAssertions
,
true
);
expect
(
options
.
nativeNullAssertions
,
true
);
expect
(
options
.
enableImpeller
,
true
);
expect
(
options
.
enableSoftwareRendering
,
true
);
expect
(
options
.
skiaDeterministicRendering
,
true
);
},
overrides:
<
Type
,
Generator
>{
Cache:
()
=>
Cache
.
test
(
processManager:
FakeProcessManager
.
any
()),
FileSystem:
()
=>
MemoryFileSystem
.
test
(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment