mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1610952 - Ensure webrender's async scroll offsets are in correct coordinate space. r=botond
For zoomable APZCs, we were correctly dividing the scroll offset by the pinch zoom scale. This is effectively equal to multiplying by the device pixel ratio then dividing by the zoom, converting the offset from parent layer space to layout device space. However, for non-zoomable APZCs, we were incorrectly assuming that the pinch zoom scale equalled 1.0. This was causing us to send incorrectly scaled async scroll offsets to webrender, resulting in content moving too slowly or quickly whilst asynchronously panning, then suddenly jumping as the synchronous scroll offset caught up. This is fixed by ensuring we always divide the asynchronous scroll offset by the pinch zoom scale, regardless of whether the APZC is zoomable or not. Differential Revision: https://phabricator.services.mozilla.com/D61315 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5db748537b
commit
e0d0ac8af5
@ -711,12 +711,12 @@ void APZCTreeManager::SampleForWebRender(wr::TransactionWrapper& aTxn,
|
||||
apzc->GetCurrentAsyncTransform(AsyncPanZoomController::eForCompositing,
|
||||
asyncTransformComponents)
|
||||
.mTranslation;
|
||||
LayoutDeviceToParentLayerScale zoom;
|
||||
LayoutDeviceToParentLayerScale zoom =
|
||||
apzc->GetCurrentPinchZoomScale(AsyncPanZoomController::eForCompositing);
|
||||
|
||||
if (Maybe<uint64_t> zoomAnimationId = apzc->GetZoomAnimationId()) {
|
||||
// for now we only support zooming on root content APZCs
|
||||
MOZ_ASSERT(apzc->IsRootContent());
|
||||
zoom = apzc->GetCurrentPinchZoomScale(
|
||||
AsyncPanZoomController::eForCompositing);
|
||||
|
||||
AsyncTransform asyncVisualTransform =
|
||||
apzc->GetCurrentAsyncTransform(AsyncPanZoomController::eForCompositing,
|
||||
|
Loading…
Reference in New Issue
Block a user