mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
Bug 1438551 - When resizing single tile buffers be sure we don't mark the copied region as invalidated. r=nical
We discard and copy over data from the old tile when we resize a single tiled content client. For some reason we were not removing that region we successfully copied from the invalid region we would then set on the tile. This would cause us to do more work on following frames. For some other reason we were removing that region from the region we'd clear for non-opaque tiles. This commit changes it so we remove it from both. MozReview-Commit-ID: DIu1Y3jzV7Z --HG-- extra : rebase_source : 9c06482798823cf9ecb9be4937c6af9dd1ece6f2
This commit is contained in:
parent
ef9aefe363
commit
2108992f64
@ -188,10 +188,8 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
||||
|
||||
// If the old frontbuffer was discarded then attempt to copy what we
|
||||
// can from it to the new backbuffer.
|
||||
bool copiedFromDiscarded = false;
|
||||
nsIntRegion copyableRegion;
|
||||
|
||||
if (discardedFrontBuffer) {
|
||||
nsIntRegion copyableRegion;
|
||||
copyableRegion.And(aNewValidRegion, discardedValidRegion);
|
||||
copyableRegion.SubOut(aDirtyRegion);
|
||||
|
||||
@ -254,22 +252,17 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
||||
|
||||
// We don't need to repaint valid content that was just copied.
|
||||
paintRegion.SubOut(copyableRegion);
|
||||
copiedFromDiscarded = true;
|
||||
copyableRegion.MoveBy(-mTilingOrigin);
|
||||
tileDirtyRegion.SubOut(copyableRegion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mode != SurfaceMode::SURFACE_OPAQUE) {
|
||||
nsIntRegion regionToClear = tileDirtyRegion;
|
||||
if (copiedFromDiscarded) {
|
||||
copyableRegion.MoveBy(-mTilingOrigin);
|
||||
regionToClear.SubOut(copyableRegion);
|
||||
}
|
||||
|
||||
auto clear = CapturedTiledPaintState::Clear{
|
||||
dt,
|
||||
dtOnWhite,
|
||||
regionToClear,
|
||||
tileDirtyRegion,
|
||||
};
|
||||
|
||||
if (asyncPaint) {
|
||||
|
Loading…
Reference in New Issue
Block a user