mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1238753 - Make BasicCompositor respect changes to mInvalidRegion through StartRemoteDrawingWithRegion properly. r=mattwoodrow
This commit is contained in:
parent
cd0059027e
commit
19ea6087bc
@ -530,9 +530,8 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
invalidRegionSafe.And(aInvalidRegion, intRect);
|
||||
}
|
||||
|
||||
IntRect invalidRect = invalidRegionSafe.GetBounds();
|
||||
mInvalidRect = IntRect(invalidRect.x, invalidRect.y, invalidRect.width, invalidRect.height);
|
||||
mInvalidRegion = invalidRegionSafe;
|
||||
mInvalidRect = mInvalidRegion.GetBounds();
|
||||
|
||||
if (aRenderBoundsOut) {
|
||||
*aRenderBoundsOut = Rect();
|
||||
@ -547,7 +546,9 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
// placeholder so that CreateRenderTarget() works.
|
||||
mDrawTarget = gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
|
||||
} else {
|
||||
// StartRemoteDrawingInRegion can mutate mInvalidRegion.
|
||||
mDrawTarget = mWidget->StartRemoteDrawingInRegion(mInvalidRegion);
|
||||
mInvalidRect = mInvalidRegion.GetBounds();
|
||||
}
|
||||
if (!mDrawTarget) {
|
||||
return;
|
||||
@ -566,10 +567,10 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
|
||||
// We only allocate a surface sized to the invalidated region, so we need to
|
||||
// translate future coordinates.
|
||||
mRenderTarget->mDrawTarget->SetTransform(Matrix::Translation(-invalidRect.x,
|
||||
-invalidRect.y));
|
||||
mRenderTarget->mDrawTarget->SetTransform(Matrix::Translation(-mInvalidRect.x,
|
||||
-mInvalidRect.y));
|
||||
|
||||
gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget, invalidRegionSafe);
|
||||
gfxUtils::ClipToRegion(mRenderTarget->mDrawTarget, mInvalidRegion);
|
||||
|
||||
if (aRenderBoundsOut) {
|
||||
*aRenderBoundsOut = rect;
|
||||
|
Loading…
Reference in New Issue
Block a user