summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-02-15 13:24:08 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-02-15 13:24:08 +0100
commit37c72d2fc3c8993628f2991a4bcaad510dbdc406 (patch)
tree5fcf2c79139f201d0161b4727a625322acb87a54 /gfx
parentd3c6522c48b90d5f746758bfac70f76b932f010f (diff)
parent9600e2dc87ca84994ef2867ae1e81428da05cd06 (diff)
downloadUXP-37c72d2fc3c8993628f2991a4bcaad510dbdc406.tar
UXP-37c72d2fc3c8993628f2991a4bcaad510dbdc406.tar.gz
UXP-37c72d2fc3c8993628f2991a4bcaad510dbdc406.tar.lz
UXP-37c72d2fc3c8993628f2991a4bcaad510dbdc406.tar.xz
UXP-37c72d2fc3c8993628f2991a4bcaad510dbdc406.zip
Merge branch 'release' into Pale_Moon-release
Diffstat (limited to 'gfx')
-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;
}