mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 900248. Don't assume success for effect creation. r=Bas
This commit is contained in:
parent
d3441a90be
commit
a5462f4e61
@ -229,7 +229,8 @@ CreateTexturedEffect(gfx::SurfaceFormat aFormat,
|
||||
result = new EffectYCbCr(aSource, aFilter);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("unhandled program type");
|
||||
NS_WARNING("unhandled program type");
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -91,6 +91,9 @@ ContentHostBase::Composite(EffectChain& aEffectChain,
|
||||
|
||||
RefPtr<TexturedEffect> effect =
|
||||
CreateTexturedEffect(mDeprecatedTextureHost, mDeprecatedTextureHostOnWhite, aFilter);
|
||||
if (!effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
aEffectChain.mPrimaryEffect = effect;
|
||||
|
||||
|
@ -86,6 +86,10 @@ ImageHost::Composite(EffectChain& aEffectChain,
|
||||
RefPtr<TexturedEffect> effect = CreateTexturedEffect(mFrontBuffer->GetFormat(),
|
||||
source,
|
||||
aFilter);
|
||||
if (!effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
aEffectChain.mPrimaryEffect = effect;
|
||||
IntSize textureSize = source->GetSize();
|
||||
gfx::Rect gfxPictureRect
|
||||
@ -288,6 +292,9 @@ DeprecatedImageHostSingle::Composite(EffectChain& aEffectChain,
|
||||
|
||||
RefPtr<TexturedEffect> effect =
|
||||
CreateTexturedEffect(mDeprecatedTextureHost, aFilter);
|
||||
if (!effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
aEffectChain.mPrimaryEffect = effect;
|
||||
|
||||
|
@ -184,6 +184,10 @@ TiledContentHost::RenderTile(const TiledTexture& aTile,
|
||||
|
||||
RefPtr<TexturedEffect> effect =
|
||||
CreateTexturedEffect(aTile.mDeprecatedTextureHost, aFilter);
|
||||
if (!effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (aTile.mDeprecatedTextureHost->Lock()) {
|
||||
aEffectChain.mPrimaryEffect = effect;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user