diff --git a/gfx/layers/opengl/ImageLayerOGL.cpp b/gfx/layers/opengl/ImageLayerOGL.cpp index 04fce61b8cc8..cc3818ecf8b3 100644 --- a/gfx/layers/opengl/ImageLayerOGL.cpp +++ b/gfx/layers/opengl/ImageLayerOGL.cpp @@ -960,6 +960,7 @@ ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer, const SurfaceDescriptorGralloc& desc = img->get_SurfaceDescriptor().get_SurfaceDescriptorGralloc(); sp graphicBuffer = GrallocBufferActor::GetFrom(desc); mSize = gfxIntSize(graphicBuffer->getWidth(), graphicBuffer->getHeight()); + mPictureRect = nsIntRect(0, 0, desc.size().width, desc.size().height); if (!mExternalBufferTexture.IsAllocated()) { mExternalBufferTexture.Allocate(gl()); } @@ -1025,14 +1026,17 @@ ShadowImageLayerOGL::RenderLayer(int aPreviousFrameBuffer, program->Activate(); program->SetLayerQuadRect(nsIntRect(0, 0, - mSize.width, mSize.height)); + mPictureRect.width, + mPictureRect.height)); program->SetLayerTransform(GetEffectiveTransform()); program->SetLayerOpacity(GetEffectiveOpacity()); program->SetRenderOffset(aOffset); program->SetTextureUnit(0); program->LoadMask(GetMaskLayer()); - mOGLManager->BindAndDrawQuad(program); + mOGLManager->BindAndDrawQuadWithTextureRect(program, + mPictureRect, + nsIntSize(mSize.width, mSize.height)); // Make sure that we release the underlying external image gl()->fActiveTexture(LOCAL_GL_TEXTURE0);