Bug 1576499 - Combine the two calls to BeginFrame. r=mattwoodrow

Depends on D43371

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-08-26 00:58:44 +00:00
Родитель 0e282ae078
Коммит eebce2e2ca
1 изменённых файлов: 6 добавлений и 12 удалений

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

@ -986,18 +986,12 @@ bool LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion,
}
IntRect actualBounds;
IntRect clipRect;
if (mRoot->GetClipRect()) {
clipRect = mRoot->GetClipRect()->ToUnknownRect();
mCompositor->BeginFrame(aInvalidRegion, &clipRect, mRenderBounds,
aOpaqueRegion, mNativeLayerForEntireWindow,
&actualBounds);
} else {
mCompositor->BeginFrame(aInvalidRegion, nullptr, mRenderBounds,
aOpaqueRegion, mNativeLayerForEntireWindow,
&actualBounds);
clipRect = actualBounds;
}
Maybe<IntRect> rootLayerClip = mRoot->GetClipRect().map(
[](const ParentLayerIntRect& r) { return r.ToUnknownRect(); });
mCompositor->BeginFrame(
aInvalidRegion, rootLayerClip ? &*rootLayerClip : nullptr, mRenderBounds,
aOpaqueRegion, mNativeLayerForEntireWindow, &actualBounds);
IntRect clipRect = rootLayerClip.valueOr(actualBounds);
#if defined(MOZ_WIDGET_ANDROID)
ScreenCoord offset = GetContentShiftForToolbar();
ScopedCompositorRenderOffset scopedOffset(mCompositor->AsCompositorOGL(),