diff src/redraw_man.c @ 586:b42d69ab8857 openvg

Replace mbe_clip() with mbe_scissoring()
author Thinker K.F. Li <thinker@branda.to>
date Wed, 30 Jun 2010 13:28:53 +0800
parents f42419c08a65
children 7b4e80ab671a
line wrap: on
line diff
--- a/src/redraw_man.c	Wed Jun 30 09:52:22 2010 +0800
+++ b/src/redraw_man.c	Wed Jun 30 13:28:53 2010 +0800
@@ -2141,23 +2141,11 @@
     mbe_clear(canvas);
 }
 
-static void make_clip(mbe_t *cr, int n_dirty_areas,
-		      area_t **dirty_areas) {
-    int i;
-    area_t *area;
-
-    mbe_new_path(cr);
-    for(i = 0; i < n_dirty_areas; i++) {
-	area = dirty_areas[i];
-	if(area->w < 0.1 || area->h < 0.1)
-	    continue;
-	mbe_rectangle(cr, area->x, area->y, area->w, area->h);
-    }
-    mbe_clip(cr);
-}
+#define make_clip(canvas, n_dirty_areas, dirty_areas)	\
+    mbe_scissoring(canvas, n_dirty_areas, dirty_areas)
 
 static void reset_clip(canvas_t *cr) {
-    mbe_reset_clip(cr);
+    mbe_reset_scissoring(cr);
 }
 
 static void copy_cr_2_backend(redraw_man_t *rdman, int n_dirty_areas,
@@ -2168,9 +2156,7 @@
     mbe_copy_source(rdman->cr, rdman->backend);
 }
 #else /* UNITTEST */
-static void make_clip(mbe_t *cr, int n_dirty_areas,
-		      area_t **dirty_areas) {
-}
+#define make_clip(canvas, n_dirty_areas, dirty_areas)
 
 static void clear_canvas(canvas_t *canvas) {
 }