mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

For https://github.com/flutter/flutter/issues/24712
This test verifies that https://github.com/flutter/engine/pull/6923 will speedup the average rasterize time of this test from ~150ms to ~10ms
Please see non-auto-generated files in 37b21d9fb4
43 lines
1.0 KiB
Dart
43 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'common.dart';
|
|
import 'src/cull_opacity.dart';
|
|
|
|
const String kMacrobenchmarks ='Macrobenchmarks';
|
|
|
|
void main() => runApp(MacrobenchmarksApp());
|
|
|
|
class MacrobenchmarksApp extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: kMacrobenchmarks,
|
|
initialRoute: '/',
|
|
routes: <String, WidgetBuilder>{
|
|
'/': (BuildContext context) => HomePage(),
|
|
kCullOpacityRouteName: (BuildContext context) => CullOpacityPage(),
|
|
},
|
|
);
|
|
}
|
|
}
|
|
|
|
class HomePage extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(title: const Text(kMacrobenchmarks)),
|
|
body: ListView(
|
|
children: <Widget>[
|
|
RaisedButton(
|
|
key: const Key(kCullOpacityRouteName),
|
|
child: const Text('Cull opacity'),
|
|
onPressed: (){
|
|
Navigator.pushNamed(context, kCullOpacityRouteName);
|
|
},
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|