-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core, darwin, android] Add onDidBecomeIdle to MapObserver. #13513
Conversation
@ChrisLoer |
platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
Outdated
Show resolved
Hide resolved
On iOS, CADisplayLink continually rerenders the map 60 or 120 times per second by default, irrespective of whether any re-placement is necessary. Does that mean the renderer will never idle on iOS? |
Note that our implementation of |
No, the mbgl core rendering itself idles. If it didn't, we'd be wasting a lot of energy! One related thing I noticed in manual testing, however, is that when you touch the screen to begin an interaction, the first touch will trigger a paint before there's actually any movement (which would trigger placement/animation/etc.). So if you drag the screen to pan somewhere, you see two idle events -- the first when you initially touch the screen, and the second when the pan is done and all animations have finished. This is right from the point of view of the renderer, but may be surprising to someone listening to the idle event. |
2ff808e
to
df7935b
Compare
didEnterIdle fires whenever render completes and no repaint is scheduled.
df7935b
to
9fc6f30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! LGTM
'didEnterIdle' fires whenever render completes and no repaint is scheduled.
Fixes issue #13469
Potential issues:
cc @tobrun @julianrex @ansis