Bug 948955 - AddMaskEffect handles locking failure. r=bjacob

This commit is contained in:
Nicolas Silva 2013-12-11 18:32:41 +01:00
parent 07c26e237c
commit 7841da0a81
2 changed files with 5 additions and 5 deletions

View File

@ -136,13 +136,11 @@ CompositableHost::AddMaskEffect(EffectChain& aEffects,
{
RefPtr<TextureSource> source;
RefPtr<DeprecatedTextureHost> oldHost = GetDeprecatedTextureHost();
if (oldHost) {
oldHost->Lock();
if (oldHost && oldHost->Lock()) {
source = oldHost;
} else {
RefPtr<TextureHost> host = GetAsTextureHost();
if (host) {
host->Lock();
if (host && host->Lock()) {
source = host->GetTextureSources();
}
}

View File

@ -726,7 +726,9 @@ LayerManagerComposite::AutoAddMaskEffect::AutoAddMaskEffect(Layer* aMaskLayer,
gfx::Matrix4x4 transform;
ToMatrix4x4(aMaskLayer->GetEffectiveTransform(), transform);
mCompositable->AddMaskEffect(aEffects, transform, aIs3D);
if (!mCompositable->AddMaskEffect(aEffects, transform, aIs3D)) {
mCompositable = nullptr;
}
}
LayerManagerComposite::AutoAddMaskEffect::~AutoAddMaskEffect()