[cairo-commit] Branch '1.12' - 20 commits - configure.ac doc/public perf/micro README src/cairo-cache-private.h src/cairo-gl-surface.c src/cairo.h src/cairoint.h src/cairo-mesh-pattern-rasterizer.c src/cairo-raster-source-pattern.c src/cairo-region.c src/cairo-spans-private.h src/cairo-surface-observer.c src/cairo-types-private.h src/cairo-version.c src/cairo-wideint.c src/cairo-xml-surface.c test/any2ppm.c test/fallback-resolution.c test/ps-eps.c util/cairo-script

Bryce Harrington bryce at kemper.freedesktop.org
Thu Nov 6 17:13:12 PST 2014


 README                                       |   24 +++++++++------
 configure.ac                                 |    4 +-
 doc/public/cairo-sections.txt                |   41 +++++++++++++++++++++++++--
 perf/micro/hatching.c                        |    4 +-
 src/cairo-cache-private.h                    |    2 -
 src/cairo-gl-surface.c                       |    3 +
 src/cairo-mesh-pattern-rasterizer.c          |   10 +++---
 src/cairo-raster-source-pattern.c            |    2 -
 src/cairo-region.c                           |   12 -------
 src/cairo-spans-private.h                    |    2 -
 src/cairo-surface-observer.c                 |    5 +++
 src/cairo-types-private.h                    |    4 +-
 src/cairo-version.c                          |    1 
 src/cairo-wideint.c                          |    8 ++---
 src/cairo-xml-surface.c                      |    4 +-
 src/cairo.h                                  |   20 +++++++++++++
 src/cairoint.h                               |    8 ++---
 test/any2ppm.c                               |    5 ++-
 test/fallback-resolution.c                   |    5 +++
 test/ps-eps.c                                |    6 +++
 util/cairo-script/cairo-script-file.c        |    8 ++---
 util/cairo-script/cairo-script-interpreter.c |    2 -
 util/cairo-script/cairo-script-operators.c   |   16 +++++-----
 23 files changed, 132 insertions(+), 64 deletions(-)

New commits:
commit 873bed01cab1e6edb27a33e074add206e7ed41f2
Author: Ryan Lortie <desrt at desrt.ca>
Date:   Tue Feb 4 10:47:40 2014 +0000

    cairo-version: fix docs build
    
    We do some evil things in this doc comment by closing a <para> tag further up.
    Make sure we reopen it at the end so that gtk-doc's attempt to close it again
    doesn't result in an imbalance.

diff --git a/src/cairo-version.c b/src/cairo-version.c
index d9ad240..e493c81 100644
--- a/src/cairo-version.c
+++ b/src/cairo-version.c
@@ -137,6 +137,7 @@
  * </programlisting></informalexample>
  * </para>
  * </refsect2>
