Strict render step to Map::render{Sync,Still} - #2207
brunoabinader wants to merge 0 commit into
Conversation
dd6702f to
a96c73b
Compare
|
Tested on Android (Samsung Galaxy S5) and iOS (iPad mini) 👍 |
a96c73b to
5c81c4a
Compare
|
This looks fine to me on iPhone 5 — user dot appeared to behave properly and update as expected. |
|
I don't think this is workable yet on iOS @brunoabinader. While I don't see a hard lag between native view draw location and GL frames, there still is some sort of out-of-sync-ness as the user dot "floats" a bit despite not changing actual geo location during animated pans. I just don't think that it is possible to have a satisfactory experience without this sort of flow:
This is why in Backstory: #1813 Last regression: #1904 |
|
Yeah, +1 to what @incanus said. This change has the effect of changing the sequence to:
This will result in desynced native views. It's possible that the following sequence would work:
This order makes more intuitive sense than updating TransformState post-draw. There was some reason we didn't do it this way to begin with, but I can't remember what it was. If you can make it work, I'm 👍. |
5c81c4a to
981de40
Compare
|
I am still seeing stuttering render problems and an extremely jittery user dot as of 981de40. The panning is rock solid now, but pinch-zooming with inertia ("pinch fling") causes the user dot to jitter a ton. The best way to replicate this class of problems is to use the Xcode simulated city locations, since they don't have any GPS variance and are hardcoded single geo points. This applies to device as well, so be sure to run on device from Xcode once without geo simulation if you want your original location and timezone back! 😉 |
|
I’m seeing this jitter without inertial zooming – just plain zooming. It also appears to be jittering by a fixed amount, so there’s no perceptible jitter at say z14. |
|
Confirmed the jitter is in I am otherwise 👍 here @brunoabinader as of 981de40 pending tests. I don't yet fully understand, but it sounds like the gist is that we swap the Nice work! |
|
You missed the opportunity to say "jitter bug" here, @incanus. |
Yes :-) |
981de40 to
9d4d314
Compare
|
@brunoabinader |
9d4d314 to
0ff7cf2
Compare



First, a little background: Map context thread is responsible for two main tasks:
Such tasks are independent and can be pipelined. However, only task
1can be called asynchronously, while task2needs to be done synchronously. Currently we have the following issues:a. Task
1causes2to be done outside of view invalidation call. Instead, we should always render inside view invalidation call.b. Task
1has to be manually triggered viaMap::nudgeTransitions()when a transition/animation is in progress. Instead, map context should be smart enough to trigger task1asynchronously after completion of task2.With that in mind, I propose the following fixes:
Map::nudgeTransitions; Render updates (step1) are now asynchronously triggered byMapContext::renderSyncwhenever required.MapData::{get,set}NeedsRepaint; This synchronisation flag is no longer required asMapContextshould be robust enough to asynchronously trigger a view invalidation (step2) if a transition/animation is in progress.MapContext. This is handy because while step2needs to be done synchronously betweenMapandMapContextthreads, view invalidation itself can happen asynchronously.Mapthread,Map::renderSyncmay call forMap::updateto trigger an asynchronous update ifTransformcontains a transition in progress./cc @tmpsantos @jfirebaugh @kkaefer @incanus