Bug 1021085 - Inflate the painted rect a bit to deal with rounding error. r=Cwiiis

This commit is contained in:
Kartikaya Gupta 2014-06-23 08:42:19 -04:00
parent 1f7f22dbb7
commit ab1b3da0d8

View File

@ -237,6 +237,9 @@ SharedFrameMetricsHelper::AboutToCheckerboard(const FrameMetrics& aContentMetric
CSSRect painted =
(aContentMetrics.mCriticalDisplayPort.IsEmpty() ? aContentMetrics.mDisplayPort : aContentMetrics.mCriticalDisplayPort)
+ aContentMetrics.GetScrollOffset();
// Inflate painted by some small epsilon to deal with rounding
// error. We should replace this with a FuzzyContains function.
painted.Inflate(0.01f);
CSSRect showing = CSSRect(aCompositorMetrics.GetScrollOffset(), aCompositorMetrics.CalculateBoundedCompositedSizeInCssPixels());
return !painted.Contains(showing);
}