diff src/redraw_man.c @ 408:7f7855df2af0

Make unittest built by automake and autoconf. ./configure --enable-testcase to build testcase.
author Thinker K.F. Li <thinker@branda.to>
date Tue, 07 Jul 2009 22:46:19 +0800
parents 44b8223f307c
children 585baa462778
line wrap: on
line diff
--- a/src/redraw_man.c	Tue Jul 07 22:45:12 2009 +0800
+++ b/src/redraw_man.c	Tue Jul 07 22:46:19 2009 +0800
@@ -10,6 +10,9 @@
 #include "mb_observer.h"
 #include "mb_prop.h"
 
+/* required by rdman_img_ldr_load_paint() */
+#include "mb_paint.h"
+
 /*! \page dirty Dirty geo, coord, and area.
  *
  * \section dirty_of_ego Dirty of geo
@@ -1885,6 +1888,10 @@
     cairo_set_operator(rdman->backend, saved_op);
 }
 #else /* UNITTEST */
+static void make_clip(cairo_t *cr, int n_dirty_areas,
+		      area_t **dirty_areas) {
+}
+
 static void clear_canvas(canvas_t *canvas) {
 }
 
@@ -2293,7 +2300,6 @@
 /* Test cases */
 
 #include <CUnit/Basic.h>
-#include "mb_paint.h"
 
 struct _sh_dummy {
     shape_t shape;
@@ -2376,7 +2382,7 @@
     if(paint == NULL)
 	return NULL;
 
-    paint_init(paint, dummy_paint_prepare, dummy_paint_free);
+    paint_init(paint, MBP_DUMMY, dummy_paint_prepare, dummy_paint_free);
 
     return paint;
 }