mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1238753 - Don't skip the call to StartRemoteDrawing in from BasicCompositor::BeginFrame if the invalid region is empty. r=mattwoodrow
Sometimes we need a composition even if nothing has changed, for example for window resizes on Mac. LayerManagerComposite::UpdateAndRender() already has a check that skips the call to BasicCompositor if it's not necessary.
This commit is contained in:
parent
75980192fc
commit
bf24047145
@ -537,10 +537,6 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
*aRenderBoundsOut = Rect();
|
||||
}
|
||||
|
||||
if (mInvalidRect.width <= 0 || mInvalidRect.height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mTarget) {
|
||||
// If we have a copy target, then we don't have a widget-provided mDrawTarget (currently). Use a dummy
|
||||
// placeholder so that CreateRenderTarget() works.
|
||||
@ -549,8 +545,13 @@ BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
// StartRemoteDrawingInRegion can mutate mInvalidRegion.
|
||||
mDrawTarget = mWidget->StartRemoteDrawingInRegion(mInvalidRegion);
|
||||
mInvalidRect = mInvalidRegion.GetBounds();
|
||||
if (mInvalidRect.IsEmpty()) {
|
||||
mWidget->EndRemoteDrawingInRegion(mDrawTarget, mInvalidRegion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!mDrawTarget) {
|
||||
|
||||
if (!mDrawTarget || mInvalidRect.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user