[cairo-commit] 4 commits - boilerplate/cairo-boilerplate.c src/cairo-spans.c test/fill-image.test-fallback.ref.png test/fill-image.xlib.ref.png test/Makefile.am test/scale-offset-image.c test/scale-offset-similar.c

M. Joonas Pihlaja joonas at kemper.freedesktop.org
Thu Jun 18 16:53:59 PDT 2009


 boilerplate/cairo-boilerplate.c       |    2 +-
 src/cairo-spans.c                     |    2 ++
 test/Makefile.am                      |    2 ++
 test/fill-image.test-fallback.ref.png |binary
 test/fill-image.xlib.ref.png          |binary
 test/scale-offset-image.c             |    2 +-
 test/scale-offset-similar.c           |    2 +-
 7 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 6d8b353658da1ad973e3bda9e89799a7467d8182
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Fri Jun 19 02:37:19 2009 +0300

    [spans] Squash a compiler warning when creating error objects.
    
    Handle the new CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED status code
    in the switch/case of the ..._create_in_error() functions for
    creating span renderers or scan converters.

diff --git a/src/cairo-spans.c b/src/cairo-spans.c
index 625f83f..cf8f767 100644
--- a/src/cairo-spans.c
+++ b/src/cairo-spans.c
@@ -290,6 +290,7 @@ _cairo_scan_converter_create_in_error (cairo_status_t status)
     case CAIRO_STATUS_INVALID_WEIGHT: RETURN_NIL;
     case CAIRO_STATUS_NO_MEMORY: RETURN_NIL;
     case CAIRO_STATUS_INVALID_SIZE: RETURN_NIL;
+    case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: RETURN_NIL;
     default:
 	break;
     }
@@ -395,6 +396,7 @@ _cairo_span_renderer_create_in_error (cairo_status_t status)
     case CAIRO_STATUS_INVALID_WEIGHT: RETURN_NIL;
     case CAIRO_STATUS_NO_MEMORY: RETURN_NIL;
     case CAIRO_STATUS_INVALID_SIZE: RETURN_NIL;
+    case CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED: RETURN_NIL;
     default:
 	break;
     }
commit 7651227d3dfe4ebf40e95a72106957a9ec51dd3e
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Fri Jun 19 02:03:39 2009 +0300

    Revert "[test] Make the xlib-fallback use the image refs."
    
    This reverts commit 903b39c30448d62e2cbf9d075c5256a333bd5d8f.
    
    The xlib-fallback actually renders mostly via traps at the moment,
    so staying with xlib refs is the right thing to do.

diff --git a/boilerplate/cairo-boilerplate.c b/boilerplate/cairo-boilerplate.c
index 11c0833..0a9ab62 100644
--- a/boilerplate/cairo-boilerplate.c
+++ b/boilerplate/cairo-boilerplate.c
@@ -574,7 +574,7 @@ static const cairo_boilerplate_target_t targets[] =
     /* This is a fallback surface which uses xlib fallbacks instead of
      * the Render extension. */
     {
-	"xlib-fallback", "image", NULL,
+	"xlib-fallback", "xlib", NULL,
 	CAIRO_SURFACE_TYPE_XLIB, CAIRO_CONTENT_COLOR, 1,
 	_cairo_boilerplate_xlib_fallback_create_surface, NULL,
 	NULL,
commit 729457b174cb19f4e0750486caed9582c5708930
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Sat May 2 23:30:02 2009 +0300

    [test] Add trap rendered ref images for fill-image.
    
    The fill code path for the xlib and fallback surfaces use trapezoids
    rather than spans, so there's lots of differences due to antialising
    differences at the edge of the fill.  This patch adds a ref image
    for the xlib and test-fallback surfaces.

diff --git a/test/fill-image.test-fallback.ref.png b/test/fill-image.test-fallback.ref.png
new file mode 100644
index 0000000..c071335
Binary files /dev/null and b/test/fill-image.test-fallback.ref.png differ
diff --git a/test/fill-image.xlib.ref.png b/test/fill-image.xlib.ref.png
new file mode 100644
index 0000000..c071335
Binary files /dev/null and b/test/fill-image.xlib.ref.png differ
commit 8e7f667abb94262b63b4fd589f5ee06cb8974aaf
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Sat May 2 19:09:27 2009 +0300

    [test] Mark scale-offset tests as XFAIL for image, xlib-fallback.
    
    The scale-offset tests trigger a loss-of-precision bug when
    converting double matrices from cairo to pixman format.
    
    http://lists.cairographics.org/archives/cairo/2008-November/015671.html

diff --git a/test/Makefile.am b/test/Makefile.am
index 2ff45f5..91ae578 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1071,6 +1071,8 @@ $(REFERENCE_IMAGES)
 #                         until they have come up with an interface and
 #                         semantics that actually work. :-)
 # long-lines            - range overflow of fixed-point
+# scale-offset-image    - loss of precision converting a cairo matrix to
+# scale-offset-similar    pixman's fixed point format.
 # self-copy-overlap     - vector surfaces take snapshot of patterns in contrast
 #                         to the raster backends which don't. One solution
 #                         would be to clone overlapping areas of dst/source, so
diff --git a/test/scale-offset-image.c b/test/scale-offset-image.c
index ab55342..5a4ac7d 100644
--- a/test/scale-offset-image.c
+++ b/test/scale-offset-image.c
@@ -135,7 +135,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (scale_offset_image,
 	    "Tests drawing surfaces under various scales and transforms",
-	    "XFAIL=!ps surface scale-offset", /* keywords */
+	    "XFAIL=!ps,image,xlib-fallback surface scale-offset", /* keywords */
 	    NULL, /* requirements */
 	    320, 320,
 	    NULL, draw)
diff --git a/test/scale-offset-similar.c b/test/scale-offset-similar.c
index 074ce05..379e761 100644
--- a/test/scale-offset-similar.c
+++ b/test/scale-offset-similar.c
@@ -136,7 +136,7 @@ draw (cairo_t *cr, int width, int height)
 
 CAIRO_TEST (scale_offset_similar,
 	    "Tests drawing surfaces under various scales and transforms",
-	    "XFAIL=!ps surface scale-offset", /* keywords */
+	    "XFAIL=!ps,image,xlib-fallback surface scale-offset", /* keywords */
 	    NULL, /* requirements */
 	    320, 320,
 	    NULL, draw)


More information about the cairo-commit mailing list