Bug 1532198 - Disable SurfaceFactory_EGLImage usage with WebRender on android r=nical
authorsotaro <sotaro.ikeda.g@gmail.com>
Mon, 04 Mar 2019 11:04:36 +0000
changeset 520098 ddd00855bb2a7a07645677c145a838f41ca47626
parent 520097 bdf8f1b6c789f8add6f9003a03728fa1580a8d53
child 520099 ff6d406ee71ffdb32d6baa052e82a593352b6c8f
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1532198
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1532198 - Disable SurfaceFactory_EGLImage usage with WebRender on android r=nical SurfaceFactory_EGLImage usage causes crash with WebRender on android. Differential Revision: https://phabricator.services.mozilla.com/D21880
gfx/gl/GLScreenBuffer.cpp
--- a/gfx/gl/GLScreenBuffer.cpp
+++ b/gfx/gl/GLScreenBuffer.cpp
@@ -83,17 +83,19 @@ UniquePtr<SurfaceFactory> GLScreenBuffer
     factory = SurfaceFactory_IOSurface::Create(gl, caps, ipcChannel, flags);
 #elif defined(MOZ_X11)
     if (sGLXLibrary.UseTextureFromPixmap())
       factory = SurfaceFactory_GLXDrawable::Create(gl, caps, ipcChannel, flags);
 #elif defined(MOZ_WIDGET_UIKIT)
     factory = MakeUnique<SurfaceFactory_GLTexture>(mGLContext, caps, ipcChannel,
                                                    mFlags);
 #elif defined(MOZ_WIDGET_ANDROID)
-    if (XRE_IsParentProcess() && !gfxPrefs::WebGLSurfaceTextureEnabled()) {
+    // XXX WebRender does not support SurfaceFactory_EGLImage usage.
+    if (XRE_IsParentProcess() && !gfxPrefs::WebGLSurfaceTextureEnabled() &&
+        backend != layers::LayersBackend::LAYERS_WR) {
       factory = SurfaceFactory_EGLImage::Create(gl, caps, ipcChannel, flags);
     } else {
       factory =
           SurfaceFactory_SurfaceTexture::Create(gl, caps, ipcChannel, flags);
     }
 #else
     if (gl->GetContextType() == GLContextType::EGL) {
       if (XRE_IsParentProcess()) {