Bug 1018255 - Don't bother doing the computations in ApplyOverscrollEffect if we are not overscrolled. r=kats

--HG--
extra : source : 028af891515ee1093e889d20142f989cb19621b2
This commit is contained in:
Botond Ballo 2014-06-03 16:20:50 -04:00
parent 49f6fb288a
commit aa74c31159

View File

@ -1937,9 +1937,11 @@ bool AsyncPanZoomController::SampleContentTransformForFrame(const TimeStamp& aSa
aScrollOffset = mFrameMetrics.GetScrollOffset() * mFrameMetrics.GetZoom();
*aNewTransform = GetCurrentAsyncTransform();
// GetCurrentAsyncTransform() does not consider any overscroll we may have.
// Adjust the transform to account for that.
ApplyOverscrollEffect(aNewTransform);
if (IsOverscrolled()) {
// GetCurrentAsyncTransform() does not consider any overscroll we may have.
// Adjust the transform to account for that.
ApplyOverscrollEffect(aNewTransform);
}
LogRendertraceRect(GetGuid(), "viewport", "red",
CSSRect(mFrameMetrics.GetScrollOffset(),