diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-28 09:11:23 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-28 09:06:25 +0000 |
commit | 88f628b3972819c0f6ce8e5f06d0f7e6abb9d661 (patch) | |
tree | cbcd2d48c6180579b24c4826200d2ea526658996 /perf | |
parent | 1522805f39c505ff05231e67de5a6e6686081d46 (diff) |
[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.
Diffstat (limited to 'perf')
-rw-r--r-- | perf/unaligned-clip.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/perf/unaligned-clip.c b/perf/unaligned-clip.c index c7b9d219..6d2b1797 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); |