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
637e5bce
Unverified
Commit
637e5bce
authored
Oct 20, 2022
by
Brandon DeRosier
Committed by
GitHub
Oct 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Impeller] Build Impeller iOS runtime stage shaders when Impeller is enabled (#113689)
parent
9ac2cd6d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
9 deletions
+27
-9
assets.dart
...es/flutter_tools/lib/src/build_system/targets/assets.dart
+2
-0
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+18
-4
shader_compiler.dart
...r_tools/lib/src/build_system/targets/shader_compiler.dart
+2
-2
xcode_project.dart
packages/flutter_tools/lib/src/xcode_project.dart
+2
-0
shader_compiler_test.dart
...eral.shard/build_system/targets/shader_compiler_test.dart
+3
-3
No files found.
packages/flutter_tools/lib/src/build_system/targets/assets.dart
View file @
637e5bce
...
...
@@ -32,6 +32,7 @@ Future<Depfile> copyAssets(
required
TargetPlatform
targetPlatform
,
BuildMode
?
buildMode
,
required
ShaderTarget
shaderTarget
,
List
<
File
>
additionalInputs
=
const
<
File
>[],
})
async
{
// Check for an SkSL bundle.
final
String
?
shaderBundlePath
=
environment
.
defines
[
kBundleSkSLPath
]
??
environment
.
inputs
[
kBundleSkSLPath
];
...
...
@@ -65,6 +66,7 @@ Future<Depfile> copyAssets(
// An asset manifest with no assets would have zero inputs if not
// for this pubspec file.
pubspecFile
,
...
additionalInputs
,
];
final
List
<
File
>
outputs
=
<
File
>[];
...
...
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
637e5bce
...
...
@@ -10,7 +10,7 @@ import '../../base/common.dart';
import
'../../base/file_system.dart'
;
import
'../../base/io.dart'
;
import
'../../build_info.dart'
;
import
'../../globals.dart'
as
globals
show
xcode
;
import
'../../globals.dart'
as
globals
;
import
'../../macos/xcode.dart'
;
import
'../../project.dart'
;
import
'../../reporting/reporting.dart'
;
...
...
@@ -509,12 +509,28 @@ abstract class IosAssetBundle extends Target {
.
copySync
(
dsymOutputBinary
.
path
);
}
final
FlutterProject
flutterProject
=
FlutterProject
.
fromDirectory
(
environment
.
projectDir
);
bool
isImpellerEnabled
()
{
if
(!
flutterProject
.
ios
.
infoPlist
.
existsSync
())
{
return
false
;
}
final
Map
<
String
,
Object
>
info
=
globals
.
plistParser
.
parseFile
(
flutterProject
.
ios
.
infoPlist
.
path
);
final
Object
?
enableImpeller
=
info
[
'FLTEnableImpeller'
];
return
enableImpeller
is
bool
&&
enableImpeller
;
}
// Copy the assets.
final
Depfile
assetDepfile
=
await
copyAssets
(
environment
,
assetDirectory
,
targetPlatform:
TargetPlatform
.
ios
,
shaderTarget:
ShaderTarget
.
sksl
,
shaderTarget:
isImpellerEnabled
()
?
ShaderTarget
.
impelleriOS
:
ShaderTarget
.
sksl
,
additionalInputs:
<
File
>[
flutterProject
.
ios
.
infoPlist
,
flutterProject
.
ios
.
appFrameworkInfoPlist
,
],
);
final
DepfileService
depfileService
=
DepfileService
(
fileSystem:
environment
.
fileSystem
,
...
...
@@ -526,8 +542,6 @@ abstract class IosAssetBundle extends Target {
);
// Copy the plist from either the project or module.
// TODO(zanderso): add plist to inputs
final
FlutterProject
flutterProject
=
FlutterProject
.
fromDirectory
(
environment
.
projectDir
);
flutterProject
.
ios
.
appFrameworkInfoPlist
.
copySync
(
environment
.
outputDir
.
childDirectory
(
'App.framework'
)
...
...
packages/flutter_tools/lib/src/build_system/targets/shader_compiler.dart
View file @
637e5bce
...
...
@@ -21,8 +21,8 @@ import '../build_system.dart';
/// The output shader format that should be used by the [ShaderCompiler].
enum
ShaderTarget
{
impellerAndroid
(
'--
opengl-
es'
),
impelleriOS
(
'--
metal-ios
'
),
impellerAndroid
(
'--
runtime-stage-gl
es'
),
impelleriOS
(
'--
runtime-stage-metal
'
),
sksl
(
'--sksl'
);
const
ShaderTarget
(
this
.
target
);
...
...
packages/flutter_tools/lib/src/xcode_project.dart
View file @
637e5bce
...
...
@@ -131,6 +131,8 @@ class IosProject extends XcodeBasedProject {
File get appFrameworkInfoPlist => _flutterLibRoot.childDirectory('
Flutter
').childFile('
AppFrameworkInfo
.
plist
');
File get infoPlist => _editableDirectory.childDirectory('
Runner
').childFile('
Info
.
plist
');
Directory get symlinks => _flutterLibRoot.childDirectory('
.
symlinks
');
/// True, if the app project is using swift.
...
...
packages/flutter_tools/test/general.shard/build_system/targets/shader_compiler_test.dart
View file @
637e5bce
...
...
@@ -81,7 +81,7 @@ void main() {
FakeCommand
(
command:
<
String
>[
impellerc
,
'--
metal-ios
'
,
'--
runtime-stage-metal
'
,
'--iplr'
,
'--sl=
$outputPath
'
,
'--spirv=
$outputPath
.spirv'
,
...
...
@@ -117,7 +117,7 @@ void main() {
FakeCommand
(
command:
<
String
>[
impellerc
,
'--
opengl-
es'
,
'--
runtime-stage-gl
es'
,
'--iplr'
,
'--sl=
$outputPath
'
,
'--spirv=
$outputPath
.spirv'
,
...
...
@@ -275,7 +275,7 @@ void main() {
FakeCommand
(
command:
<
String
>[
impellerc
,
'--
opengl-
es'
,
'--
runtime-stage-gl
es'
,
'--iplr'
,
'--sl=/.tmp_rand0/0.8255140718871702.temp'
,
'--spirv=/.tmp_rand0/0.8255140718871702.temp.spirv'
,
...
...
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