mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1058664 - Update the LD transform to go with the changes in bug 1052063. r=botond
This commit is contained in:
parent
d544bf248c
commit
3f830a6a73
@ -2397,9 +2397,20 @@ Matrix4x4 AsyncPanZoomController::GetNontransientAsyncTransform() {
|
||||
|
||||
Matrix4x4 AsyncPanZoomController::GetTransformToLastDispatchedPaint() {
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
LayerPoint scrollChange = (mLastContentPaintMetrics.GetScrollOffset() - mLastDispatchedPaintMetrics.GetScrollOffset())
|
||||
* mLastContentPaintMetrics.LayersPixelsPerCSSPixel();
|
||||
|
||||
// Technically we should be taking the scroll delta in the coordinate space
|
||||
// of transformed layer pixels (i.e. this layer's LayerPixels, with the layer
|
||||
// transform applied). However in the absence of actual CSS transforms, we
|
||||
// can use the parent-layer space instead.
|
||||
// When we fix bug 993525 and properly support CSS transforms we might have
|
||||
// to revisit this.
|
||||
ParentLayerPoint scrollChange =
|
||||
(mLastContentPaintMetrics.GetScrollOffset() - mLastDispatchedPaintMetrics.GetScrollOffset())
|
||||
* mLastContentPaintMetrics.mDevPixelsPerCSSPixel
|
||||
* mLastContentPaintMetrics.GetParentResolution();
|
||||
|
||||
float zoomChange = mLastContentPaintMetrics.GetZoom().scale / mLastDispatchedPaintMetrics.GetZoom().scale;
|
||||
|
||||
return Matrix4x4().Translate(scrollChange.x, scrollChange.y, 0) *
|
||||
Matrix4x4().Scale(zoomChange, zoomChange, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user