[cairo-commit] 22 commits - boilerplate/cairo-boilerplate.c configure.in src/cairo-clip.c src/cairo-ft-font.c src/cairo-image-surface.c src/cairo-output-stream.c src/cairo-pdf-operators.c src/cairo-pdf-surface.c src/cairo-ps-surface.c src/cairo-scaled-font.c src/cairo-scaled-font-subsets.c src/cairo-surface.c src/cairo-type3-glyph-surface.c src/cairo-wideint-type-private.h src/cairo-xlib-screen.c test/create-from-png.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Aug 17 07:34:42 PDT 2008


 boilerplate/cairo-boilerplate.c  |    9 ++++-----
 configure.in                     |    2 +-
 src/cairo-clip.c                 |    2 --
 src/cairo-ft-font.c              |    3 +--
 src/cairo-image-surface.c        |    7 +------
 src/cairo-output-stream.c        |    1 -
 src/cairo-pdf-operators.c        |   25 +++++++++++++++++--------
 src/cairo-pdf-surface.c          |    8 ++++++--
 src/cairo-ps-surface.c           |    2 --
 src/cairo-scaled-font-subsets.c  |   14 +++++++++++---
 src/cairo-scaled-font.c          |    4 +---
 src/cairo-surface.c              |    9 +++++----
 src/cairo-type3-glyph-surface.c  |    2 +-
 src/cairo-wideint-type-private.h |   31 ++++++++++++++++---------------
 src/cairo-xlib-screen.c          |    3 +--
 test/create-from-png.c           |    3 +++
 16 files changed, 68 insertions(+), 57 deletions(-)

New commits:
commit 37bca38772af1ff206f6bba00f217dc59504ecca
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 15:30:51 2008 +0100

    [test/create-from-png] Return the failure.
    
    Having checked all the possible PNG formats, report any failures.

diff --git a/test/create-from-png.c b/test/create-from-png.c
index 52831f0..5ed3f61 100644
--- a/test/create-from-png.c
+++ b/test/create-from-png.c
@@ -254,5 +254,8 @@ main (void)
 
     cairo_test_fini (&ctx);
 
+    if (result != CAIRO_TEST_SUCCESS)
+	return result;
+
     return cairo_test (&test);
 }
commit 3dc8e2dd0d42572c6e97af8bd676c02dded13d7f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 15:28:49 2008 +0100

    [boilerplate] Dead store elimination.
    
    Value stored to 'found' is never read.

diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 72e0930..c0af5bd 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -411,7 +411,7 @@ cairo_boilerplate_get_targets (int *pnum_targets, cairo_bool_t *plimited_targets
 	limited_targets = TRUE;
 
 	while (*tname) {
-	    int j, found = 0;
+	    int j;
 	    const char *end = strpbrk (tname, " \t\r\n;:,");
 	    if (!end)
 	        end = tname + strlen (tname);
@@ -422,10 +422,9 @@ cairo_boilerplate_get_targets (int *pnum_targets, cairo_bool_t *plimited_targets
 	    }
 
 	    for (i = j = 0; i < num_targets; i++) {
-		if (0 == strncmp (targets_to_test[i]->name, tname, end - tname) &&
-		    !isalnum (targets_to_test[i]->name[end - tname])) {
-		    found = 1;
-		} else {
+		if (strncmp (targets_to_test[i]->name, tname, end - tname) ||
+		    isalnum (targets_to_test[i]->name[end - tname]))
+		{
 		    targets_to_test[j++] = targets_to_test[i];
 		}
 	    }
commit d5f90a241c24a7f10c8f03d2a830729f85bb2945
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 15:08:57 2008 +0100

    [ft-font] Dead store elimination.
    
    Value stored to 'stride' is never read.

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index e143053..0b75243 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1187,7 +1187,7 @@ _render_glyph_outline (FT_Face                    face,
     FT_Outline *outline = &glyphslot->outline;
     FT_Bitmap bitmap;
     FT_BBox cbox;
-    unsigned int width, height, stride;
+    unsigned int width, height;
     cairo_status_t status;
     FT_Error fterror;
     FT_Library library = glyphslot->library;
@@ -1244,7 +1244,6 @@ _render_glyph_outline (FT_Face                    face,
 
     width = (unsigned int) ((cbox.xMax - cbox.xMin) >> 6);
     height = (unsigned int) ((cbox.yMax - cbox.yMin) >> 6);
-    stride = (width + 3) & ~3;
 
     if (width * height == 0) {
 	cairo_format_t format;
commit 5109fdb1e6867439d45da5a7cc8effb9bcc75d85
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 15:05:51 2008 +0100

    [xlib] Return the integer from XGetDefault().
    
    If the default value does not match a fontconfig constant, actually return
    the parsed token.

diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index ebce8a2..7ce252c 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -106,7 +106,6 @@ get_integer_default (Display    *dpy,
 		     const char *option,
 		     int        *value)
 {
-    int i;
     char *v, *e;
 
     v = XGetDefault (dpy, "Xft", option);
@@ -116,7 +115,7 @@ get_integer_default (Display    *dpy,
 	    return TRUE;
 #endif
 
-	i = strtol (v, &e, 0);
+	*value = strtol (v, &e, 0);
 	if (e != v)
 	    return TRUE;
     }
commit 4f4621adbfa67fb61b02e7e650a59a96a8c974ef
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 15:02:31 2008 +0100

    [scaled-font-subsets] Check for a failed malloc.
    
    Missing NULL check after malloc.

diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 4b7b633..f4ba926 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -345,7 +345,10 @@ _cairo_sub_font_glyph_lookup_unicode (cairo_sub_font_glyph_t *sub_font_glyph,
     if (unicode != (uint32_t)-1) {
 	len = _cairo_ucs4_to_utf8 (unicode, buf);
 	if (len > 0) {
-	    sub_font_glyph->utf8 = malloc(len + 1);
+	    sub_font_glyph->utf8 = malloc (len + 1);
+	    if (sub_font_glyph->utf8 == NULL)
+		return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+
 	    memcpy (sub_font_glyph->utf8, buf, len);
 	    sub_font_glyph->utf8[len] = 0;
 	    sub_font_glyph->utf8_len = len;
commit 418ebb09303aa4b9b212fad4b45e458332a3afde
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 15:01:21 2008 +0100

    [scaled-font-subsets] Propagate error status from index_to_ucs4().
    
    Check for an error status from ->index_to_ucs4() and propagate.

diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 1f87838..4b7b633 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -331,8 +331,13 @@ _cairo_sub_font_glyph_lookup_unicode (cairo_sub_font_glyph_t *sub_font_glyph,
     if (status == CAIRO_INT_STATUS_UNSUPPORTED)
 	unicode = -1;
 
-    if (unicode == (uint32_t)-1 && scaled_font->backend->index_to_ucs4)
-	status = scaled_font->backend->index_to_ucs4 (scaled_font, scaled_font_glyph_index, &unicode);
+    if (unicode == (uint32_t)-1 && scaled_font->backend->index_to_ucs4) {
+	status = scaled_font->backend->index_to_ucs4 (scaled_font,
+						      scaled_font_glyph_index,
+						      &unicode);
+	if (status)
+	    return status;
+    }
 
     sub_font_glyph->unicode = unicode;
     sub_font_glyph->utf8 = NULL;
commit 2ab700f21af7a98d82e74fd4d04884b2b0ca1b20
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:59:53 2008 +0100

    [type3-glyph] Propagate error from image emission.
    
    Return the error status from ->emit_image().

diff --git a/src/cairo-type3-glyph-surface.c b/src/cairo-type3-glyph-surface.c
index 0398c3a..eab756e 100644
--- a/src/cairo-type3-glyph-surface.c
+++ b/src/cairo-type3-glyph-surface.c
@@ -112,7 +112,7 @@ _cairo_type3_glyph_surface_emit_image (cairo_type3_glyph_surface_t *surface,
     if (image_mask != image)
 	cairo_surface_destroy (&image_mask->base);
 
-    return CAIRO_STATUS_SUCCESS;
+    return status;
 }
 
 static cairo_status_t
commit 0549fcfd85bed5b03c9eb4502042f6ce6f76f5a0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:57:03 2008 +0100

    [pdf-operators] Propagate status from end_text().
    
    Check for an error status after end_text().

diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index 027bbad..4729375 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -683,15 +683,18 @@ _cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t	*pdf_operators,
 				  cairo_stroke_style_t	*style,
 				  cairo_matrix_t	*ctm,
 				  cairo_matrix_t	*ctm_inverse,
-				  const char 		*pdf_operator)
+				  const char		*pdf_operator)
 {
     cairo_status_t status;
     cairo_matrix_t m, path_transform;
     cairo_bool_t has_ctm = TRUE;
     double scale = 1.0;
 
-    if (pdf_operators->in_text_object)
+    if (pdf_operators->in_text_object) {
 	status = _cairo_pdf_operators_end_text (pdf_operators);
+	if (status)
+	    return status;
+    }
 
     /* Optimize away the stroke ctm when it does not affect the
      * stroke. There are other ctm cases that could be optimized
@@ -788,8 +791,11 @@ _cairo_pdf_operators_fill (cairo_pdf_operators_t	*pdf_operators,
     const char *pdf_operator;
     cairo_status_t status;
 
-    if (pdf_operators->in_text_object)
+    if (pdf_operators->in_text_object) {
 	status = _cairo_pdf_operators_end_text (pdf_operators);
+	if (status)
+	    return status;
+    }
 
     status = _cairo_pdf_operators_emit_path (pdf_operators,
 					     path,
commit 96d45cfeeeb6dba94f134589486b894eeac82651
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:55:30 2008 +0100

    [pdf-operators] Propagate error from emit_glyph_string*().
    
    Do not overwrite the error status if returned by either of the
    emit_glyph_string*() routines.

diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index c01acdf..027bbad 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -927,7 +927,7 @@ static cairo_status_t
 _cairo_pdf_operators_flush_glyphs (cairo_pdf_operators_t    *pdf_operators)
 {
     cairo_output_stream_t *word_wrap_stream;
-    cairo_status_t status;
+    cairo_status_t status, status2;
     int i;
     double x;
 
@@ -955,11 +955,11 @@ _cairo_pdf_operators_flush_glyphs (cairo_pdf_operators_t    *pdf_operators)
     }
 
     pdf_operators->num_glyphs = 0;
-    status = _cairo_output_stream_destroy (word_wrap_stream);
-    if (status)
-	return status;
+    status2 = _cairo_output_stream_destroy (word_wrap_stream);
+    if (status == CAIRO_STATUS_SUCCESS)
+	status = status2;
 
-    return CAIRO_STATUS_SUCCESS;
+    return status;
 }
 
 static cairo_status_t
commit 63f64ff3369f3768fe80a1b002a1d057e3886d4c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:53:55 2008 +0100

    [pdf-operators] Propagate error from begin_actualtext().
    
    Check the status return from begin_actualtext().

diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index d3eddc8..c01acdf 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -1286,6 +1286,9 @@ _cairo_pdf_operators_emit_cluster (cairo_pdf_operators_t      *pdf_operators,
      * unicode string. */
     _cairo_pdf_operators_flush_glyphs (pdf_operators);
     status = _cairo_pdf_operators_begin_actualtext (pdf_operators, utf8, utf8_len);
+    if (status)
+	return status;
+
     cur_glyph = glyphs;
     /* XXX
      * If no glyphs, we should put *something* here for the text to be selectable. */
commit 56c5f9954aca52327eedac3bc88a32ab4cbea619
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:51:48 2008 +0100

    [pdf] Propagate error from open_stream() failure.
    
    Check status return for _cairo_pdf_surface_open_stream().

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 5d24948..676eb14 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -3521,6 +3521,9 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t		*surface,
 						 NULL,
 						 surface->compress_content,
 						 NULL);
+	if (status)
+	    break;
+
 	glyphs[i] = surface->pdf_stream.self;
 	if (i == 0) {
 	    status = _cairo_type3_glyph_surface_emit_notdef_glyph (type3_surface,
commit 311464ad50edfa2e6dfbe10b021041229cdebda6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:50:35 2008 +0100

    [pdf] Propagate status return.
    
    Check status return from type3_glyph_surface_emit_glyph().

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index c6e06ea..5d24948 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -3534,6 +3534,9 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t		*surface,
 							    &bbox,
 							    &widths[i]);
 	}
+	if (status)
+	    break;
+
 	status = _cairo_pdf_surface_close_stream (surface);
 	if (status)
 	    break;
commit b14c6ac685b45797657e406c5a02f94bffef4ffc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:49:02 2008 +0100

    [pdf] dead code elimination.
    
    Value stored to 'matrix' is never read.

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 22c5dc9..c6e06ea 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -3487,7 +3487,6 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t		*surface,
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
     cairo_pdf_resource_t *glyphs, encoding, char_procs, subset_resource, to_unicode_stream;
     cairo_pdf_font_t font;
-    cairo_matrix_t matrix;
     double *widths;
     unsigned int i;
     cairo_box_t font_bbox = {{0,0},{0,0}};
@@ -3610,7 +3609,6 @@ _cairo_pdf_surface_emit_type3_font_subset (cairo_pdf_surface_t		*surface,
     }
 
     _cairo_pdf_surface_update_object (surface, subset_resource);
-    matrix = font_subset->scaled_font->scale_inverse;
     _cairo_output_stream_printf (surface->output,
 				 "%d 0 obj\n"
 				 "<< /Type /Font\n"
commit 97a2038c76978847127b164f639f41348badf5a6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:47:27 2008 +0100

    [ps] Dead store elimination.
    
    Value stored to 'matrix' is never read.

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index fab3b31..77c3035 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -433,7 +433,6 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t		*surface,
 
 {
     cairo_status_t status;
-    cairo_matrix_t matrix;
     unsigned int i;
     cairo_box_t font_bbox = {{0,0},{0,0}};
     cairo_box_t bbox = {{0,0},{0,0}};
@@ -445,7 +444,6 @@ _cairo_ps_surface_emit_type3_font_subset (cairo_ps_surface_t		*surface,
 				 "%% _cairo_ps_surface_emit_type3_font_subset\n");
 #endif
 
-    matrix = font_subset->scaled_font->scale_inverse;
     _cairo_output_stream_printf (surface->final_stream,
 				 "8 dict begin\n"
 				 "/FontType 3 def\n"
commit e3b6a0c89a814ce469bee8f5e186c318a41004fb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:44:44 2008 +0100

    [cairo-output-stream] Dead store.
    
    Value stored to 'p' is never read.

diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index e2fffb2..5041f75 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -423,7 +423,6 @@ _cairo_output_stream_vprintf (cairo_output_stream_t *stream,
 
 	/* Flush contents of buffer before snprintf()'ing into it. */
 	_cairo_output_stream_write (stream, buffer, p - buffer);
-	p = buffer;
 
 	/* We group signed and unsigned together in this switch, the
 	 * only thing that matters here is the size of the arguments,
commit 4517ef05200a11115c59acef9a20163544e69409
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:34:54 2008 +0100

    [cairo-image-surface] Dead store.
    
    Value stored to 'ret' is never read.
    Value stored to 'mask_bpp' is never read.

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 806a76f..cfbdd07 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -1068,8 +1068,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t	op,
     pixman_trapezoid_t		 stack_traps[CAIRO_STACK_ARRAY_LENGTH (pixman_trapezoid_t)];
     pixman_trapezoid_t		*pixman_traps = stack_traps;
     int				 mask_stride;
-    int				 mask_bpp;
-    int				 ret, i;
+    int				 i;
 
     if (height == 0 || width == 0)
 	return CAIRO_STATUS_SUCCESS;
@@ -1133,18 +1132,14 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t	op,
     switch (antialias) {
     case CAIRO_ANTIALIAS_NONE:
 	format = PIXMAN_a1;
-	ret = 1;
 	mask_stride = ((width + 31) / 8) & ~0x03;
-	mask_bpp = 1;
 	break;
     case CAIRO_ANTIALIAS_GRAY:
     case CAIRO_ANTIALIAS_SUBPIXEL:
     case CAIRO_ANTIALIAS_DEFAULT:
     default:
 	format = PIXMAN_a8;
-	ret = 1;
 	mask_stride = (width + 3) & ~3;
-	mask_bpp = 8;
 	break;
     }
 
commit 4114a7bf065ab180a21617c0b71e9dfc9161298b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:33:38 2008 +0100

    [cairo-clip] Dead store.
    
    Value stored to 'status' is never read.

diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index 9f82db8..5de3667 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -381,8 +381,6 @@ _cairo_clip_intersect_region (cairo_clip_t    *clip,
     if (status)
 	return status;
 
-    status = CAIRO_STATUS_SUCCESS;
-
     if (!clip->has_region) {
         status = _cairo_region_copy (&clip->region, &region);
 	if (status == CAIRO_STATUS_SUCCESS)
commit 32843260ae303fafaecfabf07ed38108f369a5d2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:31:12 2008 +0100

    [cairo-scaled-font] Dead store.
    
    Value stored to 'status' is never read.

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 50079d9..0adadfc 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -1782,8 +1782,6 @@ _cairo_scaled_font_show_glyphs (cairo_scaled_font_t    *scaled_font,
 
     /* Font display routine either does not exist or failed. */
 
-    status = CAIRO_STATUS_SUCCESS;
-
     _cairo_pattern_init_solid (&white_pattern, CAIRO_COLOR_WHITE, CAIRO_CONTENT_COLOR);
 
     _cairo_cache_freeze (scaled_font->glyphs);
commit 6c0da32b068de2124993fa8932c450843eba77ff
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:30:04 2008 +0100

    [cairo-scaled-font] Actually use bytes_per_row.
    
    bytes_per_row was precomputed but not actually used in the inner loop.

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 889c060..50079d9 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2045,7 +2045,7 @@ _trace_mask_to_path (cairo_image_surface_t *mask,
 
     bytes_per_row = (a1_mask->width + 7) / 8;
     for (y = 0, row = a1_mask->data, rows = a1_mask->height; rows; row += a1_mask->stride, rows--, y++) {
-	for (x = 0, byte_ptr = row, cols = (a1_mask->width + 7) / 8; cols; byte_ptr++, cols--) {
+	for (x = 0, byte_ptr = row, cols = bytes_per_row; cols; byte_ptr++, cols--) {
 	    byte = CAIRO_BITSWAP8_IF_LITTLE_ENDIAN (*byte_ptr);
 	    for (bit = 7; bit >= 0 && x < a1_mask->width; bit--, x++) {
 		if (byte & (1 << bit)) {
commit c7d803fc91f29763a51d398033a117b11fb09454
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:03:33 2008 +0100

    [cairo-surface] Add the lcd_filter default to the nil surfaces.
    
    The nil surfaces did not correctly initialize the lcd filter font option
    to the default value.

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 45c5c56..1d95ca4 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -71,10 +71,11 @@ const cairo_surface_t name = {					\
     0,					/* current_clip_serial */	\
     FALSE,				/* is_snapshot */	\
     FALSE,				/* has_font_options */	\
-    { CAIRO_ANTIALIAS_DEFAULT,					\
-      CAIRO_SUBPIXEL_ORDER_DEFAULT,				\
-      CAIRO_HINT_STYLE_DEFAULT,					\
-      CAIRO_HINT_METRICS_DEFAULT				\
+    { CAIRO_ANTIALIAS_DEFAULT,		/* antialias */		\
+      CAIRO_SUBPIXEL_ORDER_DEFAULT,	/* subpixel_order */	\
+      CAIRO_LCD_FILTER_DEFAULT,		/* lcd_filter */	\
+      CAIRO_HINT_STYLE_DEFAULT,		/* hint_style */	\
+      CAIRO_HINT_METRICS_DEFAULT	/* hint_metrics */	\
     }					/* font_options */	\
 }
 
commit 3b2d49e567ec3de4df18189e22f2077a92d941f0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 14:01:57 2008 +0100

    Ensure ranges of wideint types are always defined.
    
    Define the range of the fixed types (int16, int32 etc) if the standard
    headers fail to provide the definitions.

diff --git a/src/cairo-wideint-type-private.h b/src/cairo-wideint-type-private.h
index aa76766..fdcfe1d 100644
--- a/src/cairo-wideint-type-private.h
+++ b/src/cairo-wideint-type-private.h
@@ -59,25 +59,26 @@
 # ifndef HAVE_UINT64_T
 #  define HAVE_UINT64_T 1
 # endif
-# ifndef INT16_MIN
-#  define INT16_MIN	(-32767-1)
-# endif
-# ifndef INT16_MAX
-#  define INT16_MAX	(32767)
-# endif
-# ifndef UINT16_MAX
-#  define UINT16_MAX	(65535)
-# endif
-# ifndef INT32_MIN
-#  define INT32_MIN	(-2147483647-1)
-# endif
-# ifndef INT32_MAX
-#  define INT32_MAX	(2147483647)
-# endif
 #else
 #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.)
 #endif
 
+#ifndef INT16_MIN
+# define INT16_MIN	(-32767-1)
+#endif
+#ifndef INT16_MAX
+# define INT16_MAX	(32767)
+#endif
+#ifndef UINT16_MAX
+# define UINT16_MAX	(65535)
+#endif
+#ifndef INT32_MIN
+# define INT32_MIN	(-2147483647-1)
+#endif
+#ifndef INT32_MAX
+# define INT32_MAX	(2147483647)
+#endif
+
 #if HAVE_BYTESWAP_H
 # include <byteswap.h>
 #endif
commit 3d548f673bfa6dea63fcc00f775ae318a7f912a8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Aug 17 13:40:32 2008 +0100

    [configure] Add -Werror to CC_TRY_FLAG
    
    g++ only warns about using C-only warning flags, but add -Werror promotes
    the warning to an error and enables correct detection of the unsupported
    flags.

diff --git a/configure.in b/configure.in
index d0e8bb6..37617bb 100644
--- a/configure.in
+++ b/configure.in
@@ -756,7 +756,7 @@ AC_DEFUN([CAIRO_CC_TRY_FLAG], [
   AC_MSG_CHECKING([whether $CC supports $1])
 
   cairo_save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $1"
+  CFLAGS="$CFLAGS -Werror $1"
 
   AC_COMPILE_IFELSE([ ], [cairo_cc_flag=yes], [cairo_cc_flag=no])
   CFLAGS="$cairo_save_CFLAGS"


More information about the cairo-commit mailing list