[cairo-commit] src/cairo-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Mar 2 10:31:36 PST 2011


 src/cairo-surface.c |   27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

New commits:
commit 9669b300a06eb793bb112737cb9085ff020de682
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Mar 2 18:30:47 2011 +0000

    surface: Don't pass INT_UNSUPPORTED to _cairo_surface_set_error
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index b4c9eb6..91a5c50 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1779,7 +1779,7 @@ _cairo_surface_clone_similar (cairo_surface_t  *surface,
 	(*clone_out)->device_transform_inverse = src->device_transform_inverse;
     }
 
-    return status;
+    return CAIRO_STATUS_SUCCESS;
 }
 
 /**
@@ -2711,25 +2711,22 @@ _cairo_surface_old_show_glyphs (cairo_scaled_font_t	*scaled_font,
 				int			 num_glyphs,
 				cairo_region_t		*clip_region)
 {
-    cairo_status_t status;
-
-    if (dst->status)
+    if (unlikely (dst->status))
 	return dst->status;
 
     assert (_cairo_surface_is_writable (dst));
 
-    if (dst->backend->old_show_glyphs) {
-	status = dst->backend->old_show_glyphs (scaled_font,
-						op, pattern, dst,
-						source_x, source_y,
-                                                dest_x, dest_y,
-						width, height,
-						glyphs, num_glyphs,
-						clip_region);
-    } else
-	status = CAIRO_INT_STATUS_UNSUPPORTED;
+    if (dst->backend->old_show_glyphs == NULL)
+	return CAIRO_INT_STATUS_UNSUPPORTED;
 
-    return _cairo_surface_set_error (dst, status);
+    return _cairo_surface_set_error
+	    (dst, dst->backend->old_show_glyphs (scaled_font,
+						 op, pattern, dst,
+						 source_x, source_y,
+						 dest_x, dest_y,
+						 width, height,
+						 glyphs, num_glyphs,
+						 clip_region));
 }
 
 static cairo_status_t


More information about the cairo-commit mailing list