[cairo-commit] cairo/test cairo-test.c, 1.47, 1.48 cairo-test.h, 1.12, 1.13 xlib-surface.c, 1.4, 1.5

Carl Worth commit at pdx.freedesktop.org
Mon Aug 1 13:33:49 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv22964/test

Modified Files:
	cairo-test.c cairo-test.h xlib-surface.c 
Log Message:

2005-08-01  Carl Worth  <cworth at cworth.org>

        * src/cairo-debug.h: New public header file.

        * src/cairo-debug.c: (cairo_debug_reset_static_data): New function
        to reset all static data (eg. caches) to their initial state.

        * Makefile.am: Fix check-valgrind target to depend on the 'all'
        target.

        * configure.in: Add check for a new, proposed, XrmFinalize
        function.

        * src/Makefile.am: Add cairo-debug.c.

        * src/cairo.h:
        * src/cairo-features.h.in: Move the definition of
        CAIRO_BEGIN_DECLS to cairo-features.h so that it can be shared
        between public header files, and so that it doesn't clutter
        cairo.h

        * src/cairoint.h:
        * src/cairo-font.c: (_get_global_simple_cache),
        (_get_outer_font_cache), (_get_inner_font_cache),
        (_cairo_unlock_global_image_glyph_cache),
        (_cairo_font_reset_static_data):
        * src/cairo-ft-font.c: (_cairo_ft_font_reset_static_data):
        * src/cairo-xlib-screen.c: (_cairo_xlib_close_display),
        (_cairo_xlib_screen_info_reset),
        (_cairo_xlib_screen_reset_static_data):
        * src/cairo-xlib-surface.c: (_unlock_xlib_glyphset_caches),
        (_destroy_glyphset_cache_recurse),
        (_cairo_xlib_surface_reset_static_data): Implement
        reset_static_data in all modules as required.

        * test/xlib-surface.c: (main):
        * test/cairo-test.h:
        * test/cairo-test.c: (cairo_test_for_target),
        (cairo_test_expecting): Call cairo_debug_reset_static_data and
        FcFini so that we can have all tests be valgrind-clean with
        respect to memory leaks and still-reachable data.


Index: cairo-test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- cairo-test.c	28 Jul 2005 18:22:43 -0000	1.47
+++ cairo-test.c	1 Aug 2005 20:33:47 -0000	1.48
@@ -29,6 +29,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <string.h>
+#include <fontconfig/fontconfig.h>
 
 #include "cairo-test.h"
 
@@ -469,6 +470,9 @@
 UNWIND_CAIRO:
     cairo_destroy (cr);
     cairo_surface_destroy (surface);
+
+    cairo_debug_reset_static_data ();
+
     target->cleanup_target (target->closure);
 
 UNWIND_STRINGS:
@@ -557,6 +561,8 @@
 
     fclose (cairo_test_log_file);
 
+    FcFini ();
+
     return ret;
 }
 

Index: cairo-test.h
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cairo-test.h	18 Jul 2005 15:04:16 -0000	1.12
+++ cairo-test.h	1 Aug 2005 20:33:47 -0000	1.13
@@ -28,6 +28,7 @@
 
 #include <math.h>
 #include <cairo.h>
+#include <cairo-debug.h>
 
 typedef enum cairo_test_status {
     CAIRO_TEST_SUCCESS = 0,

Index: xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/test/xlib-surface.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xlib-surface.c	14 Jul 2005 22:10:48 -0000	1.4
+++ xlib-surface.c	1 Aug 2005 20:33:47 -0000	1.5
@@ -267,6 +267,8 @@
 
     XCloseDisplay (dpy);
 
+    cairo_debug_reset_static_data ();
+
     fclose (log_file);
     
     return result;




More information about the cairo-commit mailing list