[cairo-commit] 4 commits - src/cairo-image-compositor.c src/cairo-xcb-surface-render.c test/clip-complex-bug61592.c test/Makefile.sources test/reference
Uli Schlachter
psychon at kemper.freedesktop.org
Fri Jul 5 13:06:38 PDT 2013
src/cairo-image-compositor.c | 7 +-
src/cairo-xcb-surface-render.c | 6 -
test/Makefile.sources | 3
test/clip-complex-bug61592.c | 60 +++++++++++++++++++
test/reference/caps-tails-curve.traps.argb32.ref.png |binary
test/reference/caps-tails-curve.traps.rgb24.ref.png |binary
test/reference/caps-tails-curve.xcb.ref.png |binary
test/reference/clip-complex-bug61492.ref.png |binary
8 files changed, 69 insertions(+), 7 deletions(-)
New commits:
commit 9f9796920f5994090a19de357defe5e72ac61297
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Jun 21 20:38:43 2013 +0200
xcb: Fix some uninitialized variable warnings
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 7ea9dc8..2d52be9 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1952,7 +1952,7 @@ _clip_and_composite_combine (cairo_clip_t *clip,
{
cairo_xcb_surface_t *tmp;
cairo_xcb_surface_t *clip_surface;
- int clip_x, clip_y;
+ int clip_x = 0, clip_y = 0;
xcb_render_picture_t clip_picture;
cairo_status_t status;
@@ -2248,7 +2248,7 @@ _cairo_xcb_surface_fixup_unbounded_with_mask (cairo_xcb_surface_t *dst,
cairo_clip_t *clip)
{
cairo_xcb_surface_t *mask;
- int mask_x, mask_y;
+ int mask_x = 0, mask_y = 0;
mask = get_clip_surface (clip, dst, &mask_x, &mask_y);
if (unlikely (mask->base.status))
@@ -2651,7 +2651,7 @@ _composite_boxes (cairo_xcb_surface_t *dst,
if (need_clip_mask) {
cairo_xcb_surface_t *clip_surface;
- int clip_x, clip_y;
+ int clip_x = 0, clip_y = 0;
clip_surface = get_clip_surface (extents->clip, dst,
&clip_x, &clip_y);
commit 2170bdbb12f38e372ea2ce1c6492c60cb35f22e4
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Jun 21 20:36:09 2013 +0200
image compositor: Always finish the span renderer
In some obscure conditions that I don't really understand, the image compositor
did not finish a span renderer that it created. This could then cause the last
row of the span to be ignored.
Fixes: clip-complex-bug61492
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61592
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-image-compositor.c b/src/cairo-image-compositor.c
index a79dc40..8245882 100644
--- a/src/cairo-image-compositor.c
+++ b/src/cairo-image-compositor.c
@@ -3028,11 +3028,12 @@ span_renderer_fini (cairo_abstract_span_renderer_t *_r,
TRACE ((stderr, "%s\n", __FUNCTION__));
- if (likely (status == CAIRO_INT_STATUS_SUCCESS && r->bpp == 0)) {
- const cairo_composite_rectangles_t *composite = r->composite;
-
+ if (likely (status == CAIRO_INT_STATUS_SUCCESS)) {
if (r->base.finish)
r->base.finish (r);
+ }
+ if (likely (status == CAIRO_INT_STATUS_SUCCESS && r->bpp == 0)) {
+ const cairo_composite_rectangles_t *composite = r->composite;
pixman_image_composite32 (r->op, r->src, r->mask,
to_pixman_image (composite->surface),
commit 9058e9ae283ae39a6a4f78dc3dbf8ab46b2ef291
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Jun 21 20:34:27 2013 +0200
Add new test for bug 61592
This test exercises some clipping-related failure that Seongwon Cho reported.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61592
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/test/Makefile.sources b/test/Makefile.sources
index c1b373a..d44edb4 100644
--- a/test/Makefile.sources
+++ b/test/Makefile.sources
@@ -42,8 +42,9 @@ test_sources = \
clear.c \
clear-source.c \
clip-all.c \
- clip-contexts.c \
+ clip-complex-bug61592.c \
clip-complex-shape.c \
+ clip-contexts.c \
clip-disjoint.c \
clip-disjoint-hatching.c \
clip-disjoint-quad.c \
diff --git a/test/clip-complex-bug61592.c b/test/clip-complex-bug61592.c
new file mode 100644
index 0000000..998b7aa
--- /dev/null
+++ b/test/clip-complex-bug61592.c
@@ -0,0 +1,60 @@
+/*
+ * Copyright © 2013 Uli Schlachter
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Uli Schlachter <psychon at znc.in>
+ */
+
+#include "cairo-test.h"
+
+static cairo_test_status_t
+draw (cairo_t *cr, int width, int height)
+{
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_paint (cr);
+
+ cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE);
+ cairo_move_to(cr, 85, -465);
+ cairo_line_to(cr, 3, 4.1);
+ cairo_line_to(cr, -145, -25);
+ cairo_close_path(cr);
+ cairo_clip(cr);
+
+ cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT);
+ cairo_move_to(cr, -139, -524);
+ cairo_line_to(cr, 78, 44);
+ cairo_line_to(cr, -229, -10);
+ cairo_close_path(cr);
+ cairo_clip(cr);
+
+ cairo_set_source_rgb (cr, 1, 1, 1);
+ cairo_paint (cr);
+
+ return CAIRO_TEST_SUCCESS;
+}
+
+CAIRO_TEST (clip_complex_bug61492,
+ "Exercise a bug found in 1.12",
+ "clip", /* keywords */
+ NULL, /* requirements */
+ 8, 5,
+ NULL, draw)
diff --git a/test/reference/clip-complex-bug61492.ref.png b/test/reference/clip-complex-bug61492.ref.png
new file mode 100644
index 0000000..8e2e982
Binary files /dev/null and b/test/reference/clip-complex-bug61492.ref.png differ
commit 54bee5e0fc1fd1fa85b9f389a73502a7145e0846
Author: Uli Schlachter <psychon at znc.in>
Date: Fri Jun 21 15:18:58 2013 +0200
Fix caps-tails-curve reference images
Commit d7f5a1bec fixed a bug. This caused 12 new test failures for the
test-traps test target:
caps-tails-curve degenerate-arc degenerate-path joins subsurface
subsurface-scale twin twin-antialias-gray twin-antialias-mixed
twin-antialias-none twin-antialias-subpixel user-font
Most of these are indeed (new?) bugs. However, caps-tails-curve actually started
producing the expected result and the reference image just wrongly captures the
old state of things.
At the time of that commit, just taking the output from test-traps as the new
reference image works fine for all backends. However, with current git,
something introduced more antialiasing noise and now test-traps changed again
while cairo-xcb stayed with the old result. Thus, we also need a new reference
image to fix this test.
(The wrong reference images come from commit 8488ae02 which turned test-traps'
results into reference images)
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/test/reference/caps-tails-curve.traps.argb32.ref.png b/test/reference/caps-tails-curve.traps.argb32.ref.png
index 41d1348..9d57999 100644
Binary files a/test/reference/caps-tails-curve.traps.argb32.ref.png and b/test/reference/caps-tails-curve.traps.argb32.ref.png differ
diff --git a/test/reference/caps-tails-curve.traps.rgb24.ref.png b/test/reference/caps-tails-curve.traps.rgb24.ref.png
index 41d1348..9d57999 100644
Binary files a/test/reference/caps-tails-curve.traps.rgb24.ref.png and b/test/reference/caps-tails-curve.traps.rgb24.ref.png differ
diff --git a/test/reference/caps-tails-curve.xcb.ref.png b/test/reference/caps-tails-curve.xcb.ref.png
new file mode 100644
index 0000000..8902203
Binary files /dev/null and b/test/reference/caps-tails-curve.xcb.ref.png differ
More information about the cairo-commit
mailing list