mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 15:48:00 +02:00
[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.
This commit is contained in:
parent
1522805f39
commit
88f628b397
1 changed files with 3 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue