зеркало из https://github.com/mozilla/gecko-dev.git
Bug 900248. Don't assume success for effect creation. r=Bas
This commit is contained in:
Родитель
d3441a90be
Коммит
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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче