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

Chris Wilson ickle at kemper.freedesktop.org
Wed Mar 24 07:23:41 PDT 2010


 src/cairo-surface-subsurface.c |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 36e12b1952f9bdc52491c5a9bdf8ce155865c362
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Mar 24 12:14:20 2010 +0000

    subsurface: Ignore return from _cairo_clip_init_copy()
    
    The return is just a hint that the clip is empty, however we are about
    to immediately apply the surface clip and so do not care for an
    'optimised' path.

diff --git a/src/cairo-surface-subsurface.c b/src/cairo-surface-subsurface.c
index 52748a0..34e0a60 100644
--- a/src/cairo-surface-subsurface.c
+++ b/src/cairo-surface-subsurface.c
@@ -69,7 +69,8 @@ _cairo_surface_subsurface_paint (void *abstract_surface,
     cairo_status_t status;
     cairo_clip_t target_clip;
 
-    status = _cairo_clip_rectangle (_cairo_clip_init_copy (&target_clip, clip), &rect);
+    _cairo_clip_init_copy (&target_clip, clip);
+    status = _cairo_clip_rectangle (&target_clip, &rect);
     if (unlikely (status))
 	goto CLEANUP;
 
@@ -93,7 +94,8 @@ _cairo_surface_subsurface_mask (void *abstract_surface,
     cairo_status_t status;
     cairo_clip_t target_clip;
 
-    status = _cairo_clip_rectangle (_cairo_clip_init_copy (&target_clip, clip), &rect);
+    _cairo_clip_init_copy (&target_clip, clip);
+    status = _cairo_clip_rectangle (&target_clip, &rect);
     if (unlikely (status))
 	goto CLEANUP;
 
@@ -120,7 +122,8 @@ _cairo_surface_subsurface_fill (void			*abstract_surface,
     cairo_status_t status;
     cairo_clip_t target_clip;
 
-    status = _cairo_clip_rectangle (_cairo_clip_init_copy (&target_clip, clip), &rect);
+    _cairo_clip_init_copy (&target_clip, clip);
+    status = _cairo_clip_rectangle (&target_clip, &rect);
     if (unlikely (status))
 	goto CLEANUP;
 
@@ -150,7 +153,8 @@ _cairo_surface_subsurface_stroke (void				*abstract_surface,
     cairo_status_t status;
     cairo_clip_t target_clip;
 
-    status = _cairo_clip_rectangle (_cairo_clip_init_copy (&target_clip, clip), &rect);
+    _cairo_clip_init_copy (&target_clip, clip);
+    status = _cairo_clip_rectangle (&target_clip, &rect);
     if (unlikely (status))
 	goto CLEANUP;
 
@@ -179,7 +183,8 @@ _cairo_surface_subsurface_glyphs (void			*abstract_surface,
     cairo_status_t status;
     cairo_clip_t target_clip;
 
-    status = _cairo_clip_rectangle (_cairo_clip_init_copy (&target_clip, clip), &rect);
+    _cairo_clip_init_copy (&target_clip, clip);
+    status = _cairo_clip_rectangle (&target_clip, &rect);
     if (unlikely (status))
 	goto CLEANUP;
 


More information about the cairo-commit mailing list