quartz: Make glyph antialiasing consistent with quartz-font

CAIRO_ANTIALIAS_{FAST,GOOD,BEST} were introduced and used in
cairo-quartz-font.c by commit 70cd3b473d.

Fixes the warnings:

cairo-quartz-surface.c: In function '_cairo_quartz_cg_glyphs':
cairo-quartz-surface.c:1976: warning: enumeration value 'CAIRO_ANTIALIAS_FAST' not handled in switch
cairo-quartz-surface.c:1976: warning: enumeration value 'CAIRO_ANTIALIAS_GOOD' not handled in switch
cairo-quartz-surface.c:1976: warning: enumeration value 'CAIRO_ANTIALIAS_BEST' not handled in switch
This commit is contained in:
Andrea Canciani 2012-01-06 16:55:06 +01:00
parent 29145f4e48
commit 7058e8c181

View file

@ -1980,6 +1980,7 @@ _cairo_quartz_cg_glyphs (const cairo_compositor_t *compositor,
switch (scaled_font->options.antialias) {
case CAIRO_ANTIALIAS_SUBPIXEL:
case CAIRO_ANTIALIAS_BEST:
CGContextSetShouldAntialias (state.cgMaskContext, TRUE);
CGContextSetShouldSmoothFonts (state.cgMaskContext, TRUE);
if (CGContextSetAllowsFontSmoothingPtr &&
@ -1993,6 +1994,8 @@ _cairo_quartz_cg_glyphs (const cairo_compositor_t *compositor,
CGContextSetShouldAntialias (state.cgMaskContext, FALSE);
break;
case CAIRO_ANTIALIAS_GRAY:
case CAIRO_ANTIALIAS_GOOD:
case CAIRO_ANTIALIAS_FAST:
CGContextSetShouldAntialias (state.cgMaskContext, TRUE);
CGContextSetShouldSmoothFonts (state.cgMaskContext, FALSE);
break;