mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 18:08:58 +00:00
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:
parent
f38c6a6a8c
commit
f81ec133cd
@ -583,12 +583,22 @@ BasicTiledThebesLayer::PaintThebes(gfxContext* aContext,
|
|||||||
nsIntRegion lowPrecisionInvalidRegion;
|
nsIntRegion lowPrecisionInvalidRegion;
|
||||||
lowPrecisionInvalidRegion.Sub(mVisibleRegion, mLowPrecisionValidRegion);
|
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()) {
|
if (!lowPrecisionInvalidRegion.IsEmpty()) {
|
||||||
updatedLowPrecision =
|
updatedLowPrecision =
|
||||||
ProgressiveUpdate(mLowPrecisionTiledBuffer, mLowPrecisionValidRegion,
|
ProgressiveUpdate(mLowPrecisionTiledBuffer, mLowPrecisionValidRegion,
|
||||||
lowPrecisionInvalidRegion, oldValidRegion, transform,
|
lowPrecisionInvalidRegion, oldValidRegion, transform,
|
||||||
scrollOffset, resolution, aCallback, aCallbackData);
|
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()) {
|
} else if (!mLowPrecisionValidRegion.IsEmpty()) {
|
||||||
// Clear the low precision tiled buffer
|
// Clear the low precision tiled buffer
|
||||||
clearedLowPrecision = true;
|
clearedLowPrecision = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user