Backed out changeset f5a7724e2c03 for causing crash in Fennec. r=backout
authorAgi Sferro <agi@mozilla.com>
Thu, 21 Feb 2019 13:53:22 -0800
changeset 460419 1657fe18be9bc445c7838e3b4e93a9bfc4f85e7f
parent 460418 6f836dba1aedc6226435ddeab17c0e00f876d72d
child 460420 a6606e85276716b93695029cb914a678beb51708
push id35591
push userrgurzau@mozilla.com
push dateFri, 22 Feb 2019 05:28:27 +0000
treeherdermozilla-central@93c4470ee3af [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1529697
milestone67.0a1
backs outf5a7724e2c033902468d695a837c4e343bde1cfa
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
Backed out changeset f5a7724e2c03 for causing crash in Fennec. r=backout See https://bugzilla.mozilla.org/show_bug.cgi?id=1529697.
gfx/gl/GLScreenBuffer.cpp
gfx/thebes/gfxPrefs.h
--- a/gfx/gl/GLScreenBuffer.cpp
+++ b/gfx/gl/GLScreenBuffer.cpp
@@ -82,18 +82,22 @@ UniquePtr<GLScreenBuffer> 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)
-    factory =
-        SurfaceFactory_SurfaceTexture::Create(gl, caps, ipcChannel, flags);
+    if (XRE_IsParentProcess() && !gfxPrefs::WebGLSurfaceTextureEnabled()) {
+      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()) {
         factory = SurfaceFactory_EGLImage::Create(gl, caps, ipcChannel, flags);
       }
     }
 #endif
   } else if (useD3D) {
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -803,16 +803,17 @@ class gfxPrefs final {
                 WebGLDisableFailIfMajorPerformanceCaveat, bool, false);
   DECL_GFX_PREF(Live, "webgl.disable-DOM-blit-uploads",
                 WebGLDisableDOMBlitUploads, bool, false);
 
   DECL_GFX_PREF(Live, "webgl.disabled",                        WebGLDisabled, bool, false);
 
   DECL_GFX_PREF(Live, "webgl.enable-draft-extensions",         WebGLDraftExtensionsEnabled, bool, false);
   DECL_GFX_PREF(Live, "webgl.enable-privileged-extensions",    WebGLPrivilegedExtensionsEnabled, bool, false);
+  DECL_GFX_PREF(Live, "webgl.enable-surface-texture",          WebGLSurfaceTextureEnabled, bool, false);
   DECL_GFX_PREF(Live, "webgl.enable-webgl2",                   WebGL2Enabled, bool, true);
   DECL_GFX_PREF(Live, "webgl.force-enabled",                   WebGLForceEnabled, bool, false);
   DECL_GFX_PREF(Once, "webgl.force-layers-readback",           WebGLForceLayersReadback, bool, false);
   DECL_GFX_PREF(Live, "webgl.force-index-validation",          WebGLForceIndexValidation, int32_t, 0);
   DECL_GFX_PREF(Live, "webgl.lose-context-on-memory-pressure", WebGLLoseContextOnMemoryPressure, bool, false);
   DECL_GFX_PREF(Live, "webgl.max-contexts",                    WebGLMaxContexts, uint32_t, 32);
   DECL_GFX_PREF(Live, "webgl.max-contexts-per-principal",      WebGLMaxContextsPerPrincipal, uint32_t, 16);
   DECL_GFX_PREF(Live, "webgl.max-warnings-per-context",        WebGLMaxWarningsPerContext, uint32_t, 32);