Unverified Commit 21b8b729 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[Impeller] Temporary flag flip for devicelab tests to use Impeller. (#122224)

[Impeller] Temporary flag flip for devicelab tests to use Impeller.
parent 2e7b4587
...@@ -10,5 +10,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -10,5 +10,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createAnimatedComplexOpacityPerfE2ETest(enableImpeller: true)); await task(createAnimatedComplexOpacityPerfE2ETest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createBackdropFilterPerfTest(enableImpeller: true)); await task(createBackdropFilterPerfTest(enableImpeller: true));
} }
...@@ -10,5 +10,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -10,5 +10,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createColorFilterAndFadePerfE2ETest(enableImpeller: true)); await task(createColorFilterAndFadePerfE2ETest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createComplexLayoutScrollPerfTest(badScroll: true, enableImpeller: true)); await task(createComplexLayoutScrollPerfTest(badScroll: true, enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createComplexLayoutScrollPerfTest(enableImpeller: true)); await task(createComplexLayoutScrollPerfTest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/gallery.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/gallery.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createGalleryTransitionE2ETest(enableImpeller: true)); await task(createGalleryTransitionE2ETest(enableImpeller: true));
} }
...@@ -10,5 +10,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -10,5 +10,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createFullscreenTextfieldPerfE2ETest(enableImpeller: true)); await task(createFullscreenTextfieldPerfE2ETest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createImageFilteredTransformAnimationPerfTest(enableImpeller: true)); await task(createImageFilteredTransformAnimationPerfTest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.android; deviceOperatingSystem = DeviceOperatingSystem.android;
// ignore: avoid_redundant_argument_values
await task(createListTextLayoutPerfE2ETest(enableImpeller: true)); await task(createListTextLayoutPerfE2ETest(enableImpeller: true));
} }
...@@ -9,5 +9,6 @@ import 'package:flutter_devicelab/tasks/microbenchmarks.dart'; ...@@ -9,5 +9,6 @@ import 'package:flutter_devicelab/tasks/microbenchmarks.dart';
/// Runs microbenchmarks on iOS. /// Runs microbenchmarks on iOS.
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createMicrobenchmarkTask(enableImpeller: true)); await task(createMicrobenchmarkTask(enableImpeller: true));
} }
...@@ -17,6 +17,7 @@ Future<void> main() async { ...@@ -17,6 +17,7 @@ Future<void> main() async {
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery')); final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
try { try {
// ignore: avoid_redundant_argument_values
await task(NewGalleryPerfTest(galleryDir, enableImpeller: true).run); await task(NewGalleryPerfTest(galleryDir, enableImpeller: true).run);
} finally { } finally {
rmTree(galleryParentDir); rmTree(galleryParentDir);
......
...@@ -17,6 +17,7 @@ Future<void> main() async { ...@@ -17,6 +17,7 @@ Future<void> main() async {
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery')); final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
try { try {
// ignore: avoid_redundant_argument_values
await task(NewGalleryPerfTest(galleryDir, enableImpeller: true).run); await task(NewGalleryPerfTest(galleryDir, enableImpeller: true).run);
} finally { } finally {
rmTree(galleryParentDir); rmTree(galleryParentDir);
......
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createUiKitViewScrollPerfTest(enableImpeller: true)); await task(createUiKitViewScrollPerfTest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createUiKitViewScrollPerfNonIntersectingTest(enableImpeller: true)); await task(createUiKitViewScrollPerfNonIntersectingTest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createSimpleAnimationPerfTest(enableImpeller: true)); await task(createSimpleAnimationPerfTest(enableImpeller: true));
} }
...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart'; ...@@ -8,5 +8,6 @@ import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async { Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios; deviceOperatingSystem = DeviceOperatingSystem.ios;
// ignore: avoid_redundant_argument_values
await task(createTilesScrollPerfTest(enableImpeller: true)); await task(createTilesScrollPerfTest(enableImpeller: true));
} }
...@@ -15,6 +15,8 @@ import 'devices.dart'; ...@@ -15,6 +15,8 @@ import 'devices.dart';
import 'host_agent.dart'; import 'host_agent.dart';
import 'task_result.dart'; import 'task_result.dart';
const bool kEnableImpellerDefault = true;
/// Virtual current working directory, which affect functions, such as [exec]. /// Virtual current working directory, which affect functions, such as [exec].
String cwd = Directory.current.path; String cwd = Directory.current.path;
...@@ -448,6 +450,9 @@ List<String> _flutterCommandArgs(String command, List<String> options) { ...@@ -448,6 +450,9 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
final String? localEngineSrcPath = localEngineSrcPathFromEnv; final String? localEngineSrcPath = localEngineSrcPathFromEnv;
return <String>[ return <String>[
command, command,
if (!command.contains('--enable-impeller')
&& deviceOperatingSystem == DeviceOperatingSystem.ios)
'--enable-impeller',
if (deviceOperatingSystem == DeviceOperatingSystem.ios && supportedDeviceTimeoutCommands.contains(command)) if (deviceOperatingSystem == DeviceOperatingSystem.ios && supportedDeviceTimeoutCommands.contains(command))
...<String>[ ...<String>[
'--device-timeout', '--device-timeout',
......
...@@ -28,7 +28,7 @@ TaskFunction createGalleryTransitionTest({bool semanticsEnabled = false}) { ...@@ -28,7 +28,7 @@ TaskFunction createGalleryTransitionTest({bool semanticsEnabled = false}) {
TaskFunction createGalleryTransitionE2EBuildTest( TaskFunction createGalleryTransitionE2EBuildTest(
List<String> args, { List<String> args, {
bool semanticsEnabled = false, bool semanticsEnabled = false,
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return GalleryTransitionBuildTest( return GalleryTransitionBuildTest(
args, args,
...@@ -44,7 +44,7 @@ TaskFunction createGalleryTransitionE2EBuildTest( ...@@ -44,7 +44,7 @@ TaskFunction createGalleryTransitionE2EBuildTest(
TaskFunction createGalleryTransitionE2ETest({ TaskFunction createGalleryTransitionE2ETest({
bool semanticsEnabled = false, bool semanticsEnabled = false,
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return GalleryTransitionTest( return GalleryTransitionTest(
testFile: semanticsEnabled testFile: semanticsEnabled
...@@ -91,7 +91,7 @@ class GalleryTransitionTest { ...@@ -91,7 +91,7 @@ class GalleryTransitionTest {
this.driverFile, this.driverFile,
this.measureCpuGpu = true, this.measureCpuGpu = true,
this.measureMemory = true, this.measureMemory = true,
this.enableImpeller = false, this.enableImpeller = kEnableImpellerDefault,
}); });
final bool semanticsEnabled; final bool semanticsEnabled;
...@@ -233,7 +233,7 @@ class GalleryTransitionBuildTest extends BuildTestTask { ...@@ -233,7 +233,7 @@ class GalleryTransitionBuildTest extends BuildTestTask {
this.driverFile, this.driverFile,
this.measureCpuGpu = true, this.measureCpuGpu = true,
this.measureMemory = true, this.measureMemory = true,
this.enableImpeller = false, this.enableImpeller = kEnableImpellerDefault,
}) : super(workingDirectory: galleryDirectory); }) : super(workingDirectory: galleryDirectory);
final bool semanticsEnabled; final bool semanticsEnabled;
......
...@@ -15,7 +15,7 @@ import '../microbenchmarks.dart'; ...@@ -15,7 +15,7 @@ import '../microbenchmarks.dart';
/// Creates a device lab task that runs benchmarks in /// Creates a device lab task that runs benchmarks in
/// `dev/benchmarks/microbenchmarks` reports results to the dashboard. /// `dev/benchmarks/microbenchmarks` reports results to the dashboard.
TaskFunction createMicrobenchmarkTask({bool enableImpeller = false}) { TaskFunction createMicrobenchmarkTask({bool enableImpeller = kEnableImpellerDefault}) {
return () async { return () async {
final Device device = await devices.workingDevice; final Device device = await devices.workingDevice;
await device.unlock(); await device.unlock();
......
...@@ -14,7 +14,7 @@ class NewGalleryPerfTest extends PerfTest { ...@@ -14,7 +14,7 @@ class NewGalleryPerfTest extends PerfTest {
this.galleryDir, { this.galleryDir, {
String timelineFileName = 'transitions', String timelineFileName = 'transitions',
String dartDefine = '', String dartDefine = '',
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
super.timeoutSeconds, super.timeoutSeconds,
}) : super( }) : super(
galleryDir.path, galleryDir.path,
......
...@@ -26,7 +26,7 @@ String _testOutputDirectory(String testDirectory) { ...@@ -26,7 +26,7 @@ String _testOutputDirectory(String testDirectory) {
TaskFunction createComplexLayoutScrollPerfTest({ TaskFunction createComplexLayoutScrollPerfTest({
bool measureCpuGpu = true, bool measureCpuGpu = true,
bool badScroll = false, bool badScroll = false,
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/complex_layout', '${flutterDirectory.path}/dev/benchmarks/complex_layout',
...@@ -39,7 +39,7 @@ TaskFunction createComplexLayoutScrollPerfTest({ ...@@ -39,7 +39,7 @@ TaskFunction createComplexLayoutScrollPerfTest({
).run; ).run;
} }
TaskFunction createTilesScrollPerfTest({bool enableImpeller = false}) { TaskFunction createTilesScrollPerfTest({bool enableImpeller = kEnableImpellerDefault}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/complex_layout', '${flutterDirectory.path}/dev/benchmarks/complex_layout',
'test_driver/scroll_perf.dart', 'test_driver/scroll_perf.dart',
...@@ -48,7 +48,7 @@ TaskFunction createTilesScrollPerfTest({bool enableImpeller = false}) { ...@@ -48,7 +48,7 @@ TaskFunction createTilesScrollPerfTest({bool enableImpeller = false}) {
).run; ).run;
} }
TaskFunction createUiKitViewScrollPerfTest({bool enableImpeller = false}) { TaskFunction createUiKitViewScrollPerfTest({bool enableImpeller = kEnableImpellerDefault}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/platform_views_layout', '${flutterDirectory.path}/dev/benchmarks/platform_views_layout',
'test_driver/uikit_view_scroll_perf.dart', 'test_driver/uikit_view_scroll_perf.dart',
...@@ -59,7 +59,7 @@ TaskFunction createUiKitViewScrollPerfTest({bool enableImpeller = false}) { ...@@ -59,7 +59,7 @@ TaskFunction createUiKitViewScrollPerfTest({bool enableImpeller = false}) {
).run; ).run;
} }
TaskFunction createUiKitViewScrollPerfNonIntersectingTest({bool enableImpeller = false}) { TaskFunction createUiKitViewScrollPerfNonIntersectingTest({bool enableImpeller = kEnableImpellerDefault}) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/platform_views_layout', '${flutterDirectory.path}/dev/benchmarks/platform_views_layout',
'test_driver/uikit_view_scroll_perf_non_intersecting.dart', 'test_driver/uikit_view_scroll_perf_non_intersecting.dart',
...@@ -138,7 +138,7 @@ TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupTest() { ...@@ -138,7 +138,7 @@ TaskFunction createFlutterGalleryTransitionsPerfSkSLWarmupTest() {
TaskFunction createBackdropFilterPerfTest({ TaskFunction createBackdropFilterPerfTest({
bool measureCpuGpu = true, bool measureCpuGpu = true,
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
...@@ -182,7 +182,7 @@ TaskFunction createPostBackdropFilterPerfTest({bool measureCpuGpu = true}) { ...@@ -182,7 +182,7 @@ TaskFunction createPostBackdropFilterPerfTest({bool measureCpuGpu = true}) {
TaskFunction createSimpleAnimationPerfTest({ TaskFunction createSimpleAnimationPerfTest({
bool measureCpuGpu = true, bool measureCpuGpu = true,
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
...@@ -363,7 +363,7 @@ TaskFunction createFullscreenTextfieldPerfTest() { ...@@ -363,7 +363,7 @@ TaskFunction createFullscreenTextfieldPerfTest() {
} }
TaskFunction createFullscreenTextfieldPerfE2ETest({ TaskFunction createFullscreenTextfieldPerfE2ETest({
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest.e2e( return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
...@@ -389,7 +389,7 @@ TaskFunction createColorFilterAndFadePerfTest() { ...@@ -389,7 +389,7 @@ TaskFunction createColorFilterAndFadePerfTest() {
).run; ).run;
} }
TaskFunction createColorFilterAndFadePerfE2ETest({bool enableImpeller = false}) { TaskFunction createColorFilterAndFadePerfE2ETest({bool enableImpeller = kEnableImpellerDefault}) {
return PerfTest.e2e( return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test/color_filter_and_fade_perf_e2e.dart', 'test/color_filter_and_fade_perf_e2e.dart',
...@@ -436,7 +436,7 @@ TaskFunction createFadingChildAnimationPerfTest() { ...@@ -436,7 +436,7 @@ TaskFunction createFadingChildAnimationPerfTest() {
} }
TaskFunction createImageFilteredTransformAnimationPerfTest({ TaskFunction createImageFilteredTransformAnimationPerfTest({
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest( return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
...@@ -455,7 +455,7 @@ TaskFunction createsMultiWidgetConstructPerfE2ETest() { ...@@ -455,7 +455,7 @@ TaskFunction createsMultiWidgetConstructPerfE2ETest() {
).run; ).run;
} }
TaskFunction createListTextLayoutPerfE2ETest({bool enableImpeller = false}) { TaskFunction createListTextLayoutPerfE2ETest({bool enableImpeller = kEnableImpellerDefault}) {
return PerfTest.e2e( return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test/list_text_layout_perf_e2e.dart', 'test/list_text_layout_perf_e2e.dart',
...@@ -629,7 +629,7 @@ TaskFunction createGradientStaticPerfE2ETest() { ...@@ -629,7 +629,7 @@ TaskFunction createGradientStaticPerfE2ETest() {
} }
TaskFunction createAnimatedComplexOpacityPerfE2ETest({ TaskFunction createAnimatedComplexOpacityPerfE2ETest({
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest.e2e( return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
...@@ -639,7 +639,7 @@ TaskFunction createAnimatedComplexOpacityPerfE2ETest({ ...@@ -639,7 +639,7 @@ TaskFunction createAnimatedComplexOpacityPerfE2ETest({
} }
TaskFunction createAnimatedComplexImageFilteredPerfE2ETest({ TaskFunction createAnimatedComplexImageFilteredPerfE2ETest({
bool enableImpeller = false, bool enableImpeller = kEnableImpellerDefault,
}) { }) {
return PerfTest.e2e( return PerfTest.e2e(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks', '${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
...@@ -939,7 +939,7 @@ class PerfTest { ...@@ -939,7 +939,7 @@ class PerfTest {
String? resultFilename, String? resultFilename,
this.device, this.device,
this.flutterDriveCallback, this.flutterDriveCallback,
this.enableImpeller = false, this.enableImpeller = kEnableImpellerDefault,
this.timeoutSeconds, this.timeoutSeconds,
}): _resultFilename = resultFilename; }): _resultFilename = resultFilename;
...@@ -955,7 +955,7 @@ class PerfTest { ...@@ -955,7 +955,7 @@ class PerfTest {
String resultFilename = 'e2e_perf_summary', String resultFilename = 'e2e_perf_summary',
this.device, this.device,
this.flutterDriveCallback, this.flutterDriveCallback,
this.enableImpeller = false, this.enableImpeller = kEnableImpellerDefault,
this.timeoutSeconds, this.timeoutSeconds,
}) : saveTraceFile = false, timelineFileName = null, _resultFilename = resultFilename; }) : saveTraceFile = false, timelineFileName = null, _resultFilename = resultFilename;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment