Bug 952051 - Change the GetOperator call in FlushGroup to take into account the mix-blend-mode operator for the group. r=roc

Create a new GetEffectiveOperator function that also takes into acount the mix-blend-mode operator for basic layers. Replace logic that chooses between the effective mix blend mode and the operator returned by GetOperator, with calls to this function.
This commit is contained in:
Horia Iosif Olaru
2014-02-27 11:56:48 -05:00
parent bae47b93aa
commit d87bd0cb39
8 changed files with 43 additions and 22 deletions

View File

@@ -135,6 +135,18 @@ ToData(Layer* aLayer)
return static_cast<BasicImplData*>(aLayer->ImplData());
}
gfx::CompositionOp
GetEffectiveOperator(Layer* aLayer)
{
CompositionOp op = aLayer->GetEffectiveMixBlendMode();
if (op != CompositionOp::OP_OVER) {
return op;
}
return ToData(aLayer)->GetOperator();
}
ShadowableLayer*
ToShadowable(Layer* aLayer)
{