From 502d8c18c3c615b72912747a39f40d3ea13c5696 Mon Sep 17 00:00:00 2001 From: sotaro Date: Wed, 24 Mar 2021 23:49:36 +0000 Subject: [PATCH] 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 --- gfx/webrender_bindings/RenderCompositor.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gfx/webrender_bindings/RenderCompositor.cpp b/gfx/webrender_bindings/RenderCompositor.cpp index d5e0094f1a8c..789691c37137 100644 --- a/gfx/webrender_bindings/RenderCompositor.cpp +++ b/gfx/webrender_bindings/RenderCompositor.cpp @@ -162,6 +162,13 @@ UniquePtr 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); }