Bug 910878 - Remove gl.blit-draw-not-copy preference. r=gal
authorKyle Huey <khuey@kylehuey.com>
Thu, 05 Dec 2013 09:37:37 -0500
changeset 174605 b3b9e8733a5d6264bd184f217fe92097f078ed77
parent 174604 bd4960d0fddb4b57b0e0075b534b179330b99044
child 174606 49918ec6e0f851c639c27629a29dc328467208fc
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgal
bugs910878
milestone28.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 910878 - Remove gl.blit-draw-not-copy preference. r=gal
gfx/gl/GLBlitHelper.cpp
gfx/gl/GLBlitHelper.h
--- a/gfx/gl/GLBlitHelper.cpp
+++ b/gfx/gl/GLBlitHelper.cpp
@@ -15,19 +15,17 @@ namespace gl {
 GLBlitHelper::GLBlitHelper(GLContext* gl)
     : mGL(gl)
     , mTexBlit_Buffer(0)
     , mTexBlit_VertShader(0)
     , mTex2DBlit_FragShader(0)
     , mTex2DRectBlit_FragShader(0)
     , mTex2DBlit_Program(0)
     , mTex2DRectBlit_Program(0)
-    , mTexBlit_UseDrawNotCopy(false)
 {
-    mTexBlit_UseDrawNotCopy = Preferences::GetBool("gl.blit-draw-not-copy", false);
 }
 
 GLBlitHelper::~GLBlitHelper()
 {
     DeleteTexBlitProgram();
 }
 
 // Allowed to be destructive of state we restore in functions below.
@@ -485,25 +483,16 @@ void
 GLBlitHelper::BlitTextureToTexture(GLuint srcTex, GLuint destTex,
                                 const gfxIntSize& srcSize,
                                 const gfxIntSize& destSize,
                                 GLenum srcTarget, GLenum destTarget)
 {
     MOZ_ASSERT(mGL->fIsTexture(srcTex));
     MOZ_ASSERT(mGL->fIsTexture(destTex));
 
-    if (mTexBlit_UseDrawNotCopy) {
-        // Draw is texture->framebuffer
-        ScopedFramebufferForTexture destWrapper(mGL, destTex, destTarget);
-
-        BlitTextureToFramebuffer(srcTex, destWrapper.FB(),
-                                 srcSize, destSize, srcTarget);
-        return;
-    }
-
     // Generally, just use the CopyTexSubImage path
     ScopedFramebufferForTexture srcWrapper(mGL, srcTex, srcTarget);
 
     BlitFramebufferToTexture(srcWrapper.FB(), destTex,
                              srcSize, destSize, destTarget);
 }
 
 }
--- a/gfx/gl/GLBlitHelper.h
+++ b/gfx/gl/GLBlitHelper.h
@@ -25,18 +25,16 @@ class GLBlitHelper MOZ_FINAL
 
     GLuint mTexBlit_Buffer;
     GLuint mTexBlit_VertShader;
     GLuint mTex2DBlit_FragShader;
     GLuint mTex2DRectBlit_FragShader;
     GLuint mTex2DBlit_Program;
     GLuint mTex2DRectBlit_Program;
 
-    bool mTexBlit_UseDrawNotCopy;
-
     void UseBlitProgram();
     void SetBlitFramebufferForDestTexture(GLuint aTexture);
 
     bool UseTexQuadProgram(GLenum target, const nsIntSize& srcSize);
     bool InitTexQuadProgram(GLenum target = LOCAL_GL_TEXTURE_2D);
     void DeleteTexBlitProgram();
 
 public: