Enable fading animation during page transitions. (#21394)

The average frame time of page transitions on Moto G4 is now very
close to 16ms (the last 10 measurements on our dashboard are
between 15.5ms to 16.7ms and half of them are below 16ms).

It is now much faster than when we disabled it (which was at about
35ms). So I think that we should be able to enable it by default.
I'll leave the flag there until we implement the retained rendering
to bring the frame time comfortably below 16ms.

See https://github.com/flutter/flutter/issues/13736
This commit is contained in:
liyuqian
2018-09-06 09:26:52 -07:00
committed by GitHub
parent 3e7f8b8bb5
commit 6c4b38b707
8 changed files with 4 additions and 19 deletions

View File

@@ -14,8 +14,5 @@ void main() {
// Temporary debugging hook for https://github.com/flutter/flutter/issues/17888
debugInstrumentationEnabled = true;
// Overriding https://github.com/flutter/flutter/issues/13736 for better
// visual effect at the cost of performance.
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
runApp(const GalleryApp());
}

View File

@@ -10,6 +10,5 @@ void main() {
enableFlutterDriverExtension();
// As in lib/main.dart: overriding https://github.com/flutter/flutter/issues/13736
// for better visual effect at the cost of performance.
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
runApp(const GalleryApp(testMode: true));
}

View File

@@ -21,6 +21,5 @@ void main() {
enableFlutterDriverExtension(handler: _handleMessages);
// As in lib/main.dart: overriding https://github.com/flutter/flutter/issues/13736
// for better visual effect at the cost of performance.
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
runApp(const GalleryApp(testMode: true));
}

View File

@@ -28,7 +28,6 @@ class LifecycleObserver extends WidgetsBindingObserver {
}
Future<void> main() async {
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
runApp(const GalleryApp());
await endOfAnimation();
await new Future<Null>.delayed(const Duration(milliseconds: 50));

View File

@@ -23,7 +23,6 @@ Rect boundsFor(WidgetController controller, Finder item) {
}
Future<void> main() async {
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
final Completer<void> ready = new Completer<void>();
runApp(new GestureDetector(
onTap: () {