[cairo-commit] 3 commits - src/cairo.c src/cairo-path-stroke-traps.c util/cairo-missing

Bryce Harrington bryce at kemper.freedesktop.org
Wed Nov 6 12:21:44 PST 2013


 src/cairo-path-stroke-traps.c      |    2 +-
 src/cairo.c                        |    2 ++
 util/cairo-missing/cairo-missing.h |    2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 56a195a76554abe1d5567c733ba679058fe01303
Author: Bryce Harrington <b.harrington at samsung.com>
Date:   Wed Oct 30 18:43:42 2013 -0700

    Fix SSIZE_T definition problem when making with MSYS on Windows7
    
    Patch provided by Martin Schlemmer <Martin.Schlemmer at nwu.ac.za> on the
    mailing list.
    
    Reviewed-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/util/cairo-missing/cairo-missing.h b/util/cairo-missing/cairo-missing.h
index 7e4f0a3..741b498 100644
--- a/util/cairo-missing/cairo-missing.h
+++ b/util/cairo-missing/cairo-missing.h
@@ -41,7 +41,7 @@
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
-#ifndef _SSIZE_T_DEFINED
+#if !defined(_SSIZE_T_DEFINED) && !defined(_SSIZE_T_)
 typedef SSIZE_T ssize_t;
 #endif
 #endif
commit 66f4140e73e423bfed640cfde5cb50c08cf29e2e
Author: Kouhei Sutou <kou at clear-code.com>
Date:   Mon Oct 28 22:37:54 2013 +0900

    cairo_create(): Add finished surface check
    
    Without this change, the following program crashes:
    
        #include <cairo.h>
        #include <cairo-svg.h>
    
        int
        main(int argc, char **argv)
        {
          cairo_t *cr;
          cairo_surface_t *finished_surface;
    
          finished_surface = cairo_svg_surface_create ("/tmp/xxx.svg", 1.0, 1.0);
          cairo_surface_finish (finished_surface);
    
          cr = cairo_create (finished_surface);
          cairo_destroy (cr);
    
          cairo_surface_destroy (finished_surface);
    
          return 0;
        }
    
    Reviewed-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo.c b/src/cairo.c
index c7128ae..e3acf4d 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -230,6 +230,8 @@ cairo_create (cairo_surface_t *target)
 	return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_NULL_POINTER));
     if (unlikely (target->status))
 	return _cairo_create_in_error (target->status);
+    if (unlikely (target->finished))
+	return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_FINISHED));
 
     if (target->backend->create_context == NULL)
 	return _cairo_create_in_error (_cairo_error (CAIRO_STATUS_WRITE_ERROR));
commit b9263fea14c4c6266140205c0bffb3ae93750999
Author: egag <ed44 at xs4all.nl>
Date:   Wed Oct 9 14:14:02 2013 +0200

    Fixes stroke-clipped, i.c. of a dashed stroke
    
    Similar to 1f4d05b55c96347aa4240190fda27f951b00c539
     'Fix calling '_cairo_spline_intersect' for in-bounds checking of splines'
    
    Reviewed-by: Bryce Harrington <b.harrington at samsung.com>

diff --git a/src/cairo-path-stroke-traps.c b/src/cairo-path-stroke-traps.c
index 304dea7..8b6e30f 100644
--- a/src/cairo-path-stroke-traps.c
+++ b/src/cairo-path-stroke-traps.c
@@ -1019,7 +1019,7 @@ curve_to_dashed (void *closure,
     func = (cairo_spline_add_point_func_t)line_to_dashed;
 
     if (stroker->has_bounds &&
-	! _cairo_spline_intersects (&stroker->current_face.point, b, c, b,
+	! _cairo_spline_intersects (&stroker->current_face.point, b, c, d,
 				    &stroker->line_bounds))
 	return func (closure, d, NULL);
 


More information about the cairo-commit mailing list