mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 00:31:27 +00:00
Bug 1366502 - Make sure all wrapped textureHosts doesn't use TextureFlags::DEALLOCATE_CLIENT flag. v2. r=sotaro
MozReview-Commit-ID: KjZIGRzRomT
This commit is contained in:
parent
2075e5b4a5
commit
efa30c7964
@ -27,6 +27,15 @@ WebRenderTextureHost::WebRenderTextureHost(const SurfaceDescriptor& aDesc,
|
||||
, mExternalImageId(aExternalImageId)
|
||||
, mIsWrappingNativeHandle(false)
|
||||
{
|
||||
// The wrapped textureHost will be used in WebRender, and the WebRender could
|
||||
// run at another thread. It's hard to control the life-time when gecko
|
||||
// receives PTextureParent destroy message. It's possible that textureHost is
|
||||
// still used by WebRender. So, we only accept the textureHost without
|
||||
// DEALLOCATE_CLIENT flag here. If the buffer deallocation is controlled by
|
||||
// parent, we could do something to make sure the wrapped textureHost is not
|
||||
// used by WebRender and then release it.
|
||||
MOZ_ASSERT(!(aFlags & TextureFlags::DEALLOCATE_CLIENT));
|
||||
|
||||
MOZ_COUNT_CTOR(WebRenderTextureHost);
|
||||
mWrappedTextureHost = aTexture;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user