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:
Markus Stange 2016-01-12 13:27:14 +01:00
parent 75980192fc
commit bf24047145

View File

@ -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;
}