flutter/dev/benchmarks/macrobenchmarks/lib/main.dart
liyuqian 8ad4cbe06e
Add cull opacity perf test to device lab (#25381)
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
2018-12-17 22:01:07 -08:00

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);
},
)
],
),
);
}
}