diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index a89a3876680..648788745ab 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -179,6 +179,15 @@ DeprecatedTextureHost::SwapTextures(const SurfaceDescriptor& aImage, *aResult = *mBuffer; } *mBuffer = aImage; + // The following SetBuffer call was added in bug 912725 as a fix for the + // hacky fix introduced in gecko 23 for bug 862324. + // Note that it is a no-op in the generic case, but not for + // GrallocDeprecatedTextureHostOGL which overrides SetBuffer to make it + // register the TextureHost with the GrallocBufferActor. + // The reason why this SetBuffer calls is needed here is that just above we + // overwrote *mBuffer in place, so we need to tell the new mBuffer about this + // TextureHost. + SetBuffer(mBuffer, mDeAllocator); } #ifdef MOZ_LAYERS_HAVE_LOG diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index dd4c552c403..af0ccfded75 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -1077,10 +1077,6 @@ GrallocDeprecatedTextureHostOGL::SwapTexturesImpl(const SurfaceDescriptor& aImag DeleteTextures(); - // only done for hacky fix in gecko 23 for bug 862324. - // Doing this in SetBuffer is not enough, as DeprecatedImageHostBuffered::SwapTextures can - // change the value of *mBuffer without calling SetBuffer again. - RegisterDeprecatedTextureHostAtGrallocBufferActor(this, aImage); } gl::GLContext*