[cairo-commit] 3 commits - src/cairo-quartz-private.h src/cairo-quartz-surface.c
Andrea Canciani
ranma42 at kemper.freedesktop.org
Sun Jan 15 07:27:16 PST 2012
src/cairo-quartz-private.h | 6 +++---
src/cairo-quartz-surface.c | 16 ++++++++++++----
2 files changed, 15 insertions(+), 7 deletions(-)
New commits:
commit c1c9424a3db1485f1529d0982af0075c1af844ff
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Sat Jan 7 10:16:28 2012 +0100
quartz: Do not export private functions
Private functions must be marked cairo_private to avoid exporting
them.
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
index 474ec15..f841a49 100644
--- a/src/cairo-quartz-private.h
+++ b/src/cairo-quartz-private.h
@@ -80,10 +80,10 @@ typedef struct cairo_quartz_image_surface {
cairo_image_surface_t *imageSurface;
} cairo_quartz_image_surface_t;
-cairo_bool_t
+cairo_private cairo_bool_t
_cairo_quartz_verify_surface_size(int width, int height);
-CGImageRef
+cairo_private CGImageRef
CairoQuartzCreateCGImage (cairo_format_t format,
unsigned int width,
unsigned int height,
@@ -94,7 +94,7 @@ CairoQuartzCreateCGImage (cairo_format_t format,
CGDataProviderReleaseDataCallback releaseCallback,
void *releaseInfo);
-CGFontRef
+cairo_private CGFontRef
_cairo_quartz_scaled_font_get_cg_font_ref (cairo_scaled_font_t *sfont);
#else
commit 7058e8c18135eddcb10fbb9fc9784c87f61f6953
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Fri Jan 6 16:55:06 2012 +0100
quartz: Make glyph antialiasing consistent with quartz-font
CAIRO_ANTIALIAS_{FAST,GOOD,BEST} were introduced and used in
cairo-quartz-font.c by commit 70cd3b473d09e9ad3d803014a904a22639db1a24.
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
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 4643618..4a9b851 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -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;
commit 29145f4e483db8126aab36bf8686d41eb49a31b4
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Fri Jan 6 17:17:30 2012 +0100
quartz: Fix building with QUARTZ_DEBUG
Multiple code refactorings broke the debugging code.
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index e18461b..4643618 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -1634,7 +1634,8 @@ _cairo_quartz_cg_paint (const cairo_compositor_t *compositor,
cairo_quartz_drawing_state_t state;
cairo_int_status_t rv;
- ND ((stderr, "%p _cairo_quartz_surface_paint op %d source->type %d\n", surface, op, source->type));
+ ND ((stderr, "%p _cairo_quartz_surface_paint op %d source->type %d\n",
+ extents->surface, extents->op, extents->source_pattern.base.type));
rv = _cairo_quartz_setup_state (&state, extents);
if (unlikely (rv))
@@ -1732,7 +1733,9 @@ _cairo_quartz_cg_mask (const cairo_compositor_t *compositor,
cairo_bool_t need_temp;
CGInterpolationQuality filter;
- ND ((stderr, "%p _cairo_quartz_surface_mask op %d source->type %d mask->type %d\n", surface, op, source->type, mask->type));
+ ND ((stderr, "%p _cairo_quartz_surface_mask op %d source->type %d mask->type %d\n",
+ extents->surface, extents->op, extents->source_pattern.base.type,
+ extents->mask_pattern.base.type));
if (mask->type == CAIRO_PATTERN_TYPE_SOLID)
return _cairo_quartz_cg_mask_with_solid (surface, extents);
@@ -1820,7 +1823,8 @@ _cairo_quartz_cg_fill (const cairo_compositor_t *compositor,
cairo_quartz_drawing_state_t state;
cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
- ND ((stderr, "%p _cairo_quartz_surface_fill op %d source->type %d\n", surface, op, source->type));
+ ND ((stderr, "%p _cairo_quartz_surface_fill op %d source->type %d\n",
+ extents->surface, extents->op, extents->source_pattern.base.type));
rv = _cairo_quartz_setup_state (&state, extents);
if (unlikely (rv))
@@ -1866,7 +1870,8 @@ _cairo_quartz_cg_stroke (const cairo_compositor_t *compositor,
cairo_int_status_t rv = CAIRO_STATUS_SUCCESS;
CGAffineTransform strokeTransform, invStrokeTransform;
- ND ((stderr, "%p _cairo_quartz_surface_stroke op %d source->type %d\n", surface, op, source->type));
+ ND ((stderr, "%p _cairo_quartz_surface_stroke op %d source->type %d\n",
+ extents->surface, extents->op, extents->source_pattern.base.type));
rv = _cairo_quartz_setup_state (&state, extents);
if (unlikely (rv))
More information about the cairo-commit
mailing list