mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1189565 - Only factor in the async zoom change. r=kats
--HG-- extra : commitid : CjuuLbwyk5M
This commit is contained in:
parent
30a1ad2268
commit
2881f47a4c
@ -2844,7 +2844,14 @@ Matrix4x4 AsyncPanZoomController::GetTransformToLastDispatchedPaint() const {
|
||||
* mLastContentPaintMetrics.GetDevPixelsPerCSSPixel()
|
||||
* mLastContentPaintMetrics.GetCumulativeResolution();
|
||||
|
||||
gfxSize zoomChange = mLastContentPaintMetrics.GetZoom() / mLastDispatchedPaintMetrics.GetZoom();
|
||||
// We're interested in the async zoom change. Factor out the content scale
|
||||
// that may change when dragging the window to a monitor with a different
|
||||
// content scale.
|
||||
LayoutDeviceToParentLayerScale2D lastContentZoom =
|
||||
mLastContentPaintMetrics.GetZoom() / mLastContentPaintMetrics.GetDevPixelsPerCSSPixel();
|
||||
LayoutDeviceToParentLayerScale2D lastDispatchedZoom =
|
||||
mLastDispatchedPaintMetrics.GetZoom() / mLastDispatchedPaintMetrics.GetDevPixelsPerCSSPixel();
|
||||
gfxSize zoomChange = lastContentZoom / lastDispatchedZoom;
|
||||
|
||||
return Matrix4x4::Translation(scrollChange.x, scrollChange.y, 0).
|
||||
PostScale(zoomChange.width, zoomChange.height, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user