[cairo-commit] 2 commits - src/cairo-botor-scan-converter.c src/cairo-compiler-private.h src/cairo-gl-private.h src/cairo-image-surface.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Sat Jan 23 09:34:30 PST 2010


 src/cairo-botor-scan-converter.c |    8 ++++----
 src/cairo-compiler-private.h     |    4 ++--
 src/cairo-gl-private.h           |    4 ++--
 src/cairo-image-surface.c        |    3 +++
 4 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit c8a61a3267ffd53d4b4d61e2e2bcb70448ea4d41
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Jan 23 18:25:11 2010 +0100

    Fix compilation on MacOS X
    
    Some functions declared in MacOS X headers use the always_inline
    attribute, thus defining it to be a different expression breaks the
    build.

diff --git a/src/cairo-botor-scan-converter.c b/src/cairo-botor-scan-converter.c
index e6113fb..10326e7 100644
--- a/src/cairo-botor-scan-converter.c
+++ b/src/cairo-botor-scan-converter.c
@@ -181,7 +181,7 @@ typedef struct _sweep_line {
     jmp_buf unwind;
 } sweep_line_t;
 
-always_inline static struct quorem
+cairo_always_inline static struct quorem
 floored_divrem (int a, int b)
 {
     struct quorem qr;
@@ -1496,7 +1496,7 @@ full_step (cairo_botor_scan_converter_t *self,
     full_reset (sweep_line);
 }
 
-always_inline static void
+cairo_always_inline static void
 sub_inc_edge (edge_t *edge,
 	      cairo_fixed_t height)
 {
@@ -1628,7 +1628,7 @@ sub_evenodd (sweep_line_t *sweep_line)
     } while (pos != &sweep_line->active);
 }
 
-always_inline static void
+cairo_always_inline static void
 sub_step (cairo_botor_scan_converter_t *self,
 	  sweep_line_t *sweep_line)
 {
@@ -1720,7 +1720,7 @@ coverage_render_vertical_runs (sweep_line_t *sweep, edge_t *edge, cairo_fixed_t
     cell->uncovered_area += 2 * _cairo_fixed_fractional_part (edge->x.quo) * height;
 }
 
-always_inline static void
+cairo_always_inline static void
 sub_emit (cairo_botor_scan_converter_t *self,
 	  sweep_line_t *sweep,
 	  cairo_span_renderer_t *renderer)
diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
index 34da73c..c3814d2 100644
--- a/src/cairo-compiler-private.h
+++ b/src/cairo-compiler-private.h
@@ -143,11 +143,11 @@
 #if __GNUC__ >= 3
 #define cairo_pure __attribute__((pure))
 #define cairo_const __attribute__((const))
-#define always_inline inline __attribute__((always_inline))
+#define cairo_always_inline inline __attribute__((always_inline))
 #else
 #define cairo_pure
 #define cairo_const
-#define always_inline inline
+#define cairo_always_inline inline
 #endif
 
 #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h
index d08e545..84f0143 100644
--- a/src/cairo-gl-private.h
+++ b/src/cairo-gl-private.h
@@ -158,7 +158,7 @@ _cairo_gl_operand_init (cairo_gl_composite_operand_t *operand,
 			int dst_x, int dst_y,
 			int width, int height);
 
-static always_inline cairo_status_t cairo_warn
+static cairo_always_inline cairo_status_t cairo_warn
 _cairo_gl_context_acquire (cairo_device_t *device,
 			   cairo_gl_context_t **ctx)
 {
@@ -172,7 +172,7 @@ _cairo_gl_context_acquire (cairo_device_t *device,
     return CAIRO_STATUS_SUCCESS;
 }
 
-static always_inline void
+static cairo_always_inline void
 _cairo_gl_context_release (cairo_gl_context_t *ctx)
 {
     cairo_device_release (&ctx->base);
commit 90ba1242b61e7b8e5ae2c2ca028d0058f6dabd88
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Jan 23 18:13:35 2010 +0100

    Fix image backend compilation
    
    When HAS_ATOMIC_OPS is not defined, cairo-image-surface.c does not
    compile because _pixman_white_image calls _pixman_image_for_solid
    which gets defined only later in the code.

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index f3886c0..beab9d7 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -64,6 +64,9 @@ _cairo_image_surface_fill (void *dst,
 			   cairo_antialias_t		 antialias,
 			   cairo_clip_t		*clip);
 
+static pixman_image_t *
+_pixman_image_for_solid (const cairo_solid_pattern_t *pattern);
+
 static cairo_bool_t
 _cairo_image_surface_is_size_valid (int width, int height)
 {


More information about the cairo-commit mailing list