mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1643604 - Move the check for a resized layout viewport in NotifylayersUpdated to the non-first-paint case. r=kats
In the first-paint case, we are accepting the incoming scroll metadata wholesale, so most of the consequences of this code block will happen anyways -- except for the extra repaint, which is not actually needed and in fact undesirable in the first-paint case. Differential Revision: https://phabricator.services.mozilla.com/D79195
This commit is contained in:
parent
76be476529
commit
f91b39185b
@ -4553,15 +4553,6 @@ void AsyncPanZoomController::NotifyLayersUpdated(
|
||||
RepaintUpdateType contentRepaintType = RepaintUpdateType::eNone;
|
||||
bool viewportUpdated = false;
|
||||
|
||||
if (Metrics().GetLayoutViewport().Size() !=
|
||||
aLayerMetrics.GetLayoutViewport().Size()) {
|
||||
needContentRepaint = true;
|
||||
viewportUpdated = true;
|
||||
}
|
||||
if (viewportUpdated || scrollOffsetUpdated) {
|
||||
Metrics().SetLayoutViewport(aLayerMetrics.GetLayoutViewport());
|
||||
}
|
||||
|
||||
if ((aIsFirstPaint && aThisLayerTreeUpdated) || isDefault) {
|
||||
// Initialize our internal state to something sane when the content
|
||||
// that was just painted is something we knew nothing about previously
|
||||
@ -4590,6 +4581,15 @@ void AsyncPanZoomController::NotifyLayersUpdated(
|
||||
// in some things into our local Metrics() because these things are
|
||||
// determined by Gecko and our copy in Metrics() may be stale.
|
||||
|
||||
if (Metrics().GetLayoutViewport().Size() !=
|
||||
aLayerMetrics.GetLayoutViewport().Size()) {
|
||||
needContentRepaint = true;
|
||||
viewportUpdated = true;
|
||||
}
|
||||
if (viewportUpdated || scrollOffsetUpdated) {
|
||||
Metrics().SetLayoutViewport(aLayerMetrics.GetLayoutViewport());
|
||||
}
|
||||
|
||||
// TODO: Rely entirely on |aScrollMetadata.IsResolutionUpdated()| to
|
||||
// determine which branch to take, and drop the other conditions.
|
||||
if (FuzzyEqualsAdditive(Metrics().GetCompositionBounds().Width(),
|
||||
|
Loading…
Reference in New Issue
Block a user