зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1383912 - Ensure we always get a composite for the latest async scroll offset. r=kats
This fixes a regression with apz.frame_delay.enabled=true introduced in bug 1375949. MozReview-Commit-ID: AIcGA7c2Co0 --HG-- extra : rebase_source : b118a97674cadef1359e7658539e4e0e9cb785b8
This commit is contained in:
Родитель
d8e4797b60
Коммит
95d3464484
|
@ -3238,7 +3238,7 @@ bool AsyncPanZoomController::UpdateAnimation(const TimeStamp& aSampleTime,
|
|||
// Sample the composited async transform once per composite. Note that we
|
||||
// call this after the |mLastSampleTime == aSampleTime| check, to ensure
|
||||
// it's only called once per APZC on each composite.
|
||||
SampleCompositedAsyncTransform();
|
||||
bool needComposite = SampleCompositedAsyncTransform();
|
||||
|
||||
TimeDuration sampleTimeDelta = aSampleTime - mLastSampleTime;
|
||||
mLastSampleTime = aSampleTime;
|
||||
|
@ -3258,9 +3258,9 @@ bool AsyncPanZoomController::UpdateAnimation(const TimeStamp& aSampleTime,
|
|||
RequestContentRepaint();
|
||||
}
|
||||
UpdateSharedCompositorFrameMetrics();
|
||||
return true;
|
||||
needComposite = true;
|
||||
}
|
||||
return false;
|
||||
return needComposite;
|
||||
}
|
||||
|
||||
AsyncTransformComponentMatrix
|
||||
|
@ -3421,12 +3421,17 @@ AsyncPanZoomController::GetEffectiveZoom(AsyncTransformConsumer aMode) const
|
|||
return mFrameMetrics.GetZoom();
|
||||
}
|
||||
|
||||
void
|
||||
bool
|
||||
AsyncPanZoomController::SampleCompositedAsyncTransform()
|
||||
{
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
mCompositedScrollOffset = mFrameMetrics.GetScrollOffset();
|
||||
mCompositedZoom = mFrameMetrics.GetZoom();
|
||||
if (mCompositedScrollOffset != mFrameMetrics.GetScrollOffset() ||
|
||||
mCompositedZoom != mFrameMetrics.GetZoom()) {
|
||||
mCompositedScrollOffset = mFrameMetrics.GetScrollOffset();
|
||||
mCompositedZoom = mFrameMetrics.GetZoom();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AsyncTransformComponentMatrix
|
||||
|
|
|
@ -850,11 +850,14 @@ private:
|
|||
* |GetCurrentAsyncTransform(eForCompositing)| and similar functions reflect
|
||||
* the async scroll offset and zoom stored in |mFrameMetrics|.
|
||||
*
|
||||
* Returns true if the newly sampled value is different from the previously
|
||||
* sampled value.
|
||||
*
|
||||
* (This is only relevant when |gfxPrefs::APZFrameDelayEnabled() == true|.
|
||||
* Otherwise, GetCurrentAsyncTransform() always reflects what's stored in
|
||||
* |mFrameMetrics| immediately, without any delay.)
|
||||
*/
|
||||
void SampleCompositedAsyncTransform();
|
||||
bool SampleCompositedAsyncTransform();
|
||||
|
||||
/*
|
||||
* Helper functions to query the async scroll offset and zoom either
|
||||
|
|
Загрузка…
Ссылка в новой задаче