[web] Enable platform view benchmarks in Skwasm (#160186)

Skwasm has support for platform views already. Let's enable those
benchmarks.
This commit is contained in:
Mouad Debbar 2024-12-12 15:32:27 -05:00 committed by GitHub
parent 688dee4c61
commit dd437c7a60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,8 +36,6 @@ import 'src/web/recorder.dart';
typedef RecorderFactory = Recorder Function(); typedef RecorderFactory = Recorder Function();
const bool isSkwasm = bool.fromEnvironment('FLUTTER_WEB_USE_SKWASM');
/// List of all benchmarks that run in the devicelab. /// List of all benchmarks that run in the devicelab.
/// ///
/// When adding a new benchmark, add it to this map. Make sure that the name /// When adding a new benchmark, add it to this map. Make sure that the name
@ -69,12 +67,8 @@ final Map<String, RecorderFactory> benchmarks = <String, RecorderFactory>{
BenchMouseRegionGridHover.benchmarkName: () => BenchMouseRegionGridHover(), BenchMouseRegionGridHover.benchmarkName: () => BenchMouseRegionGridHover(),
BenchMouseRegionMixedGridHover.benchmarkName: () => BenchMouseRegionMixedGridHover(), BenchMouseRegionMixedGridHover.benchmarkName: () => BenchMouseRegionMixedGridHover(),
BenchWrapBoxScroll.benchmarkName: () => BenchWrapBoxScroll(), BenchWrapBoxScroll.benchmarkName: () => BenchWrapBoxScroll(),
if (!isSkwasm) ...<String, RecorderFactory>{ BenchPlatformViewInfiniteScroll.benchmarkName: () => BenchPlatformViewInfiniteScroll.forward(),
// Platform views are not yet supported with Skwasm. BenchPlatformViewInfiniteScroll.benchmarkNameBackward: () => BenchPlatformViewInfiniteScroll.backward(),
// https://github.com/flutter/flutter/issues/126346
BenchPlatformViewInfiniteScroll.benchmarkName: () => BenchPlatformViewInfiniteScroll.forward(),
BenchPlatformViewInfiniteScroll.benchmarkNameBackward: () => BenchPlatformViewInfiniteScroll.backward(),
},
BenchMaterial3Components.benchmarkName: () => BenchMaterial3Components(), BenchMaterial3Components.benchmarkName: () => BenchMaterial3Components(),
BenchMaterial3Semantics.benchmarkName: () => BenchMaterial3Semantics(), BenchMaterial3Semantics.benchmarkName: () => BenchMaterial3Semantics(),
BenchMaterial3ScrollSemantics.benchmarkName: () => BenchMaterial3ScrollSemantics(), BenchMaterial3ScrollSemantics.benchmarkName: () => BenchMaterial3ScrollSemantics(),