зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1f4f820274
Коммит
eb9350894f
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче