mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1043929 - Unlock the mask texture in case of failure. r=Bas
This commit is contained in:
parent
0701665f10
commit
b0759630b1
@ -147,12 +147,23 @@ CompositableHost::AddMaskEffect(EffectChain& aEffects,
|
||||
{
|
||||
RefPtr<TextureSource> source;
|
||||
RefPtr<TextureHost> host = GetAsTextureHost();
|
||||
if (host && host->Lock()) {
|
||||
source = host->GetTextureSources();
|
||||
|
||||
if (!host) {
|
||||
NS_WARNING("Using compositable with no valid TextureHost as mask");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!host->Lock()) {
|
||||
NS_WARNING("Failed to lock the mask texture");
|
||||
return false;
|
||||
}
|
||||
|
||||
source = host->GetTextureSources();
|
||||
MOZ_ASSERT(source);
|
||||
|
||||
if (!source) {
|
||||
NS_WARNING("Using compositable with no texture host as mask layer");
|
||||
NS_WARNING("The TextureHost was successfully locked but can't provide a TextureSource");
|
||||
host->Unlock();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user