Bug 1700532 - Block fallback from RenderCompositorOGLSWGL to RenderCompositorSWGL in RenderCompositor::Create() r=nical

On Android, we do not want to fallback from RenderCompositorOGLSWGL to RenderCompositorSWGL.

Differential Revision: https://phabricator.services.mozilla.com/D109573
This commit is contained in:
sotaro 2021-03-24 23:49:36 +00:00
parent ce45a5f8b7
commit 502d8c18c3

View File

@ -162,6 +162,13 @@ UniquePtr<RenderCompositor> RenderCompositor::Create(
if (comp) {
return comp;
}
#if defined(MOZ_WIDGET_ANDROID)
// On Android, we do not want to fallback from RenderCompositorOGLSWGL to
// RenderCompositorSWGL.
if (aWidget->GetCompositorOptions().AllowSoftwareWebRenderOGL()) {
return nullptr;
}
#endif
return RenderCompositorSWGL::Create(std::move(aWidget), aError);
}