Bug 1578330 - Call GetBufferSize after BeginFrame because RenderCompositorANGLE mutates it in BeginFrame. r=mattwoodrow

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-09-09 03:59:15 +00:00
Родитель a322625816
Коммит d603768670
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -120,10 +120,8 @@ bool RendererOGL::UpdateAndRender(const Maybe<gfx::IntSize>& aReadbackSize,
}
// XXX set clear color if MOZ_WIDGET_ANDROID is defined.
auto size = mCompositor->GetBufferSize();
if (mNativeLayerForEntireWindow) {
gfx::IntRect bounds(gfx::IntPoint(0, 0), size.ToUnknownSize());
gfx::IntRect bounds({}, mCompositor->GetBufferSize().ToUnknownSize());
mNativeLayerForEntireWindow->SetRect(bounds);
#ifdef XP_MACOSX
mNativeLayerForEntireWindow->SetOpaqueRegion(
@ -141,6 +139,8 @@ bool RendererOGL::UpdateAndRender(const Maybe<gfx::IntSize>& aReadbackSize,
wr_renderer_update(mRenderer);
auto size = mCompositor->GetBufferSize();
if (!wr_renderer_render(mRenderer, size.width, size.height, aHadSlowFrame,
aOutStats)) {
RenderThread::Get()->HandleWebRenderError(WebRenderError::RENDER);