[cairo-commit] 4 commits - src/cairo-cff-subset.c src/cairo-path-fixed-private.h src/cairo-scaled-font-subsets-private.h src/cairo-script-surface.c src/drm

Andrea Canciani ranma42 at kemper.freedesktop.org
Sat Oct 30 07:08:26 PDT 2010


 src/cairo-cff-subset.c                  |    2 +-
 src/cairo-path-fixed-private.h          |    8 ++++----
 src/cairo-scaled-font-subsets-private.h |    2 +-
 src/cairo-script-surface.c              |   16 +++++++---------
 src/drm/cairo-drm-i915-surface.c        |    6 +++---
 src/drm/cairo-drm-i965-surface.c        |    6 +++---
 6 files changed, 19 insertions(+), 21 deletions(-)

New commits:
commit bb30dae210da3fc71bb242c7a73b8f9308eec2a1
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Oct 30 11:33:33 2010 +0200

    script: Fix compilation
    
    Use accessors instead of directly accessing path optimization flags.
    
    Change the conditions for outputting tolerance (was 'when
    path->is_rectilinear is FALSE', now is 'whenever the path includes a
    curve').
    
    Always output tolerance for strokes, because pen depends on tolerance
    (for round caps/joins and for cusps).

diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index 0f0446d..6da7ae5 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -2054,13 +2054,13 @@ _cairo_script_surface_clipper_intersect_clip_path (cairo_surface_clipper_t *clip
     if (unlikely (status))
 	return status;
 
-    if (! path->is_rectilinear) {
+    if (path->has_curve_to) {
 	status = _emit_tolerance (surface, tolerance, matrix_updated);
 	if (unlikely (status))
 	    return status;
     }
 
-    if (! path->maybe_fill_region) {
+    if (! _cairo_path_fixed_fill_maybe_region (path)) {
 	status = _emit_antialias (surface, antialias);
 	if (unlikely (status))
 	    return status;
@@ -2343,11 +2343,9 @@ _cairo_script_surface_stroke (void				*abstract_surface,
     if (unlikely (status))
 	goto BAIL;
 
-    if (! path->is_rectilinear) {
-	status = _emit_tolerance (surface, tolerance, matrix_updated);
-	if (unlikely (status))
-	    goto BAIL;
-    }
+    status = _emit_tolerance (surface, tolerance, matrix_updated);
+    if (unlikely (status))
+	goto BAIL;
 
     status = _emit_antialias (surface, antialias);
     if (unlikely (status))
@@ -2414,13 +2412,13 @@ _cairo_script_surface_fill (void			*abstract_surface,
 	    goto BAIL;
     }
 
-    if (! path->is_rectilinear) {
+    if (path->has_curve_to) {
 	status = _emit_tolerance (surface, tolerance, matrix_updated);
 	if (unlikely (status))
 	    goto BAIL;
     }
 
-    if (! path->maybe_fill_region) {
+    if (! _cairo_path_fixed_fill_maybe_region (path)) {
 	status = _emit_antialias (surface, antialias);
 	if (unlikely (status))
 	    goto BAIL;
commit e43ae002118992961ce2b55b18774cec350e662c
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Oct 30 11:31:19 2010 +0200

    cff: Fixes for 'make check'
    
    Fixed some complaints by 'make check' about exported symbols in cff.

diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index e3a0e4b..5954742 100644
--- a/src/cairo-cff-subset.c
+++ b/src/cairo-cff-subset.c
@@ -1473,7 +1473,7 @@ cairo_cff_font_write_fdselect (cairo_cff_font_t  *font)
 }
 
 /* Winansi to CFF standard strings mapping for characters 128 to 255 */
-const int winansi_to_cff_std_string[] = {
+static const int winansi_to_cff_std_string[] = {
 	/* 128 */
       0,   0, 117, 101, 118, 121, 112, 113,
     126, 122, 192, 107, 142,   0, 199,   0,
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h
index b1e06b7..e2f2b4c 100644
--- a/src/cairo-scaled-font-subsets-private.h
+++ b/src/cairo-scaled-font-subsets-private.h
@@ -392,7 +392,7 @@ _cairo_cff_subset_fini (cairo_cff_subset_t *cff_subset);
  *
  * Return %TRUE if @scaled_font is a CID CFF font, otherwise return %FALSE.
  **/
-cairo_bool_t
+cairo_private cairo_bool_t
 _cairo_cff_scaled_font_is_cid_cff (cairo_scaled_font_t *scaled_font);
 
 /**
commit 22ea4609be03584de2f2985e55bf169b7af4f868
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Oct 30 11:28:03 2010 +0200

    path: Solve co-dependency problem
    
    FALSE and TRUE are defined in cairoint.h, but cairoint.h depends on
    cairo-path-fixed-private.h, so just use 0/1 to avoid the depencency
    loop.
    
    Fixes a number of errors reported by 'make check'.

diff --git a/src/cairo-path-fixed-private.h b/src/cairo-path-fixed-private.h
index ce138de..9fcd502 100644
--- a/src/cairo-path-fixed-private.h
+++ b/src/cairo-path-fixed-private.h
@@ -151,10 +151,10 @@ static inline cairo_bool_t
 _cairo_path_fixed_fill_is_rectilinear (const cairo_path_fixed_t *path)
 {
     if (! path->fill_is_rectilinear)
-	return FALSE;
+	return 0;
 
     if (! path->has_current_point || path->needs_move_to)
-	return TRUE;
+	return 1;
 
     /* check whether the implicit close preserves the rectilinear property */
     return path->current_point.x == path->last_move_point.x ||
@@ -171,10 +171,10 @@ static inline cairo_bool_t
 _cairo_path_fixed_fill_maybe_region (const cairo_path_fixed_t *path)
 {
     if (! path->fill_maybe_region)
-	return FALSE;
+	return 0;
 
     if (! path->has_current_point || path->needs_move_to)
-	return TRUE;
+	return 1;
 
     /* check whether the implicit close preserves the rectilinear property
      * (the integer point property is automatically preserved)
commit 330b343952c103d902841a1da7422dd4d0623117
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Oct 30 11:26:13 2010 +0200

    drm: Do not access path flags directly
    
    Fixes compilation

diff --git a/src/drm/cairo-drm-i915-surface.c b/src/drm/cairo-drm-i915-surface.c
index 8d365dd..373e674 100644
--- a/src/drm/cairo-drm-i915-surface.c
+++ b/src/drm/cairo-drm-i915-surface.c
@@ -1915,9 +1915,9 @@ i915_surface_fill_with_alpha (void			*abstract_dst,
 	return status;
     }
 
-    assert (! path->is_empty_fill);
+    assert (! _cairo_path_fixed_fill_is_empty (path));
 
-    if (_cairo_path_fixed_is_rectilinear_fill (path)) {
+    if (_cairo_path_fixed_fill_is_rectilinear (path)) {
 	cairo_boxes_t boxes;
 
 	_cairo_boxes_init (&boxes);
@@ -2259,7 +2259,7 @@ i915_surface_stroke (void			*abstract_dst,
 	return status;
     }
 
-    if (path->is_rectilinear) {
+    if (_cairo_path_fixed_stroke_is_rectilinear (path)) {
 	cairo_boxes_t boxes;
 
 	_cairo_boxes_init (&boxes);
diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c
index e578d6f..c3618a3 100644
--- a/src/drm/cairo-drm-i965-surface.c
+++ b/src/drm/cairo-drm-i965-surface.c
@@ -1322,7 +1322,7 @@ i965_surface_stroke (void			*abstract_dst,
 	return status;
     }
 
-    if (path->is_rectilinear) {
+    if (_cairo_path_fixed_stroke_is_rectilinear (path)) {
 	cairo_boxes_t boxes;
 
 	_cairo_boxes_init (&boxes);
@@ -1429,9 +1429,9 @@ i965_surface_fill (void			*abstract_dst,
 	return status;
     }
 
-    assert (! path->is_empty_fill);
+    assert (! _cairo_path_fixed_fill_is_empty (path));
 
-    if (_cairo_path_fixed_is_rectilinear_fill (path)) {
+    if (_cairo_path_fixed_fill_is_rectilinear (path)) {
 	cairo_boxes_t boxes;
 
 	_cairo_boxes_init (&boxes);


More information about the cairo-commit mailing list