Bug 896290. Support drawing with antialaising in DrawTargetCG. r=mattwoodrow

This commit is contained in:
Jeff Muizelaar 2013-07-19 08:18:18 -04:00
Родитель 5dba986973
Коммит 9ddd2f5d8f
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -274,6 +274,7 @@ DrawTargetCG::DrawSurface(SourceSurface *aSurface,
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(cg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
image = GetImageFromSourceSurface(aSurface);
@ -706,6 +707,7 @@ DrawTargetCG::MaskSurface(const Pattern &aSource,
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(cg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
image = GetImageFromSourceSurface(aMask);
@ -746,6 +748,7 @@ DrawTargetCG::FillRect(const Rect &aRect,
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(mCg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextSetBlendMode(mCg, ToBlendMode(aDrawOptions.mCompositionOp));
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
@ -772,6 +775,7 @@ DrawTargetCG::StrokeLine(const Point &p1, const Point &p2, const Pattern &aPatte
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(mCg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextSetBlendMode(mCg, ToBlendMode(aDrawOptions.mCompositionOp));
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
@ -810,6 +814,7 @@ DrawTargetCG::StrokeRect(const Rect &aRect,
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(mCg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextSetBlendMode(mCg, ToBlendMode(aDrawOptions.mCompositionOp));
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
@ -858,6 +863,7 @@ DrawTargetCG::Stroke(const Path *aPath, const Pattern &aPattern, const StrokeOpt
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(mCg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextSetBlendMode(mCg, ToBlendMode(aDrawOptions.mCompositionOp));
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
@ -901,6 +907,7 @@ DrawTargetCG::Fill(const Path *aPath, const Pattern &aPattern, const DrawOptions
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(cg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));
@ -978,6 +985,7 @@ DrawTargetCG::FillGlyphs(ScaledFont *aFont, const GlyphBuffer &aBuffer, const Pa
UnboundnessFixer fixer;
CGContextRef cg = fixer.Check(mCg, aDrawOptions.mCompositionOp);
CGContextSetAlpha(cg, aDrawOptions.mAlpha);
CGContextSetShouldAntialias(cg, aDrawOptions.mAntialiasMode != AA_NONE);
CGContextConcatCTM(cg, GfxMatrixToCGAffineTransform(mTransform));