зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216355 - Ensure that if a repaint request is ignored due to a stale generation number the next repaint request doesn't get dropped. r=botond
--HG-- extra : commitid : 5Zh7BCHsJWF
This commit is contained in:
Родитель
3a98b54f34
Коммит
fba7cabf57
|
@ -2741,8 +2741,11 @@ void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics,
|
|||
fabsf(mLastPaintRequestMetrics.GetScrollOffset().y -
|
||||
aFrameMetrics.GetScrollOffset().y) < EPSILON &&
|
||||
aFrameMetrics.GetZoom() == mLastPaintRequestMetrics.GetZoom() &&
|
||||
fabsf(aFrameMetrics.GetViewport().width - mLastPaintRequestMetrics.GetViewport().width) < EPSILON &&
|
||||
fabsf(aFrameMetrics.GetViewport().height - mLastPaintRequestMetrics.GetViewport().height) < EPSILON) {
|
||||
fabsf(aFrameMetrics.GetViewport().width -
|
||||
mLastPaintRequestMetrics.GetViewport().width) < EPSILON &&
|
||||
fabsf(aFrameMetrics.GetViewport().height -
|
||||
mLastPaintRequestMetrics.GetViewport().height) < EPSILON &&
|
||||
aFrameMetrics.GetScrollGeneration() == mLastPaintRequestMetrics.GetScrollGeneration()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3190,8 +3193,14 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
|
|||
Stringify(mFrameMetrics.GetScrollOffset()).c_str(),
|
||||
Stringify(aLayerMetrics.GetSmoothScrollOffset()).c_str());
|
||||
|
||||
mFrameMetrics.CopySmoothScrollInfoFrom(aLayerMetrics);
|
||||
CancelAnimation();
|
||||
|
||||
// It's important to not send repaint requests between this
|
||||
// CopySmoothScrollInfo call and the sending of the scroll update
|
||||
// acknowledgement below, otherwise that repaint request will get rejected
|
||||
// on the main thread but mLastPaintRequestMetrics will have the new scroll
|
||||
// generation; this would leave the main thread out of date.
|
||||
mFrameMetrics.CopySmoothScrollInfoFrom(aLayerMetrics);
|
||||
mLastDispatchedPaintMetrics = aLayerMetrics;
|
||||
StartSmoothScroll(ScrollSource::DOM);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче