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
8d150833
Unverified
Commit
8d150833
authored
Feb 15, 2023
by
Jason Simmons
Committed by
GitHub
Feb 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the impellerc GLES output flag when compiling shaders for Android (#120647)
parent
99dcaa2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
android.dart
...s/flutter_tools/lib/src/build_system/targets/android.dart
+1
-1
android_test.dart
...test/general.shard/build_system/targets/android_test.dart
+55
-0
No files found.
packages/flutter_tools/lib/src/build_system/targets/android.dart
View file @
8d150833
...
...
@@ -67,7 +67,7 @@ abstract class AndroidAssetBundle extends Target {
outputDirectory
,
targetPlatform:
TargetPlatform
.
android
,
buildMode:
buildMode
,
shaderTarget:
ShaderTarget
.
sksl
,
shaderTarget:
ShaderTarget
.
impellerAndroid
,
);
final
DepfileService
depfileService
=
DepfileService
(
fileSystem:
environment
.
fileSystem
,
...
...
packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart
View file @
8d150833
...
...
@@ -501,4 +501,59 @@ void main() {
expect
(
depfile
.
outputs
[
2
].
path
,
'/out/abi1/app.so-4.part.so'
);
});
testUsingContext
(
'DebugAndroidApplication with impeller and shader compilation'
,
()
async
{
// Create impellerc to work around fallback detection logic.
fileSystem
.
file
(
artifacts
.
getHostArtifact
(
HostArtifact
.
impellerc
)).
createSync
(
recursive:
true
);
final
Environment
environment
=
Environment
.
test
(
fileSystem
.
currentDirectory
,
outputDir:
fileSystem
.
directory
(
'out'
)..
createSync
(),
defines:
<
String
,
String
>{
kBuildMode:
'debug'
,
},
processManager:
processManager
,
artifacts:
artifacts
,
fileSystem:
fileSystem
,
logger:
logger
,
);
environment
.
buildDir
.
createSync
(
recursive:
true
);
// create pre-requisites.
environment
.
buildDir
.
childFile
(
'app.dill'
)
.
writeAsStringSync
(
'abcd'
);
fileSystem
.
file
(
artifacts
.
getArtifactPath
(
Artifact
.
vmSnapshotData
,
mode:
BuildMode
.
debug
))
.
createSync
(
recursive:
true
);
fileSystem
.
file
(
artifacts
.
getArtifactPath
(
Artifact
.
isolateSnapshotData
,
mode:
BuildMode
.
debug
))
.
createSync
(
recursive:
true
);
fileSystem
.
file
(
'pubspec.yaml'
).
writeAsStringSync
(
'name: hello
\n
flutter:
\n
shaders:
\n
- shader.glsl'
);
fileSystem
.
file
(
'.packages'
).
writeAsStringSync
(
'
\n
'
);
fileSystem
.
file
(
'shader.glsl'
).
writeAsStringSync
(
'test'
);
processManager
.
addCommands
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'HostArtifact.impellerc'
,
'--runtime-stage-gles'
,
'--iplr'
,
'--sl=out/flutter_assets/shader.glsl'
,
'--spirv=out/flutter_assets/shader.glsl.spirv'
,
'--input=/shader.glsl'
,
'--input-type=frag'
,
'--include=/'
,
'--include=/./shader_lib'
,
]),
]);
await
const
DebugAndroidApplication
().
build
(
environment
);
expect
(
processManager
,
hasNoRemainingExpectations
);
expect
(
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'out'
,
'flutter_assets'
,
'isolate_snapshot_data'
)).
existsSync
(),
true
);
expect
(
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'out'
,
'flutter_assets'
,
'vm_snapshot_data'
)).
existsSync
(),
true
);
expect
(
fileSystem
.
file
(
fileSystem
.
path
.
join
(
'out'
,
'flutter_assets'
,
'kernel_blob.bin'
)).
existsSync
(),
true
);
},
overrides:
<
Type
,
Generator
>{
FileSystem:
()
=>
fileSystem
,
ProcessManager:
()
=>
processManager
,
});
}
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