[cairo-commit] perf/unaligned-clip.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Oct 28 02:16:04 PDT 2008


 perf/unaligned-clip.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 88f628b3972819c0f6ce8e5f06d0f7e6abb9d661
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Oct 28 09:11:23 2008 +0000

    [perf] Fix rectangular case of unaligned-clip.
    
    Janoos spotted that the unaligned clip actually degenerated to an empty
    clip due to a typo when constructing the second rectangle. Simply use a
    cairo_rectangle() instead.

diff --git a/perf/unaligned-clip.c b/perf/unaligned-clip.c
index c7b9d21..6d2b179 100644
--- a/perf/unaligned-clip.c
+++ b/perf/unaligned-clip.c
@@ -34,6 +34,7 @@ do_unaligned_clip (cairo_t *cr, int width, int height)
     cairo_save (cr);
 
     cairo_perf_timer_start ();
+
     /* First a triangular clip that obviously isn't along device-pixel
      * boundaries. */
     cairo_move_to (cr, 50, 50);
@@ -45,13 +46,9 @@ do_unaligned_clip (cairo_t *cr, int width, int height)
     /* Then a rectangular clip that would be but for the non-integer
      * scaling. */
     cairo_scale (cr, 1.1, 1.1);
-    cairo_move_to (cr, 55, 55);
-    cairo_line_to (cr, 90, 55);
-    cairo_line_to (cr, 90, 90);
-    cairo_line_to (cr, 90, 55);
-    cairo_close_path (cr);
-
+    cairo_rectangle (cr, 55, 55, 35, 35);
     cairo_clip (cr);
+
     cairo_perf_timer_stop ();
 
     cairo_restore (cr);


More information about the cairo-commit mailing list