mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
[Layers] Clear WrappingTextureSourceYCbCrBasic::mTexture correctly
This commit is contained in:
parent
47cc63bc6c
commit
088c5a329d
1 changed files with 8 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue