Bug 791364: Free canvas front buffers that are surface descriptors. r=gal

This commit is contained in:
Chris Jones 2012-09-17 17:56:04 -07:00
parent 5bb9436e76
commit 4935ae526e

View File

@ -428,6 +428,8 @@ ShadowCanvasLayerOGL::DestroyFrontBuffer()
SharedTextureDescriptor texDescriptor = mFrontBufferDescriptor.get_SharedTextureDescriptor(); SharedTextureDescriptor texDescriptor = mFrontBufferDescriptor.get_SharedTextureDescriptor();
gl()->ReleaseSharedHandle(texDescriptor.shareType(), texDescriptor.handle()); gl()->ReleaseSharedHandle(texDescriptor.shareType(), texDescriptor.handle());
mFrontBufferDescriptor = SurfaceDescriptor(); mFrontBufferDescriptor = SurfaceDescriptor();
} else if (IsSurfaceDescriptorValid(mFrontBufferDescriptor)) {
mAllocator->DestroySharedSurface(&mFrontBufferDescriptor);
} }
} }