diff options
author | Uli Schlachter <psychon@znc.in> | 2022-12-30 16:36:22 +0100 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2022-12-30 16:36:22 +0100 |
commit | 8d74c4d0198326f2d216e3c8c0b18e121cdb1436 (patch) | |
tree | 3554b4bbdc389dc4a8ac7671fe0172bb2b8256ba /test | |
parent | 35f2610f4d6410e2737b27f444a00ab540df0907 (diff) | |
download | cairo-8d74c4d0198326f2d216e3c8c0b18e121cdb1436.tar.gz |
Speed up coverage-column-triangles test
This commit changes the height of the coverage-column-triangles test by
using a smaller height for the test. Previously the image was 40 pixels
in height and the test took 517 seconds for me. Now, the image has a
height of 4 pixels and the test takes 55 seconds.
This is possible since column_triangles() does the same thing for each y
coordinate. Thus, previously this test just did the same thing 40 times.
Times are measured with the backends I happened to have enabled locally:
script, xcb, xlib, image, recording.
Thanks a lot to Christian Rohlfs for coming up with this idea in
https://gitlab.freedesktop.org/cairo/cairo/-/issues/498#note_1700197
Possibly-fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/498
Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'test')
-rw-r--r-- | test/coverage.c | 3 | ||||
-rw-r--r-- | test/reference/coverage-column-triangles.ref.png | bin | 208 -> 886 bytes | |||
-rw-r--r-- | test/reference/coverage-column-triangles.xfail.png | bin | 7632 -> 560 bytes | |||
-rw-r--r-- | test/reference/coverage-column-triangles.xlib.xfail.png | bin | 12745 -> 1364 bytes |
4 files changed, 2 insertions, 1 deletions
diff --git a/test/coverage.c b/test/coverage.c index f6626f3d0..0749fa22a 100644 --- a/test/coverage.c +++ b/test/coverage.c @@ -491,7 +491,8 @@ CAIRO_TEST (coverage_column_triangles, "Check the fidelity of the rasterisation.", NULL, /* keywords */ "target=raster", /* requirements */ - WIDTH, HEIGHT, + /* Smaller height since this test does not vary by y-coordinate */ + WIDTH, 4, NULL, column_triangles) CAIRO_TEST (coverage_triangles, "Check the fidelity of the rasterisation.", diff --git a/test/reference/coverage-column-triangles.ref.png b/test/reference/coverage-column-triangles.ref.png Binary files differindex aa61031b7..24ccc9f2a 100644 --- a/test/reference/coverage-column-triangles.ref.png +++ b/test/reference/coverage-column-triangles.ref.png diff --git a/test/reference/coverage-column-triangles.xfail.png b/test/reference/coverage-column-triangles.xfail.png Binary files differindex 566b41544..9af5253c5 100644 --- a/test/reference/coverage-column-triangles.xfail.png +++ b/test/reference/coverage-column-triangles.xfail.png diff --git a/test/reference/coverage-column-triangles.xlib.xfail.png b/test/reference/coverage-column-triangles.xlib.xfail.png Binary files differindex f433b7a84..18e4af2da 100644 --- a/test/reference/coverage-column-triangles.xlib.xfail.png +++ b/test/reference/coverage-column-triangles.xlib.xfail.png |