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 341883 02e9aeb2797307e4ac68ceaed3b3c1c0644da8ec
parent 341882 0b0baefc7f44e41a4b1be47eab65b991be40b255
child 341884 a5b1d40aa344f53215c8b76c03bbe9ea6b77717d
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, gchang
bugs1284553
milestone49.0a2
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);