Bug 1617751 - Ensure that GLScreenBuffer back buffer is created using the newly attached factory r=jgilbert

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Imanol Fernandez 2020-02-25 21:05:37 +00:00
Родитель 1f4f820274
Коммит eb9350894f
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -964,6 +964,20 @@ Maybe<ICRData> WebGLContext::InitializeCanvasRenderer(
gl->Screen()->Morph(std::move(factory));
bool needsResize = false;
#if defined(MOZ_WIDGET_ANDROID)
// If drawing buffer size and screen size are equal, the first back buffer
// will still be the one created with SurfaceFactory_Basic factory.
// We resize here to ensure that GLScreenBuffer back buffer
// is created using the newly attached factory.
// See bug #1617751
needsResize = true;
#endif
if (needsResize) {
const auto& size = DrawingBufferSize();
gl->Screen()->Resize({size.x, size.y});
}
mVRReady = true;
return Some(ret);
}