Bug 1210560 - Followup 3: Fix an assertion that can occur on mochitest bc4. r=jrmuizel on a CLOSED TREE

This commit is contained in:
Bas Schouten 2015-11-11 21:56:59 +01:00
parent 79cf8b333f
commit 24a9170fbc
2 changed files with 5 additions and 5 deletions

View File

@ -790,14 +790,14 @@ gfxContext::GetFontSmoothingBackgroundColor()
// masking
void
gfxContext::Mask(SourceSurface* aSurface, const Matrix& aTransform)
gfxContext::Mask(SourceSurface* aSurface, Float aAlpha, const Matrix& aTransform)
{
Matrix old = mTransform;
Matrix mat = aTransform * mTransform;
ChangeTransform(mat);
mDT->MaskSurface(PatternFromState(this), aSurface, Point(),
DrawOptions(1.0f, CurrentState().op, CurrentState().aaMode));
DrawOptions(aAlpha, CurrentState().op, CurrentState().aaMode));
ChangeTransform(old);
}
@ -1000,8 +1000,7 @@ gfxContext::PopGroupAndBlend()
if (!maskTransform.HasNonTranslation()) {
Mask(mask, opacity, Point(maskTransform._31, maskTransform._32));
} else {
MOZ_ASSERT(opacity == 1.0f);
Mask(mask, maskTransform);
Mask(mask, opacity, maskTransform);
}
} else {
Paint(opacity);

View File

@ -315,7 +315,8 @@ public:
* Like Paint, except that it only draws the source where pattern is
* non-transparent.
*/
void Mask(mozilla::gfx::SourceSurface *aSurface, const mozilla::gfx::Matrix& aTransform);
void Mask(mozilla::gfx::SourceSurface *aSurface, mozilla::gfx::Float aAlpha, const mozilla::gfx::Matrix& aTransform);
void Mask(mozilla::gfx::SourceSurface *aSurface, const mozilla::gfx::Matrix& aTransform) { Mask(aSurface, 1.0f, aTransform); }
/**
* Shorthand for creating a pattern and calling the pattern-taking