Bug 783368 - Don't duplicate high precision rendering in low precision region. r=bgirard

Don't render valid high precision region in the low precision buffer.
This commit is contained in:
Chris Lord 2012-11-21 19:16:52 +00:00
parent f38c6a6a8c
commit f81ec133cd

View File

@ -583,12 +583,22 @@ BasicTiledThebesLayer::PaintThebes(gfxContext* aContext,
nsIntRegion lowPrecisionInvalidRegion;
lowPrecisionInvalidRegion.Sub(mVisibleRegion, mLowPrecisionValidRegion);
// Remove the valid high-precision region from the invalid low-precision
// region. We don't want to spend time drawing things twice.
nsIntRegion invalidHighPrecisionIntersect;
invalidHighPrecisionIntersect.And(lowPrecisionInvalidRegion, mValidRegion);
lowPrecisionInvalidRegion.Sub(lowPrecisionInvalidRegion, invalidHighPrecisionIntersect);
if (!lowPrecisionInvalidRegion.IsEmpty()) {
updatedLowPrecision =
ProgressiveUpdate(mLowPrecisionTiledBuffer, mLowPrecisionValidRegion,
lowPrecisionInvalidRegion, oldValidRegion, transform,
scrollOffset, resolution, aCallback, aCallbackData);
}
// Re-add the high-precision valid region intersection so that we can
// maintain coherency when the valid region changes.
lowPrecisionInvalidRegion.Or(lowPrecisionInvalidRegion, invalidHighPrecisionIntersect);
} else if (!mLowPrecisionValidRegion.IsEmpty()) {
// Clear the low precision tiled buffer
clearedLowPrecision = true;