Commit 148f24bb authored by JerryShih's avatar JerryShih
Browse files

Bug 1366502 - Make sure all wrapped textureHosts doesn't use...

Bug 1366502 - Make sure all wrapped textureHosts doesn't use TextureFlags::DEALLOCATE_CLIENT flag. v2. r=sotaro

MozReview-Commit-ID: KjZIGRzRomT
parent 6c0b9a57
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;