Bug 716332: Delete temporary fbo. r=joedrew
authorChris Jones <jones.chris.g@gmail.com>
Thu, 12 Jan 2012 16:27:34 -0800
changeset 85600 3db72233e5d92532b6883f14d3ec8d3e2b7909af
parent 85599 2cc49e58c516767e28ab2831f279a45b93d4976c
child 85601 d44e07a5db122adc171faa6fba4fc216807d24e7
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew
bugs716332
milestone12.0a1
Bug 716332: Delete temporary fbo. r=joedrew
gfx/layers/opengl/LayerManagerOGL.cpp
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -314,16 +314,22 @@ LayerManagerOGL::Initialize(nsRefPtr<GLC
      * extension -- the EXT variant does not provide support for
      * texture rectangle access inside GLSL (sampler2DRect,
      * texture2DRect).
      */
     if (!mGLContext->IsExtensionSupported(gl::GLContext::ARB_texture_rectangle))
       return false;
   }
 
+  // If we're double-buffered, we don't need this fbo anymore.
+  if (mGLContext->IsDoubleBuffered()) {
+    mGLContext->fDeleteFramebuffers(1, &mBackBufferFBO);
+    mBackBufferFBO = 0;
+  }
+
   // back to default framebuffer, to avoid confusion
   mGLContext->fBindFramebuffer(LOCAL_GL_FRAMEBUFFER, 0);
 
   /* Create a simple quad VBO */
 
   mGLContext->fGenBuffers(1, &mQuadVBO);
   mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, mQuadVBO);