mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1186911 - Fix progressive paint when using tiled-drawtarget. r=nical
The commit for bug 1176077 did not correctly handle the code path for when both progressive paint and tiled-drawtarget are enabled. This fixes it.
This commit is contained in:
parent
a232c81262
commit
aadf5f2161
@ -953,7 +953,7 @@ ClientTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
||||
js::ProfileEntry::Category::GRAPHICS);
|
||||
|
||||
mNewValidRegion = aNewValidRegion;
|
||||
Update(aNewValidRegion, aPaintRegion);
|
||||
Update(aNewValidRegion, aPaintRegion, aDirtyRegion);
|
||||
|
||||
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
|
||||
if (PR_IntervalNow() - start > 10) {
|
||||
@ -1049,7 +1049,8 @@ void PadDrawTargetOutFromRegion(RefPtr<DrawTarget> drawTarget, nsIntRegion ®i
|
||||
}
|
||||
|
||||
void
|
||||
ClientTiledLayerBuffer::PostValidate(const nsIntRegion& aPaintRegion)
|
||||
ClientTiledLayerBuffer::PostValidate(const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion)
|
||||
{
|
||||
if (gfxPrefs::TiledDrawTargetEnabled() && mMoz2DTiles.size() > 0) {
|
||||
gfx::TileSet tileset;
|
||||
@ -1065,7 +1066,7 @@ ClientTiledLayerBuffer::PostValidate(const nsIntRegion& aPaintRegion)
|
||||
ctx->SetMatrix(
|
||||
ctx->CurrentMatrix().Scale(mResolution, mResolution).Translate(ThebesPoint(-mTilingOrigin)));
|
||||
|
||||
mCallback(mPaintedLayer, ctx, aPaintRegion, aPaintRegion,
|
||||
mCallback(mPaintedLayer, ctx, aPaintRegion, aDirtyRegion,
|
||||
DrawRegionClip::DRAW, nsIntRegion(), mCallbackData);
|
||||
mMoz2DTiles.clear();
|
||||
// Reset:
|
||||
@ -1095,7 +1096,8 @@ ClientTiledLayerBuffer::UnlockTile(TileClient& aTile)
|
||||
}
|
||||
|
||||
void ClientTiledLayerBuffer::Update(const nsIntRegion& newValidRegion,
|
||||
const nsIntRegion& aPaintRegion)
|
||||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion)
|
||||
{
|
||||
const IntSize scaledTileSize = GetScaledTileSize();
|
||||
const gfx::IntRect newBounds = newValidRegion.GetBounds();
|
||||
@ -1148,7 +1150,7 @@ void ClientTiledLayerBuffer::Update(const nsIntRegion& newValidRegion,
|
||||
}
|
||||
}
|
||||
|
||||
PostValidate(aPaintRegion);
|
||||
PostValidate(aPaintRegion, aDirtyRegion);
|
||||
|
||||
for (TileClient& tile : mRetainedTiles) {
|
||||
UnlockTile(tile);
|
||||
|
@ -419,7 +419,9 @@ public:
|
||||
LayerManager::DrawPaintedLayerCallback aCallback,
|
||||
void* aCallbackData);
|
||||
|
||||
void Update(const nsIntRegion& aNewValidRegion, const nsIntRegion& aPaintRegion);
|
||||
void Update(const nsIntRegion& aNewValidRegion,
|
||||
const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion);
|
||||
|
||||
void ReadLock();
|
||||
|
||||
@ -449,7 +451,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
Update(nsIntRegion(), nsIntRegion());
|
||||
Update(nsIntRegion(), nsIntRegion(), nsIntRegion());
|
||||
mResolution = aResolution;
|
||||
}
|
||||
|
||||
@ -467,7 +469,8 @@ protected:
|
||||
const nsIntPoint& aTileRect,
|
||||
const nsIntRegion& dirtyRect);
|
||||
|
||||
void PostValidate(const nsIntRegion& aPaintRegion);
|
||||
void PostValidate(const nsIntRegion& aPaintRegion,
|
||||
const nsIntRegion& aDirtyRegion);
|
||||
|
||||
void UnlockTile(TileClient& aTile);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user