Reduce paint time for Stocks drawer animation by 88%

Now we use a forced layer around the reprojected content of the drawer, which
means we don't have to re-record it during the slide animation. This saves 2ms
per frame.

The total main-thread time for the drawer animation is now 2.0ms.
This commit is contained in:
Adam Barth
2015-11-18 16:13:56 -08:00
parent ec5b1c1a96
commit 95eb66856e

View File

@@ -202,7 +202,9 @@ class _DrawerControllerState extends State<_DrawerController> {
widthFactor: _performance.progress,
child: new SizeObserver(
onSizeChanged: _handleSizeChanged,
child: config.child
child: new ForcedLayer(
child: config.child
)
)
)
)