+ * <para>
  **/
 
 /**
commit ac5801792b7445a1551925f7f5404bae8f40aa19
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 25 13:17:00 2014 -0800

    doc: Add missing sections and symbols for public docs
    
    This adds a number of items to the documentation for which code docs
    exist, and also adds sections for cairo-skia and cairo-surface-observer.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48784
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/doc/public/cairo-sections.txt b/doc/public/cairo-sections.txt
index bde2421..3a78f36 100644
--- a/doc/public/cairo-sections.txt
+++ b/doc/public/cairo-sections.txt
@@ -114,6 +114,15 @@ cairo_recording_surface_get_extents
 </SECTION>
 
 <SECTION>
+<FILE>cairo-skia</FILE>
+cairo_skia_context
+cairo_skia_context_t
+cairo_skia_surface
+cairo_skia_surface_t
+format_to_sk_config
+</SECTION>
+
+<SECTION>
 <FILE>cairo-win32</FILE>
 CAIRO_HAS_WIN32_SURFACE
 cairo_win32_surface_create
@@ -213,11 +222,21 @@ cairo_device_set_user_data
 cairo_device_get_user_data
 cairo_device_acquire
 cairo_device_release
+cairo_device_observer_elapsed
+cairo_device_observer_fill_elapsed
+cairo_device_observer_glyphs_elapsed
+cairo_device_observer_mask_elapsed
+cairo_device_observer_paint_elapsed
+cairo_device_observer_print
+cairo_device_observer_stroke_elapsed
 </SECTION>
 
 <SECTION>
 <FILE>cairo-surface</FILE>
 CAIRO_HAS_MIME_SURFACE
+CAIRO_MIME_TYPE_JBIG2
+CAIRO_MIME_TYPE_JBIG2_GLOBAL
+CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID
 CAIRO_MIME_TYPE_JP2
 CAIRO_MIME_TYPE_JPEG
 CAIRO_MIME_TYPE_PNG
@@ -240,6 +259,8 @@ cairo_surface_mark_dirty
 cairo_surface_mark_dirty_rectangle
 cairo_surface_set_device_offset
 cairo_surface_get_device_offset
+cairo_surface_get_device_scale
+cairo_surface_set_device_scale
 cairo_surface_set_fallback_resolution
 cairo_surface_get_fallback_resolution
 cairo_surface_type_t
@@ -258,6 +279,23 @@ cairo_surface_unmap_image
 </SECTION>
 
 <SECTION>
+<FILE>cairo-surface-observer</FILE>
+CAIRO_HAS_OBSERVER_SURFACE
+cairo_surface_create_observer
+cairo_surface_observer_add_fill_callback
+cairo_surface_observer_add_finish_callback
+cairo_surface_observer_add_flush_callback
+cairo_surface_observer_add_glyphs_callback
+cairo_surface_observer_add_mask_callback
+cairo_surface_observer_add_paint_callback
+cairo_surface_observer_add_stroke_callback
+cairo_surface_observer_callback_t
+cairo_surface_observer_elapsed
+cairo_surface_observer_mode_t
+cairo_surface_observer_print
+</SECTION>
+
+<SECTION>
 <FILE>cairo-version</FILE>
 CAIRO_VERSION
 CAIRO_VERSION_MAJOR
diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c
index 64036b6..6721bf5 100644
--- a/src/cairo-surface-observer.c
+++ b/src/cairo-surface-observer.c
@@ -1368,11 +1368,16 @@ static const cairo_surface_backend_t _cairo_surface_observer_backend = {
 /**
  * cairo_surface_create_observer:
  * @target: an existing surface for which the observer will watch
+ * @mode: sets the mode of operation (normal vs. record)
  *
  * Create a new surface that exists solely to watch another is doing. In
  * the process it will log operations and times, which are fast, which are
  * slow, which are frequent, etc.
  *
+ * The @mode parameter can be set to either CAIRO_SURFACE_OBSERVER_NORMAL
+ * or CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS, to control whether or not
+ * the internal observer should record operations.
+ *
  * Return value: a pointer to the newly allocated surface. The caller
  * owns the surface and should call cairo_surface_destroy() when done
  * with it.
diff --git a/src/cairo.h b/src/cairo.h
index 2beb975..dcc2207 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -2208,6 +2208,15 @@ cairo_surface_create_for_rectangle (cairo_surface_t	*target,
                                     double		 width,
                                     double		 height);
 
+/**
+ * cairo_surface_observer_mode_t:
+ * @CAIRO_SURFACE_OBSERVER_NORMAL: no recording is done
+ * @CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS: operations are recorded
+ *
+ * Whether operations should be recorded.
+ *
+ * Since: 1.12
+ **/
 typedef enum {
 	CAIRO_SURFACE_OBSERVER_NORMAL = 0,
 	CAIRO_SURFACE_OBSERVER_RECORD_OPERATIONS = 0x1
commit 4fb5205d2efda663df9674fd2eff76af08fcc1e6
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Feb 19 11:25:16 2014 -0800

    gl: Handle PIXMAN_a8r8g8b8_sRGB format in switch
    
    Fixes the following compiler warning:
    
      cairo-gl-surface.c:182:5: warning: enumeration value
      ‘PIXMAN_a8r8g8b8_sRGB’ not handled in switch
    
    Same fix as done for image in 1d0055078.
    
    Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index c287a01..328afd1 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -261,6 +261,9 @@ _cairo_gl_get_image_format_and_type_gl (pixman_format_code_t pixman_format,
 	*type = GL_UNSIGNED_BYTE;
 	return TRUE;
 
+#if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,27,2)
+    case PIXMAN_a8r8g8b8_sRGB:
+#endif
     case PIXMAN_a2b10g10r10:
     case PIXMAN_x2b10g10r10:
     case PIXMAN_a4r4g4b4:
commit 7d57e76c9fda065be85dce257291ee77455fbb67
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Jan 29 09:57:24 2014 -0800

    test:  Replace deprecated rsvg_init() in any2ppm test
    
    As of libsvg 2.35 calling g_type_init() is sufficient.
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/configure.ac b/configure.ac
index b5e2721..a04baae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -629,7 +629,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(svg, SVG, yes, [
   fi
 ])
 
-LIBRSVG_VERSION_REQUIRED=2.15.0
+LIBRSVG_VERSION_REQUIRED=2.35.0
 test_svg=no
 any2ppm_svg=no
 if test "x$use_svg" = "xyes"; then
diff --git a/test/any2ppm.c b/test/any2ppm.c
index db7f59e..b125496 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -869,7 +869,6 @@ main (int argc, char **argv)
 #endif
 
 #if CAIRO_CAN_TEST_SVG_SURFACE
-    rsvg_init ();
     rsvg_set_default_dpi (72.0);
 #endif
 
commit ecc6f1918bf5d2bb3576dde06293766a3f4d9286
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Jan 29 10:01:50 2014 -0800

    test:  Handle error in fgets call in ps-eps test
    
    Most likely this is just a theoretical problem since we just checked
    feof, but this quells the following warning:
    
    ps-eps.c:216:8: warning: ignoring return value of ‘fgets’, declared with
    attribute warn_unused_result [-Wunused-result]
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/ps-eps.c b/test/ps-eps.c
index 1961463..b0192ee 100644
--- a/test/ps-eps.c
+++ b/test/ps-eps.c
@@ -213,7 +213,11 @@ check_bbox (cairo_test_context_t *ctx,
     bbox_pass = FALSE;
     page_bbox_pass = FALSE;
     while (!feof(f)) {
-	fgets (buf, sizeof(buf), f);
+	if (fgets (buf, sizeof(buf), f) == (char *)EOF) {
+	    cairo_test_log (ctx, "Error: Unexpected EOF in %s\n",
+			    filename);
+	    break;
+	}
 
 	if (strncmp (buf, DOCUMENT_BBOX, strlen (DOCUMENT_BBOX)) == 0) {
 	    ret = sscanf (buf+strlen (DOCUMENT_BBOX), "%d %d %d %d", &llx, &lly, &urx, &ury);
commit 95daa8847c2b1f1cf4456ef1c0f968d8aaab6a50
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Jan 29 10:22:51 2014 -0800

    cairo-script: Error if asked to decompress with missing compression lib
    
    This quells the following warning:
    
    warning: enumeration value ‘LZO’ not handled in switch [-Wswitch-enum]
    
    The LZO enum value is defined and used elsewhere, even if lzo support
    isn't available.
    
    This situation might arise if cairo scripts were generated on one system
    with lzo, and then replayed on a system without it.  For now simply
    error out if this occurs.
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-script/cairo-script-file.c b/util/cairo-script/cairo-script-file.c
index 85d292c..c962fce 100644
--- a/util/cairo-script/cairo-script-file.c
+++ b/util/cairo-script/cairo-script-file.c
@@ -176,21 +176,21 @@ csi_file_new_from_string (csi_t *ctx,
 	    status = _csi_error (CAIRO_STATUS_NO_MEMORY);
 	    break;
 
-#if HAVE_ZLIB
 	case ZLIB:
+#if HAVE_ZLIB
 	    if (uncompress ((Bytef *) tmp_str->string, &len,
 			    (Bytef *) src->string, src->len) != Z_OK)
+#endif
 		status = _csi_error (CAIRO_STATUS_NO_MEMORY);
 	    break;
-#endif
-#if HAVE_LZO
 	case LZO:
+#if HAVE_LZO
 	    if (lzo2a_decompress ((lzo_bytep) src->string, src->len,
 				  (lzo_bytep) tmp_str->string, &len,
 				  NULL))
+#endif
 		status = _csi_error (CAIRO_STATUS_NO_MEMORY);
 	    break;
-#endif
 	}
 	if (_csi_unlikely (status)) {
 	    csi_string_free (ctx, tmp_str);
diff --git a/util/cairo-script/cairo-script-operators.c b/util/cairo-script/cairo-script-operators.c
index d423fe5..fe2d479 100644
--- a/util/cairo-script/cairo-script-operators.c
+++ b/util/cairo-script/cairo-script-operators.c
@@ -1769,28 +1769,28 @@ inflate_string (csi_t *ctx, csi_string_t *src)
 	free (bytes);
 	return NULL;
 
-#if HAVE_ZLIB
     case ZLIB:
+#if HAVE_ZLIB
 	if (uncompress ((Bytef *) bytes, &len,
 			(Bytef *) src->string, src->len) != Z_OK)
+#endif
 	{
 	    _csi_free (ctx, bytes);
 	    return NULL;
 	}
 	break;
-#endif
 
-#if HAVE_LZO
     case LZO:
+#if HAVE_LZO
 	if (lzo2a_decompress ((Bytef *) src->string, src->len,
 			      (Bytef *) bytes, &len,
 			      NULL))
+#endif
 	{
 	    _csi_free (ctx, bytes);
 	    return NULL;
 	}
 	break;
-#endif
     }
 
     bytes[len] = '\0';
@@ -2970,22 +2970,22 @@ err_decompress:
 	    cairo_surface_destroy (image);
 	    return _csi_error (CSI_STATUS_READ_ERROR);
 
-#if HAVE_ZLIB
 	case ZLIB:
+#if HAVE_ZLIB
 	    if (uncompress ((Bytef *) data, &out,
 			    (Bytef *) s->string, s->len) != Z_OK)
+#endif
 		goto err_decompress;
 	    break;
-#endif
 
-#if HAVE_LZO
 	case LZO:
+#if HAVE_LZO
 	    if (lzo2a_decompress ((Bytef *) s->string, s->len,
 				  (Bytef *) data, &out,
 				  NULL))
+#endif
 		goto err_decompress;
 	    break;
-#endif
 	}
     }
     else
commit eed0c9f65ae908f3d725a13c2585242e2d1681c0
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Jan 29 17:07:04 2014 -0800

    cairo-script: Compare status with CSI enums
    
    CSI_STATUS_SUCCESS is defined as equivalent to CAIRO_STATUS_SUCCESS.
    We should prefer the former when comparing against csi_status_t
    variables, else we'll get a warning:
    
    cairo-script-interpreter.c:637:23: warning: comparison between
    ‘csi_status_t’ and ‘enum _cairo_status’ [-Wenum-compare]
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/util/cairo-script/cairo-script-interpreter.c b/util/cairo-script/cairo-script-interpreter.c
index bdd5255..50170fc 100644
--- a/util/cairo-script/cairo-script-interpreter.c
+++ b/util/cairo-script/cairo-script-interpreter.c
@@ -634,7 +634,7 @@ cairo_script_interpreter_finish (csi_t *ctx)
     if (! ctx->finished) {
 	_csi_finish (ctx);
 	ctx->finished = 1;
-    } else if (status == CAIRO_STATUS_SUCCESS) {
+    } else if (status == CSI_STATUS_SUCCESS) {
 	status = ctx->status = CSI_STATUS_INTERPRETER_FINISHED;
     }
 
commit a0132059e6b683c6ddcfbd53b7940339f82a311f
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 18 17:37:22 2014 -0800

    perf: Guarantee path width is non-negative
    
    This quells the following warning:
    
      perf/micro/hatching.c:39:5: warning: cannot optimize loop, the
      loop counter may overflow
    
    Width and height aren't going to be negative so enforce it so that the
    compiler can do whatever optimization it wants to do.
    
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/perf/micro/hatching.c b/perf/micro/hatching.c
index b51acec..996bda6 100644
--- a/perf/micro/hatching.c
+++ b/perf/micro/hatching.c
@@ -32,9 +32,9 @@
 #define WIDTH	100
 #define HEIGHT	100
 
-static void path (cairo_t *cr, int width, int height)
+static void path (cairo_t *cr, unsigned int width, unsigned int height)
 {
-    int i;
+    unsigned int i;
 
     for (i = 0; i < width+1; i += STEP) {
 	cairo_rectangle (cr, i-1, -1, 2, height+2);
commit 01aaacd870115cbcbc0492c1afdbbd764d2c32fd
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 18 18:10:20 2014 -0800

    test: Quell warning for inclusion of old rsvg header files
    
    This silences a warning due to header file deprecated as of libsrvg
    2.36.2.  Tested and verified this hackaround on librsvg 2.36.4 and
    2.36.1.  No need to change version dependencies.
    
      In file included from test/any2ppm.c:73:0:
      /usr/include/librsvg-2.0/librsvg/rsvg-cairo.h:27:2: warning:
      #warning "Including <librsvg/rsvg-cairo.h> directly is deprecated."
    
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/any2ppm.c b/test/any2ppm.c
index db0240f..db7f59e 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -70,8 +70,10 @@
 
 #if CAIRO_CAN_TEST_SVG_SURFACE
 #include <librsvg/rsvg.h>
+#ifndef RSVG_CAIRO_H
 #include <librsvg/rsvg-cairo.h>
 #endif
+#endif
 
 #if CAIRO_HAS_SPECTRE
 #include <libspectre/spectre.h>
commit 72f5d6c51ac64ffdd979f27f718b6056e0d5ffef
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 18 20:13:57 2014 -0800

    test: Quell warning for deprecated g_type_init()
    
    The g_type_init() routine was deprecated in glib 2.34.  Tested and
    verified this conditionalization on glib 2.32 and 2.36.  No need to
    change version dependencies.
    
      test/any2ppm.c:864:5: warning: ‘g_type_init’ is deprecated
      (declared at /usr/include/glib-2.0/gobject/gtype.h:669)
    
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/any2ppm.c b/test/any2ppm.c
index 2403347..db0240f 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -861,8 +861,10 @@ main (int argc, char **argv)
     const char *err;
 
 #if CAIRO_CAN_TEST_PDF_SURFACE || CAIRO_CAN_TEST_SVG_SURFACE
+#if GLIB_MAJOR_VERSION <= 2 && GLIB_MINOR_VERSION <= 34
     g_type_init ();
 #endif
+#endif
 
 #if CAIRO_CAN_TEST_SVG_SURFACE
     rsvg_init ();
commit e06e806d761d0a666c4b0cec24330edcaac20ff6
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 18 21:01:07 2014 -0800

    xml: constify source objects for emit routines
    
    This quells the following warnings:
    
      src/cairo-xml-surface.c:576:5: warning: passing argument 2 of
      ‘_cairo_xml_surface_emit_clip_boxes’ discards ‘const’ qualifier from
      pointer target type
      src/cairo-xml-surface.c:462:1: note: expected ‘struct cairo_clip_t
      *’ but argument is of type ‘const struct cairo_clip_t *’
    
    Most of the cairo_xml*emit* routines const their source objects;
    these should follow suit.
    
    Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-xml-surface.c b/src/cairo-xml-surface.c
index c9473c2..04f3955 100644
--- a/src/cairo-xml-surface.c
+++ b/src/cairo-xml-surface.c
@@ -460,7 +460,7 @@ to_xml (cairo_xml_surface_t *surface)
 
 static cairo_status_t
 _cairo_xml_surface_emit_clip_boxes (cairo_xml_surface_t *surface,
-				    cairo_clip_t *clip)
+				    const cairo_clip_t *clip)
 {
     cairo_box_t *box;
     cairo_status_t status;
@@ -521,7 +521,7 @@ _cairo_xml_surface_emit_clip_boxes (cairo_xml_surface_t *surface,
 
 static cairo_status_t
 _cairo_xml_surface_emit_clip_path (cairo_xml_surface_t *surface,
-				   cairo_clip_path_t *clip_path)
+				   const cairo_clip_path_t *clip_path)
 {
     cairo_box_t box;
     cairo_status_t status;
commit f29b81db88f1d34c1a5d062d1976c88215127f6f
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 18 21:13:53 2014 -0800

    mesh: Avoid theoretical infinite loops
    
    This quells this warning:
    
      src/cairo-mesh-pattern-rasterizer.c:731:5: warning: cannot
      optimize possibly infinite loops
    
    I guess the compiler's complaining because if vsteps were negative or
    equal to UINT_MAX the loop could cycle infinitely.  Silly compiler.
    
    Fix as suggested by Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-mesh-pattern-rasterizer.c b/src/cairo-mesh-pattern-rasterizer.c
index 6f0dd66..548e880 100644
--- a/src/cairo-mesh-pattern-rasterizer.c
+++ b/src/cairo-mesh-pattern-rasterizer.c
@@ -697,9 +697,9 @@ rasterize_bezier_patch (unsigned char *data, int width, int height, int stride,
 			cairo_point_double_t p[4][4], double col[4][4])
 {
     double pv[4][2][4], cstart[4], cend[4], dcstart[4], dcend[4];
-    int vsteps, v, i, k;
+    int v, i, k;
 
-    vsteps = 1 << vshift;
+    v = 1 << vshift;
 
     /*
      * pv[i][0] is the function (represented using forward
@@ -724,11 +724,11 @@ rasterize_bezier_patch (unsigned char *data, int width, int height, int stride,
     for (i = 0; i < 4; ++i) {
 	cstart[i]  = col[0][i];
 	cend[i]    = col[1][i];
-	dcstart[i] = (col[2][i] - col[0][i]) / vsteps;
-	dcend[i]   = (col[3][i] - col[1][i]) / vsteps;
+	dcstart[i] = (col[2][i] - col[0][i]) / v;
+	dcend[i]   = (col[3][i] - col[1][i]) / v;
     }
 
-    for (v = 0; v <= vsteps; ++v) {
+    while (v--) {
 	cairo_point_double_t nodes[4];
 	for (i = 0; i < 4; ++i) {
 	    nodes[i].x = pv[i][0][0];
commit 34009765e0044658f926b1f315a4c8acc6562ca3
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Feb 25 13:20:49 2014 -0800

    doc: Drop a couple quartz routines which distcheck claims don't exist
    
    These routines actually do exist in the source code, and have proper
    documentation, so I'm not sure why distcheck dislikes them, but it's
    happier without these listed.
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/doc/public/cairo-sections.txt b/doc/public/cairo-sections.txt
index c67da37..bde2421 100644
--- a/doc/public/cairo-sections.txt
+++ b/doc/public/cairo-sections.txt
@@ -143,9 +143,6 @@ CAIRO_HAS_QUARTZ_SURFACE
 cairo_quartz_surface_create
 cairo_quartz_surface_create_for_cg_context
 cairo_quartz_surface_get_cg_context
-<SUBSECTION Private>
-cairo_quartz_image_surface_create
-cairo_quartz_image_surface_get_image
 </SECTION>
 
 <SECTION>
commit 82f0e660998b7f55cd5fe250ca73b3f7514452d2
Author: Uli Schlachter <psychon at znc.in>
Date:   Thu Feb 27 10:56:20 2014 +0100

    Fix warnings from check-doc-syntax.sh
    
    $ ./check-doc-syntax.sh
    Checking documentation for incorrect syntax
    ./cairo-types-private.h (148): WARNING: cairo_hash_entry_t: missing 'Since' field (is it a private type?)
    ./cairo-types-private.h (161): WARNING: cairo_hash_entry_t: not found
    ./cairo-types-private.h (175): WARNING: cairo_lcd_filter_t: missing 'Since' field (is it a private type?)
    ./cairo-cache-private.h (85): WARNING: cairo_cache_entry_t: missing 'Since' field (is it a private type?)
    ./cairo-region.c (857): WARNING: cairo_region_overlap_t: not found
    ./cairo-raster-source-pattern.c (62): WARNING: SECTION:cairo-raster-source 'Since' field in non-public element
    
    The warnings about missing 'Since' fields are fixed by changing the
    documentation comment so that the script can see that these are private types.
    
    The documentation for cairo_region_overlap_t gets moved to cairo.h, just like
    e.g. the documentation for cairo_status_t.
    
    The 'Since' field from the SECTION:cairo-raster-source is removed, because this
    kind of field is needed on the individual functions and structs, not on the
    section.
    
    Thanks to Bryce Harrington for bringing this up!
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>
    Tested-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-cache-private.h b/src/cairo-cache-private.h
index 76b5561..24b6d0b 100644
--- a/src/cairo-cache-private.h
+++ b/src/cairo-cache-private.h
@@ -43,7 +43,7 @@
 #include "cairo-types-private.h"
 
 /**
- * cairo_cache_entry_t:
+ * _cairo_cache_entry:
  *
  * A #cairo_cache_entry_t contains both a key and a value for
  * #cairo_cache_t. User-derived types for #cairo_cache_entry_t must
diff --git a/src/cairo-raster-source-pattern.c b/src/cairo-raster-source-pattern.c
index 601fe60..64520fe 100644
--- a/src/cairo-raster-source-pattern.c
+++ b/src/cairo-raster-source-pattern.c
@@ -57,8 +57,6 @@
  * Other callbacks are provided for when the pattern is copied temporarily
  * during rasterisation, or more permanently as a snapshot in order to keep
  * the pixel data available for printing.
- *
- * Since: 1.12
  **/
 
 cairo_surface_t *
diff --git a/src/cairo-region.c b/src/cairo-region.c
index a51e224..43a1496 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -841,18 +841,6 @@ cairo_region_translate (cairo_region_t *region,
 slim_hidden_def (cairo_region_translate);
 
 /**
- * cairo_region_overlap_t:
- * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10)
- * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10)
- * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and
- *     partially outside the region. (Since 1.10)
- *
- * Used as the return value for cairo_region_contains_rectangle().
- *
- * Since: 1.10
- **/
-
-/**
  * cairo_region_contains_rectangle:
  * @region: a #cairo_region_t
  * @rectangle: a #cairo_rectangle_int_t
diff --git a/src/cairo-types-private.h b/src/cairo-types-private.h
index 3c2d21a..3d15d96 100644
--- a/src/cairo-types-private.h
+++ b/src/cairo-types-private.h
@@ -113,7 +113,7 @@ struct _cairo_observer {
 };
 
 /**
- * cairo_hash_entry_t:
+ * _cairo_hash_entry:
  *
  * A #cairo_hash_entry_t contains both a key and a value for
  * #cairo_hash_table_t. User-derived types for #cairo_hash_entry_t must
@@ -158,7 +158,7 @@ struct _cairo_array {
 };
 
 /**
- * cairo_lcd_filter_t:
+ * _cairo_lcd_filter:
  * @CAIRO_LCD_FILTER_DEFAULT: Use the default LCD filter for
  *   font backend and target device
  * @CAIRO_LCD_FILTER_NONE: Do not perform LCD filtering
diff --git a/src/cairo.h b/src/cairo.h
index a2f5aa3..2beb975 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -3023,6 +3023,17 @@ cairo_matrix_transform_point (const cairo_matrix_t *matrix,
  **/
 typedef struct _cairo_region cairo_region_t;
 
+/**
+ * cairo_region_overlap_t:
+ * @CAIRO_REGION_OVERLAP_IN: The contents are entirely inside the region. (Since 1.10)
+ * @CAIRO_REGION_OVERLAP_OUT: The contents are entirely outside the region. (Since 1.10)
+ * @CAIRO_REGION_OVERLAP_PART: The contents are partially inside and
+ *     partially outside the region. (Since 1.10)
+ *
+ * Used as the return value for cairo_region_contains_rectangle().
+ *
+ * Since: 1.10
+ **/
 typedef enum _cairo_region_overlap {
     CAIRO_REGION_OVERLAP_IN,		/* completely inside region */
     CAIRO_REGION_OVERLAP_OUT,		/* completely outside region */
commit 798adbaac868faba290f681d3016e88d47e1c2d0
Author: Ravi Nanjundappa <nravi.n at samsung.com>
Date:   Mon May 19 14:59:29 2014 +0530

    src : Fix warn_unused_result warnings from gcc
    
    Fix 'unused-result' warning messages by
    - replacing cairo_private to cairo_private_no_warn in the
      declaration of the cairo private apis '_cairo_surface_unmap_image',
      '_cairo_polygon_add_line', '_cairo_polygon_add_external_edge' and
      '_cairo_polygon_add_contour'
    - removing cairo_warn for 'render_rows' member function pointer in
      'struct _cairo_span_renderer'
    
    Signed-off-by: Ravi Nanjundappa <nravi.n at samsung.com>

diff --git a/src/cairo-spans-private.h b/src/cairo-spans-private.h
index c42b5af..b158f4d 100644
--- a/src/cairo-spans-private.h
+++ b/src/cairo-spans-private.h
@@ -53,7 +53,7 @@ struct _cairo_span_renderer {
 
     /* Render the spans on row y of the destination by whatever compositing
      * method is required. */
-    cairo_warn cairo_status_t
+    cairo_status_t
     (*render_rows) (void *abstract_renderer,
 		    int y, int height,
 		    const cairo_half_open_span_t	*coverages,
diff --git a/src/cairoint.h b/src/cairoint.h
index 861e2f7..5e432d5 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -1324,7 +1324,7 @@ cairo_private cairo_image_surface_t *
 _cairo_surface_map_to_image (cairo_surface_t  *surface,
 			     const cairo_rectangle_int_t *extents);
 
-cairo_private cairo_int_status_t
+cairo_private_no_warn cairo_int_status_t
 _cairo_surface_unmap_image (cairo_surface_t       *surface,
 			    cairo_image_surface_t *image);
 
@@ -1617,18 +1617,18 @@ _cairo_polygon_limit_to_clip (cairo_polygon_t *polygon,
 cairo_private void
 _cairo_polygon_fini (cairo_polygon_t *polygon);
 
-cairo_private cairo_status_t
+cairo_private_no_warn cairo_status_t
 _cairo_polygon_add_line (cairo_polygon_t *polygon,
 			 const cairo_line_t *line,
 			 int top, int bottom,
 			 int dir);
 
-cairo_private cairo_status_t
+cairo_private_no_warn cairo_status_t
 _cairo_polygon_add_external_edge (void *polygon,
 				  const cairo_point_t *p1,
 				  const cairo_point_t *p2);
 
-cairo_private cairo_status_t
+cairo_private_no_warn cairo_status_t
 _cairo_polygon_add_contour (cairo_polygon_t *polygon,
 			    const cairo_contour_t *contour);
 
commit c459716316133f581a63364c12f8163cf6e294af
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Jul 8 12:39:02 2014 -0700

    configure.ac: Quell warnings about AM_PROG_AR when using automake 1.12
    
    Without this, autogen.sh issues warnings like:
    
      /usr/share/automake-1.14/am/ltlibrary.am: warning: 'libcairoboilerplate_cxx.la': linking libtool libraries using a non-POSIX
      /usr/share/automake-1.14/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
      boilerplate/Makefile.am:18:   while processing Libtool library 'libcairoboilerplate_cxx.la'
    
    AM_PROG_AR was introduced in automake 1.11.2.  As per the docs for
    AM_PROG_AR, it is supposed to be included when the archiver ('ar') is
    used, but prior to automake 1.12 the warning was only shown iff
    -Wextra-portability was specified.  automake 1.12 introduced a change
    that includes -Wextra-portability when -Wall is specified.
    
    For further discussion of the issue, see:
    
      http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11401
      http://lists.gnu.org/archive/html/automake/2012-05/msg00014.html
    
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
    Reviewed-by: Uli Schlachter <psychon at znc.in>

diff --git a/configure.ac b/configure.ac
index d126479..b5e2721 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@ AC_CHECK_HEADERS([unistd.h sys/ioctl.h])
 
 AM_INIT_AUTOMAKE([1.11 foreign -Wall no-define no-dist-gzip dist-xz])
 AM_SILENT_RULES([yes])
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12
 
 # Initialize libtool
 LT_PREREQ([2.2])
commit 4efcd33eb5b2aae136a85f40a3f227b11f72d31e
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Tue Jul 8 15:53:41 2014 -0700

    configure.ac: Fix broken build for Qt backend
    
    When --enable-qt is specified, the build will break due to missing
    libstdc++:
    
      CCLD     cairo-test-suite
    /usr/bin/ld: ../boilerplate/.libs/libcairoboilerplate.a(libcairoboilerplate_cxx_la-cairo-boilerplate-qt.o): undefined reference to symbol '__gxx_personality_v0@@CXXABI_1.3'
    //usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    
    When using g++ to compile and link code, g++ automatically links
    libstdc++.  However, in cairo we're using g++ only to compile, so need
    to explicitly link against libstdc++ for backends that need iostream,
    stl, or other stdc++ features.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59038
    Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
    Reviewed-by: Uli Schlachter <psychon at znc.in>

diff --git a/configure.ac b/configure.ac
index 4e35ba7..d126479 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,6 +190,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(qt, Qt, no, [
 		    [qt_REQUIRES=""
 		     use_qt="no (requires Qt4 development libraries)"
 		     ])
+  qt_NONPKGCONFIG_LIBS="-lstdc++"
 ])
 
 dnl ===========================================================================
commit 42be3f754c49b6658a6828e5d48ea7cf5f5ab649
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Mon Jul 21 15:05:14 2014 -0700

    cairo-wideint:  Fix typo in two cairo_uint128 functions
    
    _cairo_int128_negate and _cairo_int128_not are #defines of
    _cairo_uint128_negate and _cairo_uint128_not respectively.  The function
    implementations should use the actual function name not the aliases.  On
    systems without a uint128 type, these could lead to build issues.
    
    Credit for finding this go to Dr. Peter Barnes, LLNL.

diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c
index bba266b..2e056fa 100644
--- a/src/cairo-wideint.c
+++ b/src/cairo-wideint.c
@@ -654,16 +654,16 @@ _cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den)
     return qr;
 }
 
-cairo_int128_t
-_cairo_int128_negate (cairo_int128_t a)
+cairo_uint128_t
+_cairo_uint128_negate (cairo_uint128_t a)
 {
     a.lo = _cairo_uint64_not (a.lo);
     a.hi = _cairo_uint64_not (a.hi);
     return _cairo_uint128_add (a, _cairo_uint32_to_uint128 (1));
 }
 
-cairo_int128_t
-_cairo_int128_not (cairo_int128_t a)
+cairo_uint128_t
+_cairo_uint128_not (cairo_uint128_t a)
 {
     a.lo = _cairo_uint64_not (a.lo);
     a.hi = _cairo_uint64_not (a.hi);
commit c61b3e0838e0474f365ac6bd6b77bed32333c5c0
Author: Ravi Nanjundappa <nravi.n at samsung.com>
Date:   Tue Aug 12 14:16:46 2014 +0530

    test : build fix when --enable-pdf=no
    
    Though --enable-pdf=yes by default, when --enable-pdf=no, the cairo build
    fails due to unavailability of cairo-pdf.h and related cairo pdf's apis.
    The current changes fixes this issue by conditionally checking if PDF
    surface is enabled or not.
    
    Signed-off-by: Ravi Nanjundappa <nravi.n at samsung.com>
    Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
    Tested-by: Bryce Harrington <bryce at osg.samsung.com>

diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c
index 138b3a4..6c5d960 100644
--- a/test/fallback-resolution.c
+++ b/test/fallback-resolution.c
@@ -32,7 +32,10 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <cairo.h>
+
+#if CAIRO_HAS_PDF_SURFACE
 #include <cairo-pdf.h>
+#endif
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
@@ -280,9 +283,11 @@ generate_reference (double ppi_x, double ppi_y, const char *filename)
 
 	options = cairo_font_options_create ();
 
+#if CAIRO_HAS_PDF_SURFACE
 	pdf = cairo_pdf_surface_create ("tmp.pdf", 1, 1);
 	cairo_surface_get_font_options (pdf, options);
 	cairo_surface_destroy (pdf);
+#endif
 
 	cairo_set_font_options (cr, options);
 	cairo_font_options_destroy (options);
commit 8fd32bf158f39bb73609d905d9f2b3420a3d6f37
Author: Bryce Harrington <bryce at osg.samsung.com>
Date:   Wed Sep 17 20:25:37 2014 -0700

    README:  Update required dependencies

diff --git a/README b/README
index 67ce4f5..b58764d 100644
--- a/README
+++ b/README
@@ -67,29 +67,31 @@ backends. Further, the supported backends can be divided into the
 "platform" backends which depend on some underlying platform-specific
 system, (such as the X Window System or some other window system).
 
-As an example, for a standard Linux build, (with image, png, pdf,
-PostScript, svg, and xlib surface backends, and the freetype font
-backend), the following sample commands will install necessary
-dependencies:
+As an example, for a standard Linux build similar to what's shipped by
+your distro, (with image, png, pdf, PostScript, svg, and xlib surface
+backends, and the freetype font backend), the following sample commands
+will install necessary dependencies:
 
     Debian (and similar):
 
-	apt-get install libpng12-dev libz-dev libxrender-dev libfontconfig1-dev
+	apt-get build-dep cairo
 
     Fedora (and similar):
 
 	yum install libpng-devel zlib-devel libXrender-devel fontconfig-devel
 
-(Those commands intentionally don't install pixman from a distribution
-package since if you're manually compiling cairo, then you likely want
-to grab pixman from the same place at the same time and compile it as
-well.)
+Technically you probably don't need pixman from the distribution since
+if you're manually compiling Cairo you probably want an updated pixman
+as well.  However, if you follow the default settings and install pixman
+to /usr/local, your Cairo build should properly use it in preference to
+the system pixman.
+
 
 Supported, "standard" surface backends
 ------------------------------------
 	image backend (required)
 	------------------------
-	pixman >= 0.20.2	http://cairographics.org/releases
+	pixman >= 0.30.0	http://cairographics.org/releases
 
 	png support (can be left out if desired, but many
 	-----------  applications expect it to be present)
@@ -179,10 +181,12 @@ Experimental surface backends
 	packages and developer dependencies are available at Netlabs:
 				ftp://ftp.netlabs.org/pub/cairo
 
+
 Compiling
 =========
 See the INSTALL document for build instructions.
 
+
 History
 =======
 Cairo was originally developed by Carl Worth <cworth at cworth.org> and


More information about the cairo-commit mailing list