зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1487001
- Use effective ScrollOffset to calculate visible rect of checkerboard. r=botond
--HG-- extra : source : 0509636cc5d54ee4abcc1864e69bc8d7aa29a3b0
This commit is contained in:
Родитель
81b7f360a7
Коммит
c48891ba19
|
@ -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());
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче