Bug 892285 - Only unlock gralloc surfaces if they were locked, r=bas

This commit is contained in:
Michael Wu 2013-11-15 12:50:00 -05:00
parent b9a4a09408
commit e00f620c90

View File

@ -511,12 +511,13 @@ DeprecatedTextureClientShmem::LockDrawTarget()
void void
DeprecatedTextureClientShmem::Unlock() DeprecatedTextureClientShmem::Unlock()
{ {
if (mSurface) {
mSurface = nullptr; mSurface = nullptr;
mSurfaceAsImage = nullptr; mSurfaceAsImage = nullptr;
mDrawTarget = nullptr;
ShadowLayerForwarder::CloseDescriptor(mDescriptor); ShadowLayerForwarder::CloseDescriptor(mDescriptor);
} }
mDrawTarget = nullptr;
}
gfxImageSurface* gfxImageSurface*
DeprecatedTextureClientShmem::LockImageSurface() DeprecatedTextureClientShmem::LockImageSurface()