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

@@ -94,6 +94,21 @@ FillWithMask(gfxContext* aContext, float aOpacity, Layer* aMaskLayer);
BasicImplData*
ToData(Layer* aLayer);
/**
* Returns the operator to be used when blending and compositing this layer.
* Currently there is no way to specify both a blending and a compositing
* operator other than normal and source over respectively.
*
* If the layer has
* an effective blend mode operator other than normal, as returned by
* GetEffectiveMixBlendMode, this operator is used for blending, and source
* over is used for compositing.
* If the blend mode for this layer is normal, the compositing operator
* returned by GetOperator is used.
*/
gfx::CompositionOp
GetEffectiveOperator(Layer* aLayer);
}
}