Bug 1576499 - Change where aClipRectOut is set, in two BeginFrame implementations. r=mattwoodrow

There are three circumstances that make these transformations equivalent:
 - aClipRectIn and aClipRectOut are never both non-null.
 - The value of *aClipRectOut is ignored if *aRenderBoundsOut is empty.
 - aRenderBounds.TopLeft() is always (0, 0) because the ClientLayerManager
   calls targetBounds.MoveTo(0, 0) on the rect that eventually becomes
   aRenderBounds.
   (targetBounds -> Transaction::mTargetBounds -> TargetConfig::naturalBounds()
    -> LayerManagerComposite::mRenderBounds)

Depends on D43367

Differential Revision: https://phabricator.services.mozilla.com/D43368

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-08-26 00:58:43 +00:00
Родитель 4b62be12b9
Коммит ec9eb77ab3
2 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -1036,14 +1036,14 @@ void BasicCompositor::BeginFrame(const nsIntRegion& aInvalidRegion,
if (aRenderBoundsOut) {
*aRenderBoundsOut = rect;
}
if (aClipRectOut) {
*aClipRectOut = rect;
}
if (aClipRectIn) {
mRenderTarget->mDrawTarget->PushClipRect(Rect(*aClipRectIn));
} else {
mRenderTarget->mDrawTarget->PushClipRect(Rect(rect));
if (aClipRectOut) {
*aClipRectOut = rect;
}
}
}

Просмотреть файл

@ -889,6 +889,9 @@ void CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
if (aRenderBoundsOut) {
*aRenderBoundsOut = rect;
}
if (aClipRectOut) {
*aClipRectOut = rect;
}
// We can't draw anything to something with no area
// so just return
@ -948,10 +951,6 @@ void CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
SetRenderTarget(rt);
mWindowRenderTarget = mCurrentRenderTarget;
if (aClipRectOut && !aClipRectIn) {
*aClipRectOut = IntRect(IntPoint(), rect.Size());
}
#if defined(MOZ_WIDGET_ANDROID)
if ((mSurfaceOrigin.x > 0) || (mSurfaceOrigin.y > 0)) {
mGLContext->fClearColor(