Bug 1487001 - Use effective ScrollOffset to calculate visible rect of checkerboard. r=botond

--HG--
extra : source : 0509636cc5d54ee4abcc1864e69bc8d7aa29a3b0
This commit is contained in:
Sotaro Ikeda 2018-08-31 12:44:52 -04:00
Родитель 81b7f360a7
Коммит c48891ba19
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -3753,17 +3753,20 @@ bool AsyncPanZoomController::AdvanceAnimations(const TimeStamp& aSampleTime)
{
RecursiveMutexAutoLock lock(mRecursiveMutex);
requestAnimationFrame = UpdateAnimation(aSampleTime, &deferredTasks);
{ // scope lock
MutexAutoLock lock(mCheckerboardEventLock);
// Update RendertraceProperty before UpdateAnimation() call, since
// the UpdateAnimation() updates effective ScrollOffset for next frame
// if APZFrameDelay is enabled.
if (mCheckerboardEvent) {
mCheckerboardEvent->UpdateRendertraceProperty(
CheckerboardEvent::UserVisible,
CSSRect(Metrics().GetScrollOffset(),
CSSRect(GetEffectiveScrollOffset(AsyncPanZoomController::eForCompositing),
Metrics().CalculateCompositedSizeInCssPixels()));
}
}
requestAnimationFrame = UpdateAnimation(aSampleTime, &deferredTasks);
}
// Execute any deferred tasks queued up by mAnimation's Sample() (called by
@ -4028,7 +4031,7 @@ AsyncPanZoomController::GetCheckerboardMagnitude() const
{
RecursiveMutexAutoLock lock(mRecursiveMutex);
CSSPoint currentScrollOffset = Metrics().GetScrollOffset() + mTestAsyncScrollOffset;
CSSPoint currentScrollOffset = GetEffectiveScrollOffset(AsyncPanZoomController::eForCompositing) + mTestAsyncScrollOffset;
CSSRect painted = mLastContentPaintMetrics.GetDisplayPort() + mLastContentPaintMetrics.GetScrollOffset();
CSSRect visible = CSSRect(currentScrollOffset, Metrics().CalculateCompositedSizeInCssPixels());