diff options
author | sotaro <sotaro.ikeda.g@gmail.com> | 2020-02-14 10:46:53 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 12:42:53 +0200 |
commit | 76476ed75bbcf76c297b7f92188ad840f447f3f8 (patch) | |
tree | c6c21d5f10b4ad187d96b07fa565f15c1a715b33 | |
parent | 84fc500ff22c7bee3103b9e259dced27e165e0e0 (diff) | |
download | UXP-76476ed75bbcf76c297b7f92188ad840f447f3f8.tar UXP-76476ed75bbcf76c297b7f92188ad840f447f3f8.tar.gz UXP-76476ed75bbcf76c297b7f92188ad840f447f3f8.tar.lz UXP-76476ed75bbcf76c297b7f92188ad840f447f3f8.tar.xz UXP-76476ed75bbcf76c297b7f92188ad840f447f3f8.zip |
[Layers] Clear WrappingTextureSourceYCbCrBasic::mTexture correctly
-rw-r--r-- | gfx/layers/composite/TextureHost.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index b342f1d18..8df7af4a8 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/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; } |