[cairo-commit] 3 commits - src/cairo-spans-compositor.c test/Makefile.refs test/reference

Chris Wilson ickle at kemper.freedesktop.org
Fri Sep 23 15:30:22 PDT 2011


 dev/null                                     |binary
 src/cairo-spans-compositor.c                 |   15 ++++++---------
 test/Makefile.refs                           |    3 ++-
 test/reference/miter-precision.ref.png       |binary
 test/reference/tighten-bounds.argb32.ref.png |binary
 test/reference/tighten-bounds.rgb24.ref.png  |binary
 6 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 606e9e1c9e9b70fd3ac840f398faad5f4a06e19d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 23 23:28:50 2011 +0100

    test: Refresh tighten-bounds reference image
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/Makefile.refs b/test/Makefile.refs
index 3a40b47..b4bd336 100644
--- a/test/Makefile.refs
+++ b/test/Makefile.refs
@@ -2698,9 +2698,10 @@ REFERENCE_IMAGES = \
 	reference/tiger.ref.png \
 	reference/tiger.traps.argb32.ref.png \
 	reference/tiger.traps.rgb24.ref.png \
+	reference/tighten-bounds.argb32.ref.png \
 	reference/tighten-bounds.base.argb32.ref.png \
 	reference/tighten-bounds.base.rgb24.ref.png \
-	reference/tighten-bounds.ref.png \
+	reference/tighten-bounds.rgb24.ref.png \
 	reference/tighten-bounds.traps.argb32.ref.png \
 	reference/tighten-bounds.traps.rgb24.ref.png \
 	reference/transforms.base.argb32.ref.png \
diff --git a/test/reference/tighten-bounds.argb32.ref.png b/test/reference/tighten-bounds.argb32.ref.png
new file mode 100644
index 0000000..3fbd8a4
Binary files /dev/null and b/test/reference/tighten-bounds.argb32.ref.png differ
diff --git a/test/reference/tighten-bounds.ref.png b/test/reference/tighten-bounds.ref.png
deleted file mode 100644
index 8231082..0000000
Binary files a/test/reference/tighten-bounds.ref.png and /dev/null differ
diff --git a/test/reference/tighten-bounds.rgb24.ref.png b/test/reference/tighten-bounds.rgb24.ref.png
new file mode 100644
index 0000000..5f0161f
Binary files /dev/null and b/test/reference/tighten-bounds.rgb24.ref.png differ
commit d71ce5e0ddd871777b5d82619a847cab6c8bc2aa
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 23 23:24:25 2011 +0100

    spans: Fix empty polygon unbounded fixup
    
    There is a subtle flaw in the current querying of polygon extents; it
    simply returns the limits and not the point extremeties and certainly
    not the tessellation extents. Computing that is likely to take long than
    rendering the polygon. This does mean that we need to also fixup the
    extents prior to performing the empty unbounded fast path.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-spans-compositor.c b/src/cairo-spans-compositor.c
index 4320a3e..3b1a9a1 100644
--- a/src/cairo-spans-compositor.c
+++ b/src/cairo-spans-compositor.c
@@ -782,6 +782,11 @@ clip_and_composite_polygon (const cairo_spans_compositor_t	*compositor,
 {
     cairo_int_status_t status;
 
+    /* XXX simply uses polygon limits.point extemities, tessellation? */
+    status = trim_extents_to_polygon (extents, polygon);
+    if (unlikely (status))
+	return status;
+
     if (_cairo_polygon_is_empty (polygon)) {
 	cairo_boxes_t boxes;
 
@@ -789,14 +794,10 @@ clip_and_composite_polygon (const cairo_spans_compositor_t	*compositor,
 	    return CAIRO_STATUS_SUCCESS;
 
 	_cairo_boxes_init (&boxes);
+	extents->bounded.width = extents->bounded.height = 0;
 	return fixup_unbounded_boxes (compositor, extents, &boxes);
     }
 
-#if 0 /* XXX not accurate currently... */
-    if (antialias == CAIRO_ANTIALIAS_NONE)
-	return CAIRO_INT_STATUS_UNSUPPORTED;
-#endif
-
     if (extents->is_bounded && extents->clip->path) {
 	cairo_polygon_t clipper;
 	cairo_antialias_t clip_antialias;
@@ -825,10 +826,6 @@ clip_and_composite_polygon (const cairo_spans_compositor_t	*compositor,
 	}
     }
 
-    status = trim_extents_to_polygon (extents, polygon);
-    if (unlikely (status))
-	return status;
-
     return composite_polygon (compositor, extents,
 			      polygon, fill_rule, antialias);
 }
commit 9a366cff2cc486818ab3ace61aeb22a2bdcfe5cd
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 23 22:48:46 2011 +0100

    test: Redefine success for miter-precision
    
    On review, that segment does exist and should not have been removed by
    numerical errors!
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/test/reference/miter-precision.ref.png b/test/reference/miter-precision.ref.png
index c9f7f5b..df41581 100644
Binary files a/test/reference/miter-precision.ref.png and b/test/reference/miter-precision.ref.png differ


More information about the cairo-commit mailing list