From 63ceeb8f159aaa02822884cf2eb00b67dfa4d4e8 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 16 Jul 2020 11:23:52 -0700 Subject: [PATCH] Reland "Branch out android platform view perf testing (#60238)" (#61554) --- .../platform_views_layout/lib/main.dart | 22 +- .../test_driver/android_view_scroll_perf.dart | 4 +- .../README.md | 26 + .../android/app/build.gradle | 46 ++ .../android/app/src/main/AndroidManifest.xml | 26 + .../DummyPlatformView.java | 31 ++ .../DummyPlatformViewActivity.java | 19 + .../DummyPlatformViewFactory.java | 42 ++ .../android/build.gradle | 33 ++ .../android/gradle.properties | 4 + .../gradle/wrapper/gradle-wrapper.properties | 6 + .../android/settings.gradle | 5 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Flutter.xcconfig | 1 + .../ios/Runner.xcodeproj/project.pbxproj | 445 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../ios/Runner/AppDelegate.h | 10 + .../ios/Runner/AppDelegate.m | 27 ++ .../AppIcon.appiconset/Icon-App-76x76@3x.png | Bin 0 -> 4867 bytes .../Runner/Base.lproj/LaunchScreen.storyboard | 27 ++ .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../ios/Runner/DummyPlatformView.h | 23 + .../ios/Runner/DummyPlatformView.m | 57 +++ .../ios/Runner/Info.plist | 49 ++ .../ios/Runner/main.m | 14 + .../lib/android_platform_view.dart | 7 +- .../lib/main.dart | 137 ++++++ .../pubspec.yaml | 92 ++++ .../android_view_scroll_perf.dart} | 6 +- .../test_driver/scroll_perf_test.dart | 64 +++ .../test_driver/uikit_view_scroll_perf.dart | 13 + dev/devicelab/lib/tasks/perf_tests.dart | 4 +- .../.gradle/6.3/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../.gradle/6.3/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../.gradle/6.3/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../.gradle/6.3/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 .../.gradle/6.3/fileChanges/last-build.bin | Bin 0 -> 1 bytes .../.gradle/6.3/gc.properties | 0 .../.gradle/vcs-1/gc.properties | 0 48 files changed, 1277 insertions(+), 30 deletions(-) create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/README.md create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/AndroidManifest.xml create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformView.java create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewActivity.java create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewFactory.java create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/build.gradle create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle.properties create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/android/settings.gradle create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/AppFrameworkInfo.plist create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/Flutter.xcconfig create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.pbxproj create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.h create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.m create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/Main.storyboard create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.h create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.m create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Info.plist create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/main.m rename dev/benchmarks/{platform_views_layout => platform_views_layout_hybrid_composition}/lib/android_platform_view.dart (89%) create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml rename dev/benchmarks/{platform_views_layout/test_driver/android_texture_scroll_perf.dart => platform_views_layout_hybrid_composition/test_driver/android_view_scroll_perf.dart} (69%) create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/scroll_perf_test.dart create mode 100644 dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/uikit_view_scroll_perf.dart create mode 100644 dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin create mode 100644 dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties create mode 100644 dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties create mode 100644 dev/integration_tests/android_host_app/.gradle/6.3/fileChanges/last-build.bin create mode 100644 dev/integration_tests/android_host_app/.gradle/6.3/gc.properties create mode 100644 dev/integration_tests/android_host_app/.gradle/vcs-1/gc.properties create mode 100644 dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin create mode 100644 dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties create mode 100644 dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties create mode 100644 dev/integration_tests/module_host_with_custom_build/.gradle/6.3/fileChanges/last-build.bin create mode 100644 dev/integration_tests/module_host_with_custom_build/.gradle/6.3/gc.properties create mode 100644 dev/integration_tests/module_host_with_custom_build/.gradle/vcs-1/gc.properties create mode 100644 dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/fileChanges/last-build.bin create mode 100644 dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/gc.properties create mode 100644 dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/vcs-1/gc.properties diff --git a/dev/benchmarks/platform_views_layout/lib/main.dart b/dev/benchmarks/platform_views_layout/lib/main.dart index d8d81e93b27..64f7729cbc4 100644 --- a/dev/benchmarks/platform_views_layout/lib/main.dart +++ b/dev/benchmarks/platform_views_layout/lib/main.dart @@ -7,8 +7,6 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart' show timeDilation; -import 'android_platform_view.dart'; - void main() { runApp( const PlatformViewApp() @@ -17,13 +15,9 @@ void main() { class PlatformViewApp extends StatefulWidget { const PlatformViewApp({ - Key key, - this.enableHybridCompositionOnAndroid = false, + Key key }) : super(key: key); - /// Whether to use render the Android view as a platform view or a texture. - final bool enableHybridCompositionOnAndroid; - @override PlatformViewAppState createState() => PlatformViewAppState(); @@ -89,17 +83,9 @@ class DummyPlatformView extends StatelessWidget { viewType: viewType, ); } else if (Platform.isAndroid) { - final PlatformViewApp app = PlatformViewApp.of(context).widget; - assert(app != null); - if (app.enableHybridCompositionOnAndroid) { - nativeView = const AndroidPlatformView( - viewType: viewType, - ); - } else { - nativeView = const AndroidView( - viewType: viewType, - ); - } + nativeView = const AndroidView( + viewType: viewType, + ); } else { assert(false, 'Invalid platform'); } diff --git a/dev/benchmarks/platform_views_layout/test_driver/android_view_scroll_perf.dart b/dev/benchmarks/platform_views_layout/test_driver/android_view_scroll_perf.dart index d3d36e4ac52..31062143677 100644 --- a/dev/benchmarks/platform_views_layout/test_driver/android_view_scroll_perf.dart +++ b/dev/benchmarks/platform_views_layout/test_driver/android_view_scroll_perf.dart @@ -10,8 +10,6 @@ import 'package:platform_views_layout/main.dart' as app; void main() { enableFlutterDriverExtension(); runApp( - const app.PlatformViewApp( - enableHybridCompositionOnAndroid: true, - ) + const app.PlatformViewApp() ); } diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/README.md b/dev/benchmarks/platform_views_layout_hybrid_composition/README.md new file mode 100644 index 00000000000..cb35ed6efd8 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/README.md @@ -0,0 +1,26 @@ +# platform_views_layout_hybrid_composition + +## Scrolling benchmark + +To run the scrolling benchmark on a device: + +``` +flutter drive --profile test_driver/scroll_perf.dart +``` + +Results should be in the file `build/platform_views_scroll_perf_hybrid_composition.timeline_summary.json`. + +More detailed logs should be in `build/platform_views_scroll_perf_hybrid_composition.timeline.json`. + + +## Startup benchmark + +To measure startup time on a device: + +``` +flutter run --profile --trace-startup +``` + +Results should be in the logs. + +Additional results should be in the file `build/start_up_info.json`. diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle new file mode 100644 index 00000000000..b3b148868c9 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle @@ -0,0 +1,46 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withInputStream { stream -> + localProperties.load(stream) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +apply plugin: 'com.android.application' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + minSdkVersion 16 + targetSdkVersion 28 + versionCode 1 + versionName "0.0.1" + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/AndroidManifest.xml b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000000..0343ef316c4 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformView.java b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformView.java new file mode 100644 index 00000000000..08f9e225f73 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformView.java @@ -0,0 +1,31 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package dev.benchmarks.platform_views_layout_hybrid_composition; + +import android.content.Context; +import android.graphics.Color; +import android.view.View; +import android.widget.TextView; +import io.flutter.plugin.platform.PlatformView; + +public class DummyPlatformView implements PlatformView { + private final TextView textView; + + @SuppressWarnings("unchecked") + DummyPlatformView(final Context context, int id) { + textView = new TextView(context); + textView.setTextSize(72); + textView.setBackgroundColor(Color.rgb(255, 255, 255)); + textView.setText("DummyPlatformView"); + } + + @Override + public View getView() { + return textView; + } + + @Override + public void dispose() {} +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewActivity.java b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewActivity.java new file mode 100644 index 00000000000..eeb4a2f959c --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewActivity.java @@ -0,0 +1,19 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package dev.benchmarks.platform_views_layout_hybrid_composition; + +import androidx.annotation.NonNull; +import io.flutter.embedding.android.FlutterActivity; +import io.flutter.embedding.engine.FlutterEngine; + +public class DummyPlatformViewActivity extends FlutterActivity { + @Override + public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { + flutterEngine + .getPlatformViewsController() + .getRegistry() + .registerViewFactory("benchmarks/platform_views_layout_hybrid_composition/DummyPlatformView", new DummyPlatformViewFactory()); + } +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewFactory.java b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewFactory.java new file mode 100644 index 00000000000..a546aadc5bb --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/app/src/main/java/dev/bechmarks/platform_views_layout/DummyPlatformViewFactory.java @@ -0,0 +1,42 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package dev.benchmarks.platform_views_layout_hybrid_composition; + +import android.content.Context; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StringCodec; +import io.flutter.plugin.platform.PlatformView; +import io.flutter.plugin.platform.PlatformViewFactory; +import java.nio.ByteBuffer; + +public final class DummyPlatformViewFactory extends PlatformViewFactory { + DummyPlatformViewFactory() { + super( + new MessageCodec() { + @Nullable + @Override + public ByteBuffer encodeMessage(@Nullable Object o) { + if (o instanceof String) { + return StringCodec.INSTANCE.encodeMessage((String) o); + } + return null; + } + + @Nullable + @Override + public Object decodeMessage(@Nullable ByteBuffer byteBuffer) { + return StringCodec.INSTANCE.decodeMessage(byteBuffer); + } + } + ); + } + + @SuppressWarnings("unchecked") + @Override + public PlatformView create(Context context, int id, Object args) { + return new DummyPlatformView(context, id); + } +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/build.gradle b/dev/benchmarks/platform_views_layout_hybrid_composition/android/build.gradle new file mode 100644 index 00000000000..5df71fcf8bb --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/build.gradle @@ -0,0 +1,33 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +buildscript { + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle.properties b/dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle.properties new file mode 100644 index 00000000000..a6738207fd1 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true +android.enableR8=true diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle/wrapper/gradle-wrapper.properties b/dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000000..296b146b731 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/android/settings.gradle b/dev/benchmarks/platform_views_layout_hybrid_composition/android/settings.gradle new file mode 100644 index 00000000000..663db3adbae --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/android/settings.gradle @@ -0,0 +1,5 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +include ':app' diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/AppFrameworkInfo.plist b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 00000000000..6b4c0f78a78 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/Flutter.xcconfig b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/Flutter.xcconfig new file mode 100644 index 00000000000..592ceee85b8 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Flutter/Flutter.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.pbxproj b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..47065ce76f1 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,445 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 647B792C24207B8900ABA501 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 647B792B24207B8900ABA501 /* AppDelegate.m */; }; + 647B792F24207D1600ABA501 /* DummyPlatformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 647B792E24207D1600ABA501 /* DummyPlatformView.m */; }; + 647B793224208A4200ABA501 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 647B793024208A4200ABA501 /* GeneratedPluginRegistrant.m */; }; + 746232561E83B9DF00CC1A5E /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 746232551E83B9DF00CC1A5E /* AppFrameworkInfo.plist */; }; + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 647B792824207ADD00ABA501 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 647B792B24207B8900ABA501 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 647B792D24207CC400ABA501 /* DummyPlatformView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DummyPlatformView.h; sourceTree = ""; }; + 647B792E24207D1600ABA501 /* DummyPlatformView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DummyPlatformView.m; sourceTree = ""; }; + 647B793024208A4200ABA501 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 647B793124208A4200ABA501 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 746232551E83B9DF00CC1A5E /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Flutter.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Flutter.xcconfig; path = Flutter/Flutter.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 746232551E83B9DF00CC1A5E /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Flutter.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 647B793124208A4200ABA501 /* GeneratedPluginRegistrant.h */, + 647B793024208A4200ABA501 /* GeneratedPluginRegistrant.m */, + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 647B792824207ADD00ABA501 /* AppDelegate.h */, + 647B792B24207B8900ABA501 /* AppDelegate.m */, + 647B792D24207CC400ABA501 /* DummyPlatformView.h */, + 647B792E24207D1600ABA501 /* DummyPlatformView.m */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 97C146F21CF9000F007C117D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* ShellScript */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "The Flutter Authors"; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 746232561E83B9DF00CC1A5E /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 9740EEB61CF901F6004384FC /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh $FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 647B792C24207B8900ABA501 /* AppDelegate.m in Sources */, + 97C146F31CF9000F007C117D /* main.m in Sources */, + 647B792F24207D1600ABA501 /* DummyPlatformView.m in Sources */, + 647B793224208A4200ABA501 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 24D15A8E21828735001BB33E /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 24D15A8F21828735001BB33E /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Flutter.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 24D15A8E21828735001BB33E /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 24D15A8F21828735001BB33E /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..6cec59cc956 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.h b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.h new file mode 100644 index 00000000000..7d5bcd37fc8 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.h @@ -0,0 +1,10 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +@interface AppDelegate : FlutterAppDelegate + +@end diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.m b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.m new file mode 100644 index 00000000000..697733e65cd --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/AppDelegate.m @@ -0,0 +1,27 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "AppDelegate.h" +#include "DummyPlatformView.h" +#include "GeneratedPluginRegistrant.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + [GeneratedPluginRegistrant registerWithRegistry:self]; + + NSObject* registrar = + [self registrarForPlugin:@"benchmarks/platform_views_layout_hybrid_composition/DummyPlatformViewPlugin"]; + + DummyPlatformViewFactory* dummyPlatformViewFactory = [[DummyPlatformViewFactory alloc] init]; + [registrar registerViewFactory:dummyPlatformViewFactory + withId:@"benchmarks/platform_views_layout_hybrid_composition/DummyPlatformView" + gestureRecognizersBlockingPolicy:FlutterPlatformViewGestureRecognizersBlockingPolicyEager]; + + // Override point for customization after application launch. + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +@end diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..5d2bad850374720926b6d2d1126b3e2ef5e122ac GIT binary patch literal 4867 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 Y>kPbt1SMR7pIe|aC+$vDS$M_&AOEo+1ONa4 literal 0 HcmV?d00001 diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/LaunchScreen.storyboard b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..ebf48f60397 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/Main.storyboard b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 00000000000..f3c28516fb3 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.h b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.h new file mode 100644 index 00000000000..6d21bf04170 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.h @@ -0,0 +1,23 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface DummyPlatformView : NSObject + +- (instancetype)initWithFrame:(CGRect)frame + viewIdentifier:(int64_t)viewId + arguments:(id _Nullable)args + binaryMessenger:(NSObject*)messenger; + +- (UIView*)view; +@end + +@interface DummyPlatformViewFactory : NSObject +- (instancetype)initWithMessenger:(NSObject*)messenger; +@end + +NS_ASSUME_NONNULL_END diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.m b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.m new file mode 100644 index 00000000000..c92cd0592a0 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/DummyPlatformView.m @@ -0,0 +1,57 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "DummyPlatformView.h" + +@implementation DummyPlatformViewFactory { + NSObject* _messenger; +} + +- (instancetype)initWithMessenger:(NSObject*)messenger { + self = [super init]; + if (self) { + _messenger = messenger; + } + return self; +} + +- (NSObject*)createWithFrame:(CGRect)frame + viewIdentifier:(int64_t)viewId + arguments:(id _Nullable)args { + return [[DummyPlatformView alloc] initWithFrame:frame + viewIdentifier:viewId + arguments:args + binaryMessenger:_messenger]; +} + +- (NSObject*)createArgsCodec { + return [FlutterStringCodec sharedInstance]; +} + +@end + +@implementation DummyPlatformView { + UITextView* _view; + FlutterMethodChannel* _channel; +} + +- (instancetype)initWithFrame:(CGRect)frame + viewIdentifier:(int64_t)viewId + arguments:(id _Nullable)args + binaryMessenger:(NSObject*)messenger { + if ([super init]) { + _view = [[UITextView alloc] initWithFrame:CGRectMake(0.0, 0.0, 250.0, 100.0)]; + _view.textColor = UIColor.blueColor; + _view.backgroundColor = UIColor.lightGrayColor; + [_view setFont:[UIFont systemFontOfSize:52]]; + _view.text = @"DummyPlatformView"; + } + return self; +} + +- (UIView*)view { + return _view; +} + +@end diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Info.plist b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Info.plist new file mode 100644 index 00000000000..b5a2f94fef4 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.yourcompany.complexLayout + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + complex_layout + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + io.flutter.embedded_views_preview + + io.flutter.metal_preview + + + diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/main.m b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/main.m new file mode 100644 index 00000000000..86070722733 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/ios/Runner/main.m @@ -0,0 +1,14 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, + NSStringFromClass([AppDelegate class])); + } +} diff --git a/dev/benchmarks/platform_views_layout/lib/android_platform_view.dart b/dev/benchmarks/platform_views_layout_hybrid_composition/lib/android_platform_view.dart similarity index 89% rename from dev/benchmarks/platform_views_layout/lib/android_platform_view.dart rename to dev/benchmarks/platform_views_layout_hybrid_composition/lib/android_platform_view.dart index 66d5217e312..edcead847fe 100644 --- a/dev/benchmarks/platform_views_layout/lib/android_platform_view.dart +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/lib/android_platform_view.dart @@ -11,7 +11,6 @@ import 'package:flutter/services.dart'; class AndroidPlatformView extends StatelessWidget { /// Creates a platform view for Android, which is rendered as a /// native view. - /// `viewType` identifies the type of Android view to create. const AndroidPlatformView({ Key key, @required this.viewType, @@ -36,10 +35,12 @@ class AndroidPlatformView extends StatelessWidget { ); }, onCreatePlatformView: (PlatformViewCreationParams params) { - return PlatformViewsService.initAndroidView( + return PlatformViewsService.initSurfaceAndroidView( id: params.id, - viewType: params.viewType, + viewType: viewType, layoutDirection: TextDirection.ltr, + creationParams: null, + creationParamsCodec: const StandardMessageCodec(), ) ..addOnPlatformViewCreatedListener(params.onPlatformViewCreated) ..create(); diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart b/dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart new file mode 100644 index 00000000000..b218ca2ebf1 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/lib/main.dart @@ -0,0 +1,137 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart' show timeDilation; +import 'package:flutter_driver/driver_extension.dart'; + +import 'android_platform_view.dart'; + +void main() { + enableFlutterDriverExtension(); + runApp( + const PlatformViewApp() + ); +} + +class PlatformViewApp extends StatefulWidget { + const PlatformViewApp({ + Key key + }) : super(key: key); + + @override + PlatformViewAppState createState() => PlatformViewAppState(); + + static PlatformViewAppState of(BuildContext context) => context.findAncestorStateOfType(); +} + +class PlatformViewAppState extends State { + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: ThemeData.light(), + title: 'Advanced Layout', + home: const PlatformViewLayout(), + ); + } + + void toggleAnimationSpeed() { + setState(() { + timeDilation = (timeDilation != 1.0) ? 1.0 : 5.0; + }); + } +} + +class PlatformViewLayout extends StatelessWidget { + const PlatformViewLayout({ Key key }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar(title: const Text('Platform View Scrolling Layout')), + body: ListView.builder( + key: const Key('platform-views-scroll'), // This key is used by the driver test. + itemCount: 200, + itemBuilder: (BuildContext context, int index) { + return Padding( + padding: const EdgeInsets.all(5.0), + child: Material( + elevation: (index % 5 + 1).toDouble(), + color: Colors.white, + child: Stack( + children: const [ + DummyPlatformView(), + RotationContainer(), + ], + ), + ), + ); + }, + ), + ); + } +} + +class DummyPlatformView extends StatelessWidget { + const DummyPlatformView({Key key}) : super(key: key); + + @override + Widget build(BuildContext context) { + const String viewType = 'benchmarks/platform_views_layout_hybrid_composition/DummyPlatformView'; + Widget nativeView; + if (Platform.isIOS) { + nativeView = const UiKitView( + viewType: viewType, + ); + } else if (Platform.isAndroid) { + nativeView = const AndroidPlatformView( + viewType: viewType, + ); + } else { + assert(false, 'Invalid platform'); + } + return Container( + color: Colors.purple, + height: 200.0, + width: 300.0, + child: nativeView, + ); + } +} + +class RotationContainer extends StatefulWidget { + const RotationContainer({Key key}) : super(key: key); + + @override + _RotationContainerState createState() => _RotationContainerState(); +} + +class _RotationContainerState extends State + with SingleTickerProviderStateMixin { + AnimationController _rotationController; + + @override + void initState() { + super.initState(); + _rotationController = AnimationController( + vsync: this, + duration: const Duration(seconds: 1), + value: 1, + ); + _rotationController.repeat(); + } + @override + Widget build(BuildContext context) { + return RotationTransition( + turns: Tween(begin: 0.0, end: 1.0).animate(_rotationController), + child: Container( + color: Colors.purple, + width: 50.0, + height: 50.0, + ), + ); + } +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml new file mode 100644 index 00000000000..06f8ab2d819 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml @@ -0,0 +1,92 @@ +name: platform_views_layout_hybrid_composition +description: A benchmark for platform views, using hybrid composition on android. + +environment: + sdk: ">=2.2.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + flutter_driver: + sdk: flutter + + # To change the version of the gallery assets, edit + # //packages/flutter_tools/lib/src/commands/update_packages.dart + # and run + # flutter update-packages --force-upgrade + flutter_gallery_assets: 0.2.2 + + archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.4.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + characters: 1.1.0-nullsafety # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + charcode: 1.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + collection: 1.15.0-nullsafety # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + file: 5.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + intl: 0.16.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + matcher: 0.12.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + meta: 1.3.0-nullsafety # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + path: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.7.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stack_trace: 1.9.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + typed_data: 1.3.0-nullsafety # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vector_math: 2.1.0-nullsafety # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + +dev_dependencies: + flutter_test: + sdk: flutter + test: 1.15.2 + + _fe_analyzer_shared: 5.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + analyzer: 0.39.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + boolean_selector: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + clock: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + coverage: 0.14.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + csslib: 0.16.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + fake_async: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + glob: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + html: 0.14.0+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http: 0.12.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_multi_server: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + js: 0.6.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + mime: 0.9.6+3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + node_interop: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + node_io: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + node_preamble: 1.4.12 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pedantic: 1.9.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pool: 1.4.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_map_stack_trace: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_maps: 0.10.9 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + string_scanner: 1.0.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + test_api: 0.2.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + test_core: 0.3.10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + +flutter: + uses-material-design: true + assets: + - packages/flutter_gallery_assets/people/square/ali.png + - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png + +# PUBSPEC CHECKSUM: 9c3d diff --git a/dev/benchmarks/platform_views_layout/test_driver/android_texture_scroll_perf.dart b/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/android_view_scroll_perf.dart similarity index 69% rename from dev/benchmarks/platform_views_layout/test_driver/android_texture_scroll_perf.dart rename to dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/android_view_scroll_perf.dart index 7b4d2c14a04..8eb48e68ddf 100644 --- a/dev/benchmarks/platform_views_layout/test_driver/android_texture_scroll_perf.dart +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/android_view_scroll_perf.dart @@ -5,13 +5,11 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_driver/driver_extension.dart'; -import 'package:platform_views_layout/main.dart' as app; +import 'package:platform_views_layout_hybrid_composition/main.dart' as app; void main() { enableFlutterDriverExtension(); runApp( - const app.PlatformViewApp( - enableHybridCompositionOnAndroid: false, - ) + const app.PlatformViewApp() ); } diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/scroll_perf_test.dart b/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/scroll_perf_test.dart new file mode 100644 index 00000000000..a0da92f1ba0 --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/scroll_perf_test.dart @@ -0,0 +1,64 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:async'; + +import 'package:flutter_driver/flutter_driver.dart'; +import 'package:test/test.dart' hide TypeMatcher, isInstanceOf; + +void main() { + group('scrolling performance test', () { + FlutterDriver driver; + + setUpAll(() async { + driver = await FlutterDriver.connect(); + + await driver.waitUntilFirstFrameRasterized(); + }); + + tearDownAll(() async { + if (driver != null) + driver.close(); + }); + + Future testScrollPerf(String listKey, String summaryName) async { + // The slight initial delay avoids starting the timing during a + // period of increased load on the device. Without this delay, the + // benchmark has greater noise. + // See: https://github.com/flutter/flutter/issues/19434 + await Future.delayed(const Duration(milliseconds: 250)); + + await driver.forceGC(); + + final Timeline timeline = await driver.traceAction(() async { + // Find the scrollable stock list + final SerializableFinder list = find.byValueKey(listKey); + expect(list, isNotNull); + + // Scroll down + for (int i = 0; i < 5; i += 1) { + await driver.scroll(list, 0.0, -300.0, const Duration(milliseconds: 300)); + await Future.delayed(const Duration(milliseconds: 500)); + } + + // Scroll up + for (int i = 0; i < 5; i += 1) { + await driver.scroll(list, 0.0, 300.0, const Duration(milliseconds: 300)); + await Future.delayed(const Duration(milliseconds: 500)); + } + }); + + final TimelineSummary summary = TimelineSummary.summarize(timeline); + summary.writeSummaryToFile(summaryName, pretty: true); + summary.writeTimelineToFile(summaryName, pretty: true); + } + + test('platform_views_scroll_perf_hybrid_composition', () async { + // Disable frame sync, since there are ongoing animations. + await driver.runUnsynchronized(() async { + await testScrollPerf('platform-views-scroll', 'platform_views_scroll_perf_hybrid_composition'); + }); + }); + }); +} diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/uikit_view_scroll_perf.dart b/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/uikit_view_scroll_perf.dart new file mode 100644 index 00000000000..c0f501f261d --- /dev/null +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/test_driver/uikit_view_scroll_perf.dart @@ -0,0 +1,13 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/widgets.dart'; +import 'package:flutter_driver/driver_extension.dart'; + +import 'package:platform_views_layout_hybrid_composition/main.dart' as app; + +void main() { + enableFlutterDriverExtension(); + runApp(const app.PlatformViewApp()); +} diff --git a/dev/devicelab/lib/tasks/perf_tests.dart b/dev/devicelab/lib/tasks/perf_tests.dart index d01778091b9..05653ab64a9 100644 --- a/dev/devicelab/lib/tasks/perf_tests.dart +++ b/dev/devicelab/lib/tasks/perf_tests.dart @@ -44,7 +44,7 @@ TaskFunction createUiKitViewScrollPerfTest() { TaskFunction createAndroidTextureScrollPerfTest() { return PerfTest( '${flutterDirectory.path}/dev/benchmarks/platform_views_layout', - 'test_driver/android_texture_scroll_perf.dart', + 'test_driver/android_view_scroll_perf.dart', 'platform_views_scroll_perf', testDriver: 'test_driver/scroll_perf_test.dart', ).run; @@ -52,7 +52,7 @@ TaskFunction createAndroidTextureScrollPerfTest() { TaskFunction createAndroidViewScrollPerfTest() { return PerfTest( - '${flutterDirectory.path}/dev/benchmarks/platform_views_layout', + '${flutterDirectory.path}/dev/benchmarks/platform_views_layout_hybrid_composition', 'test_driver/android_view_scroll_perf.dart', 'platform_views_scroll_perf', testDriver: 'test_driver/scroll_perf_test.dart', diff --git a/dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties b/dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties b/dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/android_host_app/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/android_host_app/.gradle/6.3/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/dev/integration_tests/android_host_app/.gradle/6.3/gc.properties b/dev/integration_tests/android_host_app/.gradle/6.3/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/android_host_app/.gradle/vcs-1/gc.properties b/dev/integration_tests/android_host_app/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties b/dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties b/dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/module_host_with_custom_build/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/module_host_with_custom_build/.gradle/6.3/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/dev/integration_tests/module_host_with_custom_build/.gradle/6.3/gc.properties b/dev/integration_tests/module_host_with_custom_build/.gradle/6.3/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/module_host_with_custom_build/.gradle/vcs-1/gc.properties b/dev/integration_tests/module_host_with_custom_build/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/fileChanges/last-build.bin b/dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/fileChanges/last-build.bin new file mode 100644 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d GIT binary patch literal 1 IcmZPo000310RR91 literal 0 HcmV?d00001 diff --git a/dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/gc.properties b/dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/gc.properties new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/vcs-1/gc.properties b/dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000000..e69de29bb2d