[cairo-commit] 2 commits - src/cairo-image-surface.c test/cairo-test.c
Benjamin Otte
company at kemper.freedesktop.org
Thu Apr 29 03:14:40 PDT 2010
src/cairo-image-surface.c | 8 +++++++-
test/cairo-test.c | 16 +++++++++++++---
2 files changed, 20 insertions(+), 4 deletions(-)
New commits:
commit b0760826f30f63637561b353e7eed1913036da2d
Author: Benjamin Otte <otte at redhat.com>
Date: Thu Apr 29 12:11:48 2010 +0200
test: Set have_result for image matches
Causes the log to contain information about the reference imagery used.
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 286df09..f78519f 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -1228,24 +1228,28 @@ REPEAT:
if (cairo_test_files_equal (test_filename, pass_filename)) {
cairo_test_log (ctx, "PNG file exactly matches last pass.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_SUCCESS;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, ref_png_path)) {
- cairo_test_log (ctx, "PNG file exactly reference image.\n");
+ cairo_test_log (ctx, "PNG file exactly matches reference image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_SUCCESS;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, new_png_path)) {
- cairo_test_log (ctx, "PNG file exactly current failure image.\n");
+ cairo_test_log (ctx, "PNG file exactly matches current failure image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_NEW;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, xfail_png_path)) {
- cairo_test_log (ctx, "PNG file exactly known failure image.\n");
+ cairo_test_log (ctx, "PNG file exactly matches known failure image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_XFAILURE;
goto UNWIND_CAIRO;
@@ -1260,18 +1264,21 @@ REPEAT:
} else {
if (cairo_test_files_equal (out_png_path, ref_png_path)) {
cairo_test_log (ctx, "PNG file exactly matches reference image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_SUCCESS;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, new_png_path)) {
cairo_test_log (ctx, "PNG file exactly matches current failure image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_NEW;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, xfail_png_path)) {
cairo_test_log (ctx, "PNG file exactly matches known failure image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_XFAILURE;
goto UNWIND_CAIRO;
@@ -1280,18 +1287,21 @@ REPEAT:
if (cairo_test_files_equal (out_png_path, base_ref_png_path)) {
cairo_test_log (ctx, "PNG file exactly reference image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_SUCCESS;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, base_new_png_path)) {
cairo_test_log (ctx, "PNG file exactly current failure image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_NEW;
goto UNWIND_CAIRO;
}
if (cairo_test_files_equal (out_png_path, base_xfail_png_path)) {
cairo_test_log (ctx, "PNG file exactly known failure image.\n");
+ have_result = TRUE;
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_XFAILURE;
goto UNWIND_CAIRO;
commit 8f85c2d77cc2ca7984f9771c0096fbad798dbde8
Author: Benjamin Otte <otte at redhat.com>
Date: Thu Apr 29 12:09:31 2010 +0200
image: translate source pattern in composite_trapezoids()
Fixes xlib fallback paths as exposed by the clip-push-group test.
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 82ab72f..e66dae3 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -4200,6 +4200,8 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op,
{
cairo_image_surface_t *dst = abstract_dst;
cairo_composite_rectangles_t extents;
+ cairo_pattern_union_t source_pattern;
+ cairo_matrix_t translate;
composite_traps_info_t info;
cairo_status_t status;
@@ -4245,6 +4247,10 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op,
return status;
}
+ _cairo_pattern_init_static_copy (&source_pattern.base, pattern);
+ cairo_matrix_init_translate (&translate, src_x, src_y);
+ _cairo_pattern_transform (&source_pattern.base, &translate);
+
info.traps = traps;
info.num_traps = num_traps;
info.antialias = antialias;
@@ -4252,7 +4258,7 @@ _cairo_image_surface_composite_trapezoids (cairo_operator_t op,
dst->pixman_image,
dst->pixman_format,
op,
- pattern,
+ &source_pattern.base,
0, 0,
&extents.bounded,
clip_region);
More information about the cairo-commit
mailing list