Bug 860466: Properly deal with SharedTextureHostOGL. r=nical

There were a number of issues with the current implementation. It couldn't deal
with NULL mSharedHandles. Additionally it was binding things to the wrong
samplers. Finally it was not properly setting the texture transform (which
defaults to all 0). Finally in a debug build an assert would be hit upon client
shutdown due to it not clearing mDescriptor.

This patch fixes all of those issues which makes flash work again.
This commit is contained in:
Jeff Muizelaar
2013-04-11 19:42:26 -04:00
parent 649d0ce671
commit 35694508c6
5 changed files with 31 additions and 46 deletions

View File

@@ -25,10 +25,9 @@ TextureClientSharedOGL::ReleaseResources()
return;
}
MOZ_ASSERT(mDescriptor.type() == SurfaceDescriptor::TSharedTextureDescriptor);
SharedTextureDescriptor handle = mDescriptor.get_SharedTextureDescriptor();
if (mGL && handle.handle()) {
mGL->ReleaseSharedHandle(handle.shareType(), handle.handle());
}
mDescriptor = SurfaceDescriptor();
// It's important our handle gets released! SharedTextureHostOGL will take
// care of this for us though.
}
void