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

Benjamin Otte company at kemper.freedesktop.org
Thu Apr 29 06:41:15 PDT 2010


 src/cairo-surface-fallback.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 6288ad719da898c4a75cdc6527f5a41d4c900e57
Author: Benjamin Otte <otte at redhat.com>
Date:   Thu Apr 29 15:37:32 2010 +0200

    fallback: translate extents regions properly
    
    The extents clip regions that were created for unbounded operators were
    not translated properly. This has been changed now.
    
    This is a followup to 9ce8bef9d6e6d773dd1f4b184916ed5c96c3541d.

diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 5149a96..f3016a1 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -549,6 +549,7 @@ _composite_traps_draw_func (void                          *closure,
         extents_region = cairo_region_create_rectangle (extents);
         if (unlikely (extents_region->status))
             return extents_region->status;
+        cairo_region_translate (extents_region, -dst_x, -dst_y);
         clip_region = extents_region;
     }
 
@@ -976,14 +977,14 @@ CLEANUP_BOXES:
 }
 
 static cairo_status_t
-_cairo_surface_mask_draw_func (void                          *closure,
-			       cairo_operator_t               op,
-			       const cairo_pattern_t         *src,
-			       cairo_surface_t               *dst,
-			       int                            dst_x,
-			       int                            dst_y,
+_cairo_surface_mask_draw_func (void                        *closure,
+			       cairo_operator_t             op,
+			       const cairo_pattern_t       *src,
+			       cairo_surface_t             *dst,
+			       int                          dst_x,
+			       int                          dst_y,
 			       const cairo_rectangle_int_t *extents,
-			       cairo_region_t		    *clip_region)
+			       cairo_region_t		   *clip_region)
 {
     cairo_pattern_t *mask = closure;
     cairo_status_t status;
@@ -994,6 +995,7 @@ _cairo_surface_mask_draw_func (void                          *closure,
         extents_region = cairo_region_create_rectangle (extents);
         if (unlikely (extents_region->status))
             return extents_region->status;
+        cairo_region_translate (extents_region, -dst_x, -dst_y);
         clip_region = extents_region;
     }
 
@@ -1309,6 +1311,7 @@ _cairo_surface_old_show_glyphs_draw_func (void                          *closure
         extents_region = cairo_region_create_rectangle (extents);
         if (unlikely (extents_region->status))
             return extents_region->status;
+        cairo_region_translate (extents_region, -dst_x, -dst_y);
         clip_region = extents_region;
     }
 


More information about the cairo-commit mailing list