flutter/packages/flutter_test
Greg Spencer 0509791663
Fix mouse hover to not schedule a frame for every mouse move. (#41014)
This fixes the mouse hover code to not schedule frames with every mouse move.

Before this, it would schedule a post frame callback, and then schedule a frame immediately, even if there was nothing that needed to be updated. Now it will schedule checks for mouse position updates synchronously, unless there's a new annotation, and skip scheduling a new frame in all cases. It has to be async in the case of a new annotation (i.e. a new MouseRegion is added), since when the annotation is added, it hasn't yet painted, and it can't hit test against the new layer until after the paint, so in that case it schedules a post frame callback, but since it's already building a frame when it does that, it doesn't need to schedule a frame.

The code also used to do mouse position checks for all mice if only one mouse changed position. I fixed this part too, so that it will only check position for the mouse that changed.
2019-09-26 13:13:42 -07:00
..
lib Fix mouse hover to not schedule a frame for every mouse move. (#41014) 2019-09-26 13:13:42 -07:00
test Allow test beds to override defaultTestTimeout (#40806) 2019-09-24 16:53:40 -07:00
BUILD.gn Update BUILD.gn for package:flutter_test (#38916) 2019-08-20 15:10:23 -07:00
pubspec.yaml ensure dart2js does not compile unsupported packages (#40368) 2019-09-12 15:25:21 -07:00