summaryrefslogtreecommitdiffstats
path: root/gfx/layers
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-15 13:24:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-15 13:24:38 +0100
commit39a3d75915ae6a150c4a2402210afea59bae0b15 (patch)
tree5a6ec08450b436a2f4a5bf93ef3faf3a9d635393 /gfx/layers
parent1a6fa0b0956700db90d8ebbfbe73a1fce12556cf (diff)
parent9600e2dc87ca84994ef2867ae1e81428da05cd06 (diff)
downloadUXP-2020.02.18.tar
UXP-2020.02.18.tar.gz
UXP-2020.02.18.tar.lz
UXP-2020.02.18.tar.xz
UXP-2020.02.18.zip
Merge branch 'release' into Basilisk-releasev2020.02.18
Diffstat (limited to 'gfx/layers')
-rw-r--r--gfx/layers/composite/TextureHost.cpp8
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;
}