Bug 886531. Fix MaskSurface implementation on CG. r=bas

The offsets were wrong.

--HG--
extra : rebase_source : 810f88c587e4fbcef377c53c13ee59a4b59cbe66
This commit is contained in:
Jeff Muizelaar 2013-06-24 17:28:21 -04:00
parent 946beee7f8
commit 8411163d5f

View File

@ -322,10 +322,12 @@ DrawTargetCG::MaskSurface(const Pattern &aSource,
CGContextScaleCTM(cg, 1, -1);
IntSize size = aMask->GetSize();
CGContextClipToMask(cg, CGRectMake(aOffset.x, aOffset.y, size.width, size.height), image);
FillRect(Rect(0, 0, size.width, size.height), aSource, aDrawOptions);
CGContextClipToMask(cg, CGRectMake(aOffset.x, -(aOffset.y + size.height), size.width, size.height), image);
CGContextScaleCTM(cg, 1, -1);
FillRect(Rect(aOffset.x, aOffset.y, size.width, size.height), aSource, aDrawOptions);
fixer.Fix(mCg);
CGContextRestoreGState(mCg);