Adds benchmark for rrect_blur. (#149261)

issue: https://github.com/flutter/flutter/issues/148496

![rrectblurbenchmark (2)](https://github.com/flutter/flutter/assets/30870216/ec849519-4619-4c2f-8bb3-8e0584c4566f)
(I slightly tweaked the animation to make sure the large radius blurs aren't always at the bottom of the screen).
This commit is contained in:
gaaclarke
2024-05-29 15:19:10 -07:00
committed by GitHub
parent bafdb124c7
commit ba5a4d8c09
9 changed files with 192 additions and 0 deletions

View File

@@ -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 'dart:async';
import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.android;
await task(createRRectBlurPerfTest(enableImpeller: true));
}

View File

@@ -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 'dart:async';
import 'package:flutter_devicelab/framework/devices.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/perf_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createRRectBlurPerfTest(enableImpeller: true));
}

View File

@@ -666,6 +666,21 @@ TaskFunction createAnimatedAdvancedBlendPerfTest({
).run;
}
TaskFunction createRRectBlurPerfTest({
bool? enableImpeller,
bool? forceOpenGLES,
}) {
return PerfTest(
'${flutterDirectory.path}/dev/benchmarks/macrobenchmarks',
'test_driver/run_app.dart',
'rrect_blur_test',
enableImpeller: enableImpeller,
forceOpenGLES: forceOpenGLES,
testDriver: 'test_driver/rrect_blur_perf_test.dart',
saveTraceFile: true,
).run;
}
TaskFunction createAnimatedBlurBackropFilterPerfTest({
bool? enableImpeller,
bool? forceOpenGLES,