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
f6c2b10e
Unverified
Commit
f6c2b10e
authored
Mar 31, 2023
by
Chinmay Garde
Committed by
GitHub
Mar 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Impeller] Plumb through the impeller-force-gl flag. (#123828)
[Impeller] Plumb through the impeller-force-gl flag.
parent
d940f60b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+2
-0
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+4
-0
device.dart
packages/flutter_tools/lib/src/device.dart
+6
-0
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+10
-0
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
f6c2b10e
...
...
@@ -662,6 +662,8 @@ class AndroidDevice extends Device {
...<
String
>[
'--ez'
,
'enable-impeller'
,
'false'
],
if
(
debuggingOptions
.
enableVulkanValidation
)
...<
String
>[
'--ez'
,
'enable-vulkan-validation'
,
'true'
],
if
(
debuggingOptions
.
impellerForceGL
)
...<
String
>[
'--ez'
,
'impeller-force-gl'
,
'true'
],
if
(
debuggingOptions
.
debuggingEnabled
)
...<
String
>[
if
(
debuggingOptions
.
buildInfo
.
isDebug
)
...<
String
>[
...<
String
>[
'--ez'
,
'enable-checked-mode'
,
'true'
],
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
f6c2b10e
...
...
@@ -184,6 +184,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
usesFatalWarningsOption
(
verboseHelp:
verboseHelp
);
addEnableImpellerFlag
(
verboseHelp:
verboseHelp
);
addEnableVulkanValidationFlag
(
verboseHelp:
verboseHelp
);
addImpellerForceGLFlag
(
verboseHelp:
verboseHelp
);
addEnableEmbedderApiFlag
(
verboseHelp:
verboseHelp
);
}
...
...
@@ -198,6 +199,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
bool
get
trackWidgetCreation
=>
boolArg
(
'track-widget-creation'
);
ImpellerStatus
get
enableImpeller
=>
ImpellerStatus
.
fromBool
(
argResults
![
'enable-impeller'
]
as
bool
?);
bool
get
enableVulkanValidation
=>
boolArg
(
'enable-vulkan-validation'
);
bool
get
impellerForceGL
=>
boolArg
(
'impeller-force-gl'
);
bool
get
uninstallFirst
=>
boolArg
(
'uninstall-first'
);
bool
get
enableEmbedderApi
=>
boolArg
(
'enable-embedder-api'
);
...
...
@@ -240,6 +242,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
webBrowserFlags:
webBrowserFlags
,
enableImpeller:
enableImpeller
,
enableVulkanValidation:
enableVulkanValidation
,
impellerForceGL:
impellerForceGL
,
uninstallFirst:
uninstallFirst
,
enableDartProfiling:
enableDartProfiling
,
enableEmbedderApi:
enableEmbedderApi
,
...
...
@@ -289,6 +292,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
nativeNullAssertions:
boolArg
(
'native-null-assertions'
),
enableImpeller:
enableImpeller
,
enableVulkanValidation:
enableVulkanValidation
,
impellerForceGL:
impellerForceGL
,
uninstallFirst:
uninstallFirst
,
serveObservatory:
boolArg
(
'serve-observatory'
),
enableDartProfiling:
enableDartProfiling
,
...
...
packages/flutter_tools/lib/src/device.dart
View file @
f6c2b10e
...
...
@@ -966,6 +966,7 @@ class DebuggingOptions {
this
.
nativeNullAssertions
=
false
,
this
.
enableImpeller
=
ImpellerStatus
.
platformDefault
,
this
.
enableVulkanValidation
=
false
,
this
.
impellerForceGL
=
false
,
this
.
uninstallFirst
=
false
,
this
.
serveObservatory
=
false
,
this
.
enableDartProfiling
=
true
,
...
...
@@ -988,6 +989,7 @@ class DebuggingOptions {
this
.
traceAllowlist
,
this
.
enableImpeller
=
ImpellerStatus
.
platformDefault
,
this
.
enableVulkanValidation
=
false
,
this
.
impellerForceGL
=
false
,
this
.
uninstallFirst
=
false
,
this
.
enableDartProfiling
=
true
,
this
.
enableEmbedderApi
=
false
,
...
...
@@ -1062,6 +1064,7 @@ class DebuggingOptions {
required
this
.
nativeNullAssertions
,
required
this
.
enableImpeller
,
required
this
.
enableVulkanValidation
,
required
this
.
impellerForceGL
,
required
this
.
uninstallFirst
,
required
this
.
serveObservatory
,
required
this
.
enableDartProfiling
,
...
...
@@ -1102,6 +1105,7 @@ class DebuggingOptions {
final
bool
webUseSseForInjectedClient
;
final
ImpellerStatus
enableImpeller
;
final
bool
enableVulkanValidation
;
final
bool
impellerForceGL
;
final
bool
serveObservatory
;
final
bool
enableDartProfiling
;
final
bool
enableEmbedderApi
;
...
...
@@ -1235,6 +1239,7 @@ class DebuggingOptions {
'nativeNullAssertions'
:
nativeNullAssertions
,
'enableImpeller'
:
enableImpeller
.
asBool
,
'enableVulkanValidation'
:
enableVulkanValidation
,
'impellerForceGL'
:
impellerForceGL
,
'serveObservatory'
:
serveObservatory
,
'enableDartProfiling'
:
enableDartProfiling
,
'enableEmbedderApi'
:
enableEmbedderApi
,
...
...
@@ -1284,6 +1289,7 @@ class DebuggingOptions {
nativeNullAssertions:
json
[
'nativeNullAssertions'
]!
as
bool
,
enableImpeller:
ImpellerStatus
.
fromBool
(
json
[
'enableImpeller'
]
as
bool
?),
enableVulkanValidation:
(
json
[
'enableVulkanValidation'
]
as
bool
?)
??
false
,
impellerForceGL:
(
json
[
'impellerForceGL'
]
as
bool
?)
??
false
,
uninstallFirst:
(
json
[
'uninstallFirst'
]
as
bool
?)
??
false
,
serveObservatory:
(
json
[
'serveObservatory'
]
as
bool
?)
??
false
,
enableDartProfiling:
(
json
[
'enableDartProfiling'
]
as
bool
?)
??
true
,
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
f6c2b10e
...
...
@@ -1069,6 +1069,16 @@ abstract class FlutterCommand extends Command<void> {
);
}
void
addImpellerForceGLFlag
({
required
bool
verboseHelp
})
{
argParser
.
addFlag
(
'impeller-force-gl'
,
hide:
!
verboseHelp
,
help:
'On platforms that support OpenGL Rendering using Impeller, force '
'rendering using OpenGL over other APIs. If Impeller is not '
'enabled or the platform does not support OpenGL ES, this flag '
'does nothing.'
,
);
}
void
addEnableEmbedderApiFlag
({
required
bool
verboseHelp
})
{
argParser
.
addFlag
(
'enable-embedder-api'
,
hide:
!
verboseHelp
,
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
f6c2b10e
...
...
@@ -1051,6 +1051,7 @@ void main() {
'--native-null-assertions'
,
'--enable-impeller'
,
'--enable-vulkan-validation'
,
'--impeller-force-gl'
,
'--trace-systrace'
,
'--enable-software-rendering'
,
'--skia-deterministic-rendering'
,
...
...
@@ -1070,6 +1071,7 @@ void main() {
expect
(
options
.
traceSystrace
,
true
);
expect
(
options
.
enableImpeller
,
ImpellerStatus
.
enabled
);
expect
(
options
.
enableVulkanValidation
,
true
);
expect
(
options
.
impellerForceGL
,
true
);
expect
(
options
.
enableSoftwareRendering
,
true
);
expect
(
options
.
skiaDeterministicRendering
,
true
);
},
overrides:
<
Type
,
Generator
>{
...
...
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