Skip to content

Commit d9bcf96

Browse files
Update intro_flutter_gpu for Flutter main (#2332)
1 parent cae35a6 commit d9bcf96

File tree

74 files changed

+194
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+194
-79
lines changed

flutter_ci_script_shared.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ function ci_codelabs () {
5050

5151
# intro_flutter_gpu only runs with Impeller
5252
if [ $CODELAB = 'intro_flutter_gpu' ]; then
53-
# Skipping Windows: https://github.com/bdero/flutter_scene/issues/55
54-
if [ $RUNNER_OS = 'macOS' ] || [ $RUNNER_OS = 'Linux' ]; then
53+
# Skipping Windows and Linux: https://github.com/bdero/flutter_scene/issues/55
54+
if [ $RUNNER_OS = 'macOS' ]; then
5555
flutter config --enable-native-assets
5656
flutter build `echo $RUNNER_OS | tr '[:upper:]' '[:lower:]'` --debug
57-
flutter test --enable-impeller
57+
flutter test --enable-flutter-gpu
5858
else
5959
echo "Skipping $CODELAB on $RUNNER_OS"
6060
fi

intro_flutter_gpu/codelab_rebuild.yaml

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ steps:
289289
testWidgets('smoke test', (tester) async {
290290
// Build our app and trigger a frame.
291291
await tester.pumpWidget(const MainApp());
292-
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
292+
}, skip: true); // https://github.com/flutter/flutter/issues/173650
293293
}
294294
- name: Patch macos/Runner/Info.plist
295295
path: intro_flutter_gpu/macos/Runner/Info.plist
@@ -300,11 +300,42 @@ steps:
300300
<string>MainMenu</string>
301301
<key>NSPrincipalClass</key>
302302
<string>NSApplication</string>
303-
+ <!-- flutter_gpu requires Impeller -->
304-
+ <key>FLTEnableImpeller</key>
303+
+ <!-- Required for flutter_gpu -->
304+
+ <key>FLTEnableFlutterGPU</key>
305305
+ <true />
306306
</dict>
307307
</plist>
308+
- name: Patch ios/Runner/Info.plist
309+
path: intro_flutter_gpu/ios/Runner/Info.plist
310+
patch-u: |
311+
--- a/intro_flutter_gpu/step_12/ios/Runner/Info.plist
312+
+++ b/intro_flutter_gpu/step_12/ios/Runner/Info.plist
313+
@@ -45,5 +45,8 @@
314+
<true/>
315+
<key>UIApplicationSupportsIndirectInputEvents</key>
316+
<true/>
317+
+ <!-- Required for flutter_gpu -->
318+
+ <key>FLTEnableFlutterGPU</key>
319+
+ <true />
320+
</dict>
321+
</plist>
322+
- name: Patch android/app/src/main/AndroidManifest.xml
323+
path: intro_flutter_gpu/android/app/src/main/AndroidManifest.xml
324+
patch-u: |
325+
--- a/intro_flutter_gpu/step_12/android/app/src/main/AndroidManifest.xml
326+
+++ b/intro_flutter_gpu/step_12/android/app/src/main/AndroidManifest.xml
327+
@@ -3,6 +3,11 @@
328+
android:label="intro_flutter_gpu"
329+
android:name="${applicationName}"
330+
android:icon="@mipmap/ic_launcher">
331+
+
332+
+ <meta-data
333+
+ android:name="io.flutter.embedding.android.EnableFlutterGPU"
334+
+ android:value="true" />
335+
+
336+
<activity
337+
android:name=".MainActivity"
338+
android:exported="true"
308339
- name: Copy step_01
309340
copydir:
310341
from: intro_flutter_gpu
@@ -2233,7 +2264,7 @@ steps:
22332264
+ await tester.pumpWidget(
22342265
+ MainApp(staticResourcesInitialized: Scene.initializeStaticResources()),
22352266
+ );
2236-
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
2267+
}, skip: true); // https://github.com/flutter/flutter/issues/173650
22372268
}
22382269
- name: Copy step_12
22392270
copydir:

intro_flutter_gpu/step_01/android/app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
android:label="intro_flutter_gpu"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
6+
7+
<meta-data
8+
android:name="io.flutter.embedding.android.EnableFlutterGPU"
9+
android:value="true" />
10+
611
<activity
712
android:name=".MainActivity"
813
android:exported="true"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3-
android.enableJetifier=true

intro_flutter_gpu/step_01/ios/Runner/Info.plist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,8 @@
4545
<true/>
4646
<key>UIApplicationSupportsIndirectInputEvents</key>
4747
<true/>
48+
<!-- Required for flutter_gpu -->
49+
<key>FLTEnableFlutterGPU</key>
50+
<true />
4851
</dict>
4952
</plist>

intro_flutter_gpu/step_01/macos/Runner/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
<string>MainMenu</string>
2929
<key>NSPrincipalClass</key>
3030
<string>NSApplication</string>
31-
<!-- flutter_gpu requires Impeller -->
32-
<key>FLTEnableImpeller</key>
31+
<!-- Required for flutter_gpu -->
32+
<key>FLTEnableFlutterGPU</key>
3333
<true />
3434
</dict>
3535
</plist>

intro_flutter_gpu/step_01/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ publish_to: 'none'
44
version: 0.1.0
55

66
environment:
7-
sdk: ^3.9.0-0
7+
sdk: ^3.10.0-0
88

99
dependencies:
1010
flutter:
@@ -18,7 +18,7 @@ dependencies:
1818
dev_dependencies:
1919
flutter_test:
2020
sdk: flutter
21-
flutter_lints: ^5.0.0
21+
flutter_lints: ^6.0.0
2222

2323
flutter:
2424
uses-material-design: true

intro_flutter_gpu/step_01/test/widget_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ void main() {
1010
testWidgets('smoke test', (tester) async {
1111
// Build our app and trigger a frame.
1212
await tester.pumpWidget(const MainApp());
13-
}, skip: true); // See https://github.com/flutter/flutter/issues/171361
13+
}, skip: true); // https://github.com/flutter/flutter/issues/173650
1414
}

intro_flutter_gpu/step_02/android/app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
android:label="intro_flutter_gpu"
44
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
6+
7+
<meta-data
8+
android:name="io.flutter.embedding.android.EnableFlutterGPU"
9+
android:value="true" />
10+
611
<activity
712
android:name=".MainActivity"
813
android:exported="true"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
3-
android.enableJetifier=true

0 commit comments

Comments
 (0)