Skip to content

Update intro_flutter_gpu for Flutter main #2332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flutter_ci_script_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ function ci_codelabs () {

# intro_flutter_gpu only runs with Impeller
if [ $CODELAB = 'intro_flutter_gpu' ]; then
# Skipping Windows: https://github.com/bdero/flutter_scene/issues/55
if [ $RUNNER_OS = 'macOS' ] || [ $RUNNER_OS = 'Linux' ]; then
# Skipping Windows and Linux: https://github.com/bdero/flutter_scene/issues/55
if [ $RUNNER_OS = 'macOS' ]; then
flutter config --enable-native-assets
flutter build `echo $RUNNER_OS | tr '[:upper:]' '[:lower:]'` --debug
flutter test --enable-impeller
flutter test --enable-flutter-gpu
else
echo "Skipping $CODELAB on $RUNNER_OS"
fi
Expand Down
39 changes: 35 additions & 4 deletions intro_flutter_gpu/codelab_rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ steps:
testWidgets('smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
- name: Patch macos/Runner/Info.plist
path: intro_flutter_gpu/macos/Runner/Info.plist
Expand All @@ -300,11 +300,42 @@ steps:
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
+ <!-- flutter_gpu requires Impeller -->
+ <key>FLTEnableImpeller</key>
+ <!-- Required for flutter_gpu -->
+ <key>FLTEnableFlutterGPU</key>
+ <true />
</dict>
</plist>
- name: Patch ios/Runner/Info.plist
path: intro_flutter_gpu/ios/Runner/Info.plist
patch-u: |
--- a/intro_flutter_gpu/step_12/ios/Runner/Info.plist
+++ b/intro_flutter_gpu/step_12/ios/Runner/Info.plist
@@ -45,5 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
+ <!-- Required for flutter_gpu -->
+ <key>FLTEnableFlutterGPU</key>
+ <true />
</dict>
</plist>
- name: Patch android/app/src/main/AndroidManifest.xml
path: intro_flutter_gpu/android/app/src/main/AndroidManifest.xml
patch-u: |
--- a/intro_flutter_gpu/step_12/android/app/src/main/AndroidManifest.xml
+++ b/intro_flutter_gpu/step_12/android/app/src/main/AndroidManifest.xml
@@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
+
+ <meta-data
+ android:name="io.flutter.embedding.android.EnableFlutterGPU"
+ android:value="true" />
+
<activity
android:name=".MainActivity"
android:exported="true"
- name: Copy step_01
copydir:
from: intro_flutter_gpu
Expand Down Expand Up @@ -2233,7 +2264,7 @@ steps:
+ await tester.pumpWidget(
+ MainApp(staticResourcesInitialized: Scene.initializeStaticResources()),
+ );
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
- name: Copy step_12
copydir:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="io.flutter.embedding.android.EnableFlutterGPU"
android:value="true" />

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
1 change: 0 additions & 1 deletion intro_flutter_gpu/step_01/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
3 changes: 3 additions & 0 deletions intro_flutter_gpu/step_01/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_01/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<!-- flutter_gpu requires Impeller -->
<key>FLTEnableImpeller</key>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_01/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: 'none'
version: 0.1.0

environment:
sdk: ^3.9.0-0
sdk: ^3.10.0-0

dependencies:
flutter:
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
flutter_lints: ^6.0.0

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion intro_flutter_gpu/step_01/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ void main() {
testWidgets('smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="io.flutter.embedding.android.EnableFlutterGPU"
android:value="true" />

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
1 change: 0 additions & 1 deletion intro_flutter_gpu/step_02/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
3 changes: 3 additions & 0 deletions intro_flutter_gpu/step_02/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_02/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<!-- flutter_gpu requires Impeller -->
<key>FLTEnableImpeller</key>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_02/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: 'none'
version: 0.1.0

environment:
sdk: ^3.9.0-0
sdk: ^3.10.0-0

dependencies:
flutter:
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
flutter_lints: ^6.0.0

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion intro_flutter_gpu/step_02/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ void main() {
testWidgets('smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="io.flutter.embedding.android.EnableFlutterGPU"
android:value="true" />

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
1 change: 0 additions & 1 deletion intro_flutter_gpu/step_03/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
3 changes: 3 additions & 0 deletions intro_flutter_gpu/step_03/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_03/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<!-- flutter_gpu requires Impeller -->
<key>FLTEnableImpeller</key>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_03/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: 'none'
version: 0.1.0

environment:
sdk: ^3.9.0-0
sdk: ^3.10.0-0

dependencies:
flutter:
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
flutter_lints: ^6.0.0

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion intro_flutter_gpu/step_03/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ void main() {
testWidgets('smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="io.flutter.embedding.android.EnableFlutterGPU"
android:value="true" />

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
1 change: 0 additions & 1 deletion intro_flutter_gpu/step_04/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
3 changes: 3 additions & 0 deletions intro_flutter_gpu/step_04/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_04/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<!-- flutter_gpu requires Impeller -->
<key>FLTEnableImpeller</key>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_04/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: 'none'
version: 0.1.0

environment:
sdk: ^3.9.0-0
sdk: ^3.10.0-0

dependencies:
flutter:
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
flutter_lints: ^6.0.0

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion intro_flutter_gpu/step_04/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ void main() {
testWidgets('smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="io.flutter.embedding.android.EnableFlutterGPU"
android:value="true" />

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
1 change: 0 additions & 1 deletion intro_flutter_gpu/step_05/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
3 changes: 3 additions & 0 deletions intro_flutter_gpu/step_05/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_05/macos/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<!-- flutter_gpu requires Impeller -->
<key>FLTEnableImpeller</key>
<!-- Required for flutter_gpu -->
<key>FLTEnableFlutterGPU</key>
<true />
</dict>
</plist>
4 changes: 2 additions & 2 deletions intro_flutter_gpu/step_05/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ publish_to: 'none'
version: 0.1.0

environment:
sdk: ^3.9.0-0
sdk: ^3.10.0-0

dependencies:
flutter:
Expand All @@ -18,7 +18,7 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^5.0.0
flutter_lints: ^6.0.0

flutter:
uses-material-design: true
Expand Down
2 changes: 1 addition & 1 deletion intro_flutter_gpu/step_05/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ void main() {
testWidgets('smoke test', (tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MainApp());
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
}, skip: true); // https://github.com/flutter/flutter/issues/173650
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
android:label="intro_flutter_gpu"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">

<meta-data
android:name="io.flutter.embedding.android.EnableFlutterGPU"
android:value="true" />

<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
1 change: 0 additions & 1 deletion intro_flutter_gpu/step_06/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true
Loading
Loading