Bug 975121 - Fix reversed colors with gfx.xrender.enabled = false. r=gal

This commit is contained in:
Morris Tseng 2014-02-24 10:09:55 -05:00
parent 594d4c7e5a
commit acfcb2590b

View File

@ -824,8 +824,15 @@ CompositorOGL::GetShaderConfigFor(Effect *aEffect, MaskType aMask) const
config.SetYCbCr(true);
break;
case EFFECT_COMPONENT_ALPHA:
{
config.SetComponentAlpha(true);
EffectComponentAlpha* effectComponentAlpha =
static_cast<EffectComponentAlpha*>(aEffect);
gfx::SurfaceFormat format = effectComponentAlpha->mOnWhite->GetFormat();
config.SetRBSwap(format == gfx::SurfaceFormat::B8G8R8A8 ||
format == gfx::SurfaceFormat::B8G8R8X8);
break;
}
case EFFECT_RENDER_TARGET:
config.SetTextureTarget(mFBOTextureTarget);
break;