[Layers] Clear WrappingTextureSourceYCbCrBasic::mTexture correctly

pull/24/head
sotaro 3 years ago committed by Roy Tam
parent 47cc63bc6c
commit 088c5a329d
  1. 8
      gfx/layers/composite/TextureHost.cpp

@ -555,6 +555,14 @@ void
BufferTextureHost::DeallocateDeviceData()
{
if (mFirstSource && mFirstSource->NumCompositableRefs() > 0) {
// WrappingTextureSourceYCbCrBasic wraps YUV format BufferTextureHost.
// When BufferTextureHost is destroyed, data of
// WrappingTextureSourceYCbCrBasic becomes invalid.
if (mFirstSource->AsWrappingTextureSourceYCbCrBasic() &&
mFirstSource->IsOwnedBy(this)) {
mFirstSource->SetOwner(nullptr);
mFirstSource->DeallocateDeviceData();
}
return;
}

Loading…
Cancel
Save