Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests. r=botond, a=gchang
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 06 Jul 2016 15:19:23 -0400
changeset 333596 60d09be974d615ae5c7fa1129516dbd0a6884dc5
parent 333595 81a80d0c67a60eb82624a13be4d0d8851f9f09e1
child 333597 78ceb0e9fde26c86242495efc4544d8b440e6e5c
push id6185
push usercbook@mozilla.com
push dateFri, 08 Jul 2016 07:53:48 +0000
treeherdermozilla-beta@60d09be974d6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, gchang
bugs1284553
milestone48.0
Bug 1284553 - Use a fuzzy-compare for the presShell resolution so that negligible differences don't block all repaint requests. r=botond, a=gchang MozReview-Commit-ID: LtxP7HGGRXn
gfx/layers/apz/util/APZCCallbackHelper.cpp
--- a/gfx/layers/apz/util/APZCCallbackHelper.cpp
+++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp
@@ -244,17 +244,17 @@ APZCCallbackHelper::UpdateRootFrame(Fram
     // to be returned by window.innerWidth/innerHeight (see bug 1187792).
 
     float presShellResolution = shell->GetResolution();
 
     // If the pres shell resolution has changed on the content side side
     // the time this repaint request was fired, consider this request out of date
     // and drop it; setting a zoom based on the out-of-date resolution can have
     // the effect of getting us stuck with the stale resolution.
-    if (presShellResolution != aMetrics.GetPresShellResolution()) {
+    if (!FuzzyEqualsMultiplicative(presShellResolution, aMetrics.GetPresShellResolution())) {
       return;
     }
 
     // The pres shell resolution is updated by the the async zoom since the
     // last paint.
     presShellResolution = aMetrics.GetPresShellResolution()
                         * aMetrics.GetAsyncZoom().scale;
     shell->SetResolutionAndScaleTo(presShellResolution);