weston/tests
Pekka Paalanen 97359ba5c5 tests: add output transform tests
This goes through all output transforms with two different buffer transforms
and verifies the visual output against reference images.

This commit introduces a new test input image 'basic-test-card.png'. It is a
small image with deliberately odd and indivisible dimensions to provoke bad
assumptions about image sizes. It contains red, green and blue areas which are
actually text that makes it very obvious if you have e.g. color channels
swapped. It has a white thick circle to highlight aspect ratio issues, and an
orange cross to show a mixed color. The white border is for contrast and a 1px
wide detail. The whole design makes it clear if the image happens to be rotated
or flipped in any way.

The image has one pixel wide transparent border so that bilinear sampling
filter near the edges of the image would produce the same colors with both
Pixman- and GL-renderers which handle the out-of-image samples fundamentally
differently: Pixman assumes (0, 0, 0, 0) samples outside of the image, while
GL-renderer clamps sample coordinates to the edge essentially repeating the
edge pixels.

It would have been "easy" to create a full matrix of
every output scale & transform x every buffer scale & transform, but that
would have resulted in 2 renderers * 8 output transforms * 3 output scales *
8 buffer transforms * 3 buffer scales = 1152 test cases that would have all
ran strictly serially because our test harness has no parallelism inside one
test program. That would have been slow to run, and need a lot more reference
images too.

Instead, I chose to iterate separately through all output scales & transforms
(this patch) and all buffer scales & transforms (next patch). This limits the
number of test cases in this patch to 56, and allows the two test programs to
run in parallel.

I did not even pick all possible scale & transform combinations here, but just
what I think is a representative sub-set to hopefully exercise all the code
paths.

https://gitlab.freedesktop.org/wayland/weston/issues/52

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2020-02-28 15:07:51 +02:00
..
reference tests: add output transform tests 2020-02-28 15:07:51 +02:00
bad-buffer-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
config-parser-test.c tests/config-parser: Remove useless duplicate test 2019-11-28 19:24:13 +00:00
devices-test.c tests: migrate devices 2020-01-30 10:10:35 +00:00
event-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
input-timestamps-helper.c tests: replace fprintf() with testlog() 2019-11-22 12:54:10 +02:00
input-timestamps-helper.h tests: Introduce input timestamps helper 2018-02-20 10:20:29 +02:00
internal-screenshot-test.c tests: add range argument for fuzzy image matching 2020-02-05 11:13:51 +00:00
internal-screenshot.ini tests: Add internal test for the weston test screenshot capability 2015-05-21 15:06:11 -07:00
ivi-layout-internal-test.c tests: migrate ivi-layout-internal 2020-01-30 10:10:35 +00:00
ivi-layout-test-client.c tests: migrate ivi-layout-test 2020-01-30 10:10:34 +00:00
ivi-layout-test-plugin.c tests: migrate ivi-layout-test 2020-01-30 10:10:34 +00:00
ivi-shell-app-test.c tests: implement client_destroy() 2020-02-27 16:08:42 +02:00
ivi-test.h ivi-shell: implement surface_on_many_layer test 2016-06-29 11:32:23 +03:00
keyboard-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
linux-explicit-synchronization-test.c tests: migrate linux-explicit-synchronization 2020-01-30 10:10:35 +00:00
matrix-test.c Rename matrix.h to libweston/matrix.h 2019-04-18 12:31:46 +03:00
meson.build tests: add output transform tests 2020-02-28 15:07:51 +02:00
output-transforms-test.c tests: add output transform tests 2020-02-28 15:07:51 +02:00
plugin-registry-test.c tests: thread-based client harness 2020-01-30 10:10:34 +00:00
pointer-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
presentation-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
roles-test.c tests: thread-based client harness 2020-01-30 10:10:34 +00:00
setbacklight.c tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
string-test.c tests: add missing include 2017-01-23 14:12:06 +02:00
subsurface-shot-test.c tests: rename check_screen() to verify_screen_content() + doc 2020-02-27 16:08:42 +02:00
subsurface-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
surface-global-test.c tests: migrate surface, surface-global 2020-01-30 10:10:35 +00:00
surface-screenshot-test.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
surface-test.c tests: migrate surface, surface-global 2020-01-30 10:10:35 +00:00
text-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
timespec-test.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
touch-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
vertex-clip-test.c Rename src/ to libweston/ 2016-06-23 17:44:54 +03:00
viewporter-test.c tests: migrate client tests 2020-01-30 10:10:35 +00:00
weston-test-client-helper.c tests: add output transform tests 2020-02-28 15:07:51 +02:00
weston-test-client-helper.h tests: add output transform tests 2020-02-28 15:07:51 +02:00
weston-test-desktop-shell.c Use weston_compositor_add_destroy_listener_once() in plugins 2019-11-21 16:32:55 +00:00
weston-test-fixture-compositor.c tests: add scale and transform compositor options 2020-02-27 16:08:42 +02:00
weston-test-fixture-compositor.h tests: add scale and transform compositor options 2020-02-27 16:08:42 +02:00
weston-test-runner.c tests: re-order test naming pattern 2020-02-27 16:08:42 +02:00
weston-test-runner.h tests: add get_test_fixture_index() 2020-02-27 16:08:42 +02:00
weston-test.c tests: release resources on compositor destruction 2020-02-04 13:30:19 +00:00
weston-testsuite-data.h tests: thread-based client harness 2020-01-30 10:10:34 +00:00
xwayland-test.c tests: migrate xwayland 2020-01-30 10:10:35 +00:00