[cairo-commit] 4 commits - perf/cairo-perf-diff test/get-clip.c test/Makefile.am

Carl Worth cworth at kemper.freedesktop.org
Tue Nov 14 15:14:19 PST 2006


 perf/cairo-perf-diff |    1 +
 test/Makefile.am     |   10 +---------
 test/get-clip.c      |   24 ++++++++++++++++--------
 3 files changed, 18 insertions(+), 17 deletions(-)

New commits:
diff-tree eeb1fa42aa44e1422dcfcdc6eb772b764c3ced58 (from 28a9f1dd1407b0070a2ba1c780a6f763acb47810)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Nov 14 14:44:03 2006 -0800

    Add missing pattern-getters-ref.png to Makefile to avoid breaking distcheck target

diff --git a/test/Makefile.am b/test/Makefile.am
index e23b7b7..f48c5ab 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -275,6 +275,7 @@ paint-source-alpha-pdf-argb32-ref.png			
 paint-source-alpha-svg-ref.png				\
 paint-with-alpha-ref.png				\
 paint-with-alpha-svg-ref.png				\
+pattern-getters-ref.png					\
 pixman-rotate-ref.png					\
 pixman-rotate-rgb24-ref.png				\
 push-group-ref.png					\
diff-tree 28a9f1dd1407b0070a2ba1c780a6f763acb47810 (from 7b86cf513e9f6bdf68e391f6df6f859eba05ba9c)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Nov 14 14:35:35 2006 -0800

    Fix get-clip test for surfaces not implementing set_clip_region

diff --git a/test/get-clip.c b/test/get-clip.c
index cfd8141..b2a001c 100644
--- a/test/get-clip.c
+++ b/test/get-clip.c
@@ -42,6 +42,10 @@ check_count (const char *message, cairo_
     if (!uses_clip_rects) {
         if (expected == 0 && list->num_rectangles == 0)
             return 1;
+	if (list->num_rectangles == expected)
+	    return 1;
+	if (list->status == CAIRO_STATUS_CLIP_NOT_REPRESENTABLE)
+	    return 1;
         cairo_test_log ("Error: %s; cairo_copy_clip_rectangles unexpectedly got %d rectangles\n",
                         message, list->num_rectangles);
         return 0;
@@ -122,14 +126,11 @@ draw (cairo_t *cr, int width, int height
     cr2 = cairo_create (surface);
     cairo_surface_destroy (surface);
 
-    /* check the surface type so we ignore cairo_copy_clip_rectangles failures
-       on surface types that don't use rectangle lists for clipping */
+    /* Check the surface type so we ignore cairo_copy_clip_rectangles failures
+     * on surface types that don't use rectangle lists for clipping.
+     * Default to FALSE for the internal surface types, (meta, test-fallback, etc.)
+     */
     switch (cairo_surface_get_type (surface)) {
-    case CAIRO_SURFACE_TYPE_PDF:
-    case CAIRO_SURFACE_TYPE_PS:
-    case CAIRO_SURFACE_TYPE_SVG:
-        uses_clip_rects = 0;
-        break;
     case CAIRO_SURFACE_TYPE_IMAGE:
     case CAIRO_SURFACE_TYPE_XLIB:
     case CAIRO_SURFACE_TYPE_XCB:
@@ -138,8 +139,15 @@ draw (cairo_t *cr, int width, int height
     case CAIRO_SURFACE_TYPE_WIN32:
     case CAIRO_SURFACE_TYPE_BEOS:
     case CAIRO_SURFACE_TYPE_DIRECTFB:
+        uses_clip_rects = TRUE;
+	break;
+    case CAIRO_SURFACE_TYPE_PDF:
+    case CAIRO_SURFACE_TYPE_PS:
+    case CAIRO_SURFACE_TYPE_SVG:
+    case CAIRO_SURFACE_TYPE_NQUARTZ:
+    case CAIRO_SURFACE_TYPE_OS2:
     default:
-        uses_clip_rects = 1;
+        uses_clip_rects = FALSE;
         break;
     }
 
diff-tree 7b86cf513e9f6bdf68e391f6df6f859eba05ba9c (from 0f7381b26eae74903754b4fb5c1220a8626df5f4)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Nov 14 14:34:36 2006 -0800

    Remove non-existent reference images from Makefile to avoid breaking distcheck target

diff --git a/test/Makefile.am b/test/Makefile.am
index fd21236..e23b7b7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -186,8 +186,6 @@ clip-twice-ps-argb32-ref.png				\
 close-path-ref.png					\
 close-path-ps-argb32-ref.png				\
 composite-integer-translate-over-ref.png		\
-composite-integer-translate-over-pdf-argb32-ref.png	\
-composite-integer-translate-over-svg-ref.png		\
 composite-integer-translate-over-repeat-ref.png		\
 composite-integer-translate-source-ref.png		\
 copy-path-ref.png					\
@@ -250,9 +248,6 @@ line-width-scale-ps-argb32-ref.png			\
 long-lines-ref.png					\
 mask-ref.png						\
 mask-rgb24-ref.png					\
-mask-beos-bitmap-argb32-ref.png				\
-mask-beos-bitmap-rgb24-ref.png				\
-mask-beos-rgb24-ref.png					\
 mask-svg-argb32-ref.png					\
 mask-svg-rgb24-ref.png					\
 mask-ctm-ref.png					\
@@ -303,8 +298,6 @@ self-intersecting-ref.png				\
 self-intersecting-rgb24-ref.png				\
 set-source-ref.png					\
 set-source-rgb24-ref.png				\
-set-source-beos-bitmap-rgb24-ref.png			\
-set-source-beos-rgb24-ref.png				\
 set-source-svg-argb32-ref.png				\
 set-source-svg-rgb24-ref.png				\
 show-glyphs-many-ref.png				\
@@ -331,8 +324,6 @@ transforms-ps-argb32-ref.png				\
 translate-show-surface-ref.png				\
 trap-clip-ref.png					\
 trap-clip-rgb24-ref.png					\
-trap-clip-beos-bitmap-rgb24-ref.png			\
-trap-clip-beos-rgb24-ref.png				\
 trap-clip-svg-argb32-ref.png				\
 trap-clip-svg-rgb24-ref.png				\
 unantialiased-shapes-ref.png				\
diff-tree 0f7381b26eae74903754b4fb5c1220a8626df5f4 (from f3f6ea3092072defb958ee3a6b2271cb51b4a4ca)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Nov 14 13:27:52 2006 -0800

    cairo-perf-diff: Run git-ls-tree from the correct directory
    
    Before this change, cairo-perf-diff would work correctly only
    if run from the top-level directory, (and if run from any other
    directory it would not pull in the latest boilerplate and perf
    files).

diff --git a/perf/cairo-perf-diff b/perf/cairo-perf-diff
index 1f2089e..47ac456 100755
--- a/perf/cairo-perf-diff
+++ b/perf/cairo-perf-diff
@@ -117,6 +117,7 @@ run_cairo_perf_if_not_cached() {
 	mkdir $CAIRO_PERF_DIR
     fi
 
+    cd $CAIRO_DIR
     boilerplate_files=$(git ls-tree --name-only HEAD boilerplate/*)
     perf_files=$(git ls-tree --name-only HEAD perf/*)
     cd $CAIRO_PERF_DIR


More information about the cairo-commit mailing list