[cairo-commit] 2 commits - src/cairo-pattern.c test/cairo-test.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Aug 11 13:29:22 PDT 2008


 src/cairo-pattern.c |    5 +++--
 test/cairo-test.c   |    5 +++++
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 31565677dbbc3212635ec95951a236e4243a2552
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Aug 11 18:21:53 2008 +0100

    [pattern] Unbounded patterns should have infinite extents.
    
    Fix a slight typo that produced negative sized extents instead of the
    maximum.

diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 0c84a8e..3dfd7c8 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -2093,10 +2093,11 @@ _cairo_pattern_get_extents (cairo_pattern_t         *pattern,
      * horizontal/vertical linear gradients).
      */
 
+    /* unbounded patterns -> 'infinite' extents */
     extents->x = CAIRO_RECT_INT_MIN;
     extents->y = CAIRO_RECT_INT_MIN;
-    extents->width = CAIRO_RECT_INT_MIN + CAIRO_RECT_INT_MAX;
-    extents->height = CAIRO_RECT_INT_MIN + CAIRO_RECT_INT_MAX;
+    extents->width = CAIRO_RECT_INT_MAX - CAIRO_RECT_INT_MIN;
+    extents->height = CAIRO_RECT_INT_MAX - CAIRO_RECT_INT_MIN;
 
     return CAIRO_STATUS_SUCCESS;
 }
commit 5ace0cb17a6e4719df1a32944595bd26a8f7f436
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Aug 11 17:28:20 2008 +0100

    [cairo-test] Exclude lcd-filter tests for vector targets.
    
    Add text-lcd-filter-* to vector_ignored_tests.

diff --git a/test/cairo-test.c b/test/cairo-test.c
index 0c6d823..4fd817f 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -82,6 +82,7 @@ static const char *vector_ignored_tests[] = {
     /* We can't match the results of tests that depend on
      * CAIRO_ANTIALIAS_NONE/SUBPIXEL for vector backends
      * (nor do we care). */
+    /* XXX Perhaps this should be moved to a flag in cairo_test_t? */
     "a1-image-sample",
     "a1-traps-sample",
     "ft-text-antialias-none",
@@ -89,6 +90,10 @@ static const char *vector_ignored_tests[] = {
     "text-antialias-gray",
     "text-antialias-none",
     "text-antialias-subpixel",
+    "text-lcd-filter-fir3",
+    "text-lcd-filter-fir5",
+    "text-lcd-filter-intra-pixel",
+    "text-lcd-filter-none",
     "unantialiased-shapes",
 
     /* Nor do we care about rendering anomalies in external renderers. */


More information about the cairo-commit mailing list