[cairo-commit] 4 commits - src/cairo-composite-rectangles.c src/cairo-script-surface.c test/bug-40410.c test/clip-fill-rule.c test/Makefile.refs test/rectilinear-grid.c test/reference
Chris Wilson
ickle at kemper.freedesktop.org
Thu Sep 15 07:30:39 PDT 2011
dev/null |binary
src/cairo-composite-rectangles.c | 9 +++------
src/cairo-script-surface.c | 7 +++----
test/Makefile.refs | 2 +-
test/bug-40410.c | 2 +-
test/clip-fill-rule.c | 2 +-
test/rectilinear-grid.c | 2 +-
test/reference/unbounded-operator.argb32.ref.png |binary
test/reference/unbounded-operator.rgb24.ref.png |binary
9 files changed, 10 insertions(+), 14 deletions(-)
New commits:
commit e6e672387135bb13cf166827a7e1ce281dc30fe7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Sep 15 15:27:59 2011 +0100
test: Fix reference image for unbounded operator
Comparing against the baseline reference highlights the error in the
previous ref.png.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/test/Makefile.refs b/test/Makefile.refs
index 3160520..88a9a93 100644
--- a/test/Makefile.refs
+++ b/test/Makefile.refs
@@ -2113,6 +2113,7 @@ REFERENCE_IMAGES = \
reference/unantialiased-shapes.base.rgb24.ref.png \
reference/unantialiased-shapes.quartz.ref.png \
reference/unantialiased-shapes.ref.png \
+ reference/unbounded-operator.argb32.ref.png \
reference/unbounded-operator.base.argb32.ref.png \
reference/unbounded-operator.base.rgb24.ref.png \
reference/unbounded-operator.gl.argb32.xfail.png \
@@ -2123,7 +2124,6 @@ REFERENCE_IMAGES = \
reference/unbounded-operator.ps3.argb32.ref.png \
reference/unbounded-operator.quartz.argb32.ref.png \
reference/unbounded-operator.quartz.rgb24.ref.png \
- reference/unbounded-operator.ref.png \
reference/unbounded-operator.rgb24.ref.png \
reference/unbounded-operator.svg12.argb32.ref.png \
reference/unbounded-operator.svg12.rgb24.xfail.png \
diff --git a/test/reference/unbounded-operator.argb32.ref.png b/test/reference/unbounded-operator.argb32.ref.png
new file mode 100644
index 0000000..c91a4b7
Binary files /dev/null and b/test/reference/unbounded-operator.argb32.ref.png differ
diff --git a/test/reference/unbounded-operator.ref.png b/test/reference/unbounded-operator.ref.png
deleted file mode 100644
index 03c7bc8..0000000
Binary files a/test/reference/unbounded-operator.ref.png and /dev/null differ
diff --git a/test/reference/unbounded-operator.rgb24.ref.png b/test/reference/unbounded-operator.rgb24.ref.png
index ad3225d..d383d66 100644
Binary files a/test/reference/unbounded-operator.rgb24.ref.png and b/test/reference/unbounded-operator.rgb24.ref.png differ
commit f2a49e93299d89ec5734858fa9fc6d8668c0211e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Sep 15 15:23:41 2011 +0100
script: Tag the similar surface rather than snapshot
As we discard the snapshot immediately upon drawing to it, it serves no
purpose.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index 7199cd1..811b015 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -1994,11 +1994,10 @@ _cairo_script_surface_create_similar (void *abstract_surface,
_get_target (other);
_cairo_output_stream_printf (ctx->stream,
- "%u %u //%s similar",
+ "%u %u //%s similar dup /s%u exch def context\n",
width, height,
- _content_to_string (content));
- attach_snapshot (ctx, &surface->base);
- _cairo_output_stream_printf (ctx->stream, " context\n");
+ _content_to_string (content),
+ surface->base.unique_id);
surface->emitted = TRUE;
surface->defined = TRUE;
commit 1b2709d8c0933af254372c9b0d4fa5c011ef4586
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Sep 15 15:09:24 2011 +0100
composite: Reduce an unaligned clip
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
index a50a347..a6f3768 100644
--- a/src/cairo-composite-rectangles.c
+++ b/src/cairo-composite-rectangles.c
@@ -371,20 +371,17 @@ _cairo_composite_rectangles_can_reduce_clip (cairo_composite_rectangles_t *compo
cairo_clip_t *clip)
{
cairo_rectangle_int_t extents;
+ cairo_box_t box;
if (clip == NULL)
return TRUE;
- /* XXX In the not a region case, we could still search through the boxes */
- if (! _cairo_clip_is_region (clip))
- return FALSE;
-
extents = composite->destination;
if (composite->is_bounded & CAIRO_OPERATOR_BOUND_BY_SOURCE)
_cairo_rectangle_intersect (&extents, &composite->source);
if (composite->is_bounded & CAIRO_OPERATOR_BOUND_BY_MASK)
_cairo_rectangle_intersect (&extents, &composite->mask);
- return cairo_region_contains_rectangle (_cairo_clip_get_region (clip),
- &extents) == CAIRO_REGION_OVERLAP_IN;
+ _cairo_box_from_rectangle (&box, &extents);
+ return _cairo_clip_contains_box (clip, &box);
}
commit c0016e6ac9ca1382a7861d67f752dea9d66935de
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Sep 15 14:56:17 2011 +0100
test: Mark some more raster-only tests
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/test/bug-40410.c b/test/bug-40410.c
index 9235cf9..2d6e512 100644
--- a/test/bug-40410.c
+++ b/test/bug-40410.c
@@ -67,6 +67,6 @@ draw (cairo_t *cr, int width, int height)
CAIRO_TEST (bug_40410,
"Exercises a bug found in 1.10.2 (and never again!)",
"fill", /* keywords */
- NULL, /* requirements */
+ "target=raster", /* requirements */
WIDTH, HEIGHT,
NULL, draw)
diff --git a/test/clip-fill-rule.c b/test/clip-fill-rule.c
index 035b9a8..31c3ab7 100644
--- a/test/clip-fill-rule.c
+++ b/test/clip-fill-rule.c
@@ -82,6 +82,6 @@ CAIRO_TEST (clip_fill_rule,
CAIRO_TEST (a1_clip_fill_rule,
"Tests interaction of clipping with cairo_set_fill_rule",
"clip", /* keywords */
- NULL, /* requirements */
+ "target=raster", /* requirements */
STAR_SIZE * 2 + 2, STAR_SIZE + 2,
NULL, a1_draw)
diff --git a/test/rectilinear-grid.c b/test/rectilinear-grid.c
index 8c6b7fc..6d37c6b 100644
--- a/test/rectilinear-grid.c
+++ b/test/rectilinear-grid.c
@@ -87,6 +87,6 @@ CAIRO_TEST (rectilinear_grid,
CAIRO_TEST (a1_rectilinear_grid,
"Test rectilinear rasterizer (covering whole pixels)",
"rectilinear", /* keywords */
- NULL, /* requirements */
+ "target=raster", /* requirements */
SIZE, SIZE,
NULL, aligned)
More information about the cairo-commit
mailing list