2012-12-08 01:50:32 +04:00
|
|
|
/*
|
|
|
|
* Copyright © 2012 Intel Corporation
|
|
|
|
*
|
2015-06-12 01:39:40 +03:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
* a copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
2012-12-08 01:50:32 +04:00
|
|
|
*
|
2015-06-12 01:39:40 +03:00
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial
|
|
|
|
* portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
2012-12-08 01:50:32 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _WESTON_TEST_CLIENT_HELPER_H_
|
|
|
|
#define _WESTON_TEST_CLIENT_HELPER_H_
|
|
|
|
|
2014-04-07 15:40:35 +04:00
|
|
|
#include "config.h"
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
#include <assert.h>
|
2015-01-23 21:12:36 +03:00
|
|
|
#include <stdbool.h>
|
2016-07-19 14:16:27 +03:00
|
|
|
#include <stdint.h>
|
2018-02-16 19:44:15 +03:00
|
|
|
#include <time.h>
|
tests: introduce struct buffer for client-helper
We are growing more tests that need to handle buffers, both just images
and wl_buffers. Particularly the screenshooting facility needs these.
Currently everything is in struct surface, which contains more than we
need. It is a bit messy.
Create a new struct buffer to encapsulate the image representation, the
wl_buffer, and enough information to tear it all down (munmap) so we
don't have to leak everything. Some tests might start doing things in
loops, and leaking would accumulate.
Instead of inventing our own image representation, use pixman_image_t.
It is a well-tested library worth using, and we already rely on it in
other places.
This makes the tests depend on Pixman, which requires the fix for
building buffer-count, which would otherwise not find pixman.h.
The new create_shm_buffer_a8r8g8b8() creates an image with an explicit
format, and pixman_image_t keeps track of it. And stride and size and
data. This implementation is still a little hacky due to calling
create_shm_buffer().
A very new thing is buffer_destroy(). Previously we didn't really free
any buffers. It is not a problem when the process will exit soon anyway,
but it may become a problem if tests start iterating things.
Manual memset() on a image is converted to a pixman action, just to show
how to do it properly with pixman.
Stride and pixel format assumptions still linger all around, but those
are for another patch.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-05-20 17:25:38 +03:00
|
|
|
#include <pixman.h>
|
2014-12-16 02:51:25 +03:00
|
|
|
|
2015-08-06 18:24:59 +03:00
|
|
|
#include <wayland-client-protocol.h>
|
2012-12-08 01:50:32 +04:00
|
|
|
#include "weston-test-runner.h"
|
2015-02-24 18:32:14 +03:00
|
|
|
#include "weston-test-client-protocol.h"
|
2020-10-17 21:03:09 +03:00
|
|
|
#include "weston-screenshooter-client-protocol.h"
|
2020-03-11 18:11:03 +03:00
|
|
|
#include "viewporter-client-protocol.h"
|
2012-12-08 01:50:32 +04:00
|
|
|
|
|
|
|
struct client {
|
|
|
|
struct wl_display *wl_display;
|
2021-05-24 14:27:37 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Have successfully received an expected protocol error, the
|
|
|
|
* connection is in error state, and that is ok.
|
|
|
|
*/
|
|
|
|
bool errored_ok;
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
struct wl_registry *wl_registry;
|
|
|
|
struct wl_compositor *wl_compositor;
|
|
|
|
struct wl_shm *wl_shm;
|
|
|
|
struct test *test;
|
2015-03-30 16:17:40 +03:00
|
|
|
/* the seat that is actually used for input events */
|
2012-12-08 01:50:32 +04:00
|
|
|
struct input *input;
|
2015-03-30 16:17:40 +03:00
|
|
|
/* server can have more wl_seats. We need keep them all until we
|
|
|
|
* find the one that we need. After that, the others
|
|
|
|
* will be destroyed, so this list will have the length of 1.
|
|
|
|
* If some day in the future we will need the other seats,
|
|
|
|
* we can just keep them here. */
|
|
|
|
struct wl_list inputs;
|
2012-12-08 01:50:32 +04:00
|
|
|
struct output *output;
|
|
|
|
struct surface *surface;
|
|
|
|
int has_argb;
|
2012-12-12 08:03:56 +04:00
|
|
|
struct wl_list global_list;
|
2020-01-24 14:14:27 +03:00
|
|
|
struct wl_list output_list; /* struct output::link */
|
2020-10-17 21:03:09 +03:00
|
|
|
struct weston_screenshooter *screenshooter;
|
|
|
|
bool buffer_copy_done;
|
2012-12-12 08:03:56 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct global {
|
|
|
|
uint32_t name;
|
|
|
|
char *interface;
|
|
|
|
uint32_t version;
|
|
|
|
struct wl_list link;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct test {
|
2015-02-24 18:32:14 +03:00
|
|
|
struct weston_test *weston_test;
|
2012-12-08 01:50:32 +04:00
|
|
|
int pointer_x;
|
|
|
|
int pointer_y;
|
2013-10-30 00:13:45 +04:00
|
|
|
uint32_t n_egl_buffers;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct input {
|
2018-02-08 16:37:56 +03:00
|
|
|
struct client *client;
|
2018-02-08 16:37:55 +03:00
|
|
|
uint32_t global_name;
|
2012-12-08 01:50:32 +04:00
|
|
|
struct wl_seat *wl_seat;
|
|
|
|
struct pointer *pointer;
|
|
|
|
struct keyboard *keyboard;
|
2015-03-30 16:20:07 +03:00
|
|
|
struct touch *touch;
|
2015-03-30 13:37:56 +03:00
|
|
|
char *seat_name;
|
2015-03-30 16:17:40 +03:00
|
|
|
enum wl_seat_capability caps;
|
|
|
|
struct wl_list link;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct pointer {
|
|
|
|
struct wl_pointer *wl_pointer;
|
|
|
|
struct surface *focus;
|
2021-06-09 10:58:13 +03:00
|
|
|
uint32_t serial;
|
2012-12-08 01:50:32 +04:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
uint32_t button;
|
|
|
|
uint32_t state;
|
2017-12-18 13:16:55 +03:00
|
|
|
uint32_t axis;
|
|
|
|
double axis_value;
|
2017-12-13 14:27:55 +03:00
|
|
|
uint32_t motion_time_msec;
|
|
|
|
uint32_t button_time_msec;
|
2017-12-18 13:16:55 +03:00
|
|
|
uint32_t axis_time_msec;
|
|
|
|
uint32_t axis_stop_time_msec;
|
2018-02-16 19:44:15 +03:00
|
|
|
struct timespec input_timestamp;
|
|
|
|
struct timespec motion_time_timespec;
|
|
|
|
struct timespec button_time_timespec;
|
|
|
|
struct timespec axis_time_timespec;
|
|
|
|
struct timespec axis_stop_time_timespec;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct keyboard {
|
|
|
|
struct wl_keyboard *wl_keyboard;
|
|
|
|
struct surface *focus;
|
|
|
|
uint32_t key;
|
|
|
|
uint32_t state;
|
|
|
|
uint32_t mods_depressed;
|
|
|
|
uint32_t mods_latched;
|
|
|
|
uint32_t mods_locked;
|
|
|
|
uint32_t group;
|
2015-03-30 13:37:56 +03:00
|
|
|
struct {
|
|
|
|
int rate;
|
|
|
|
int delay;
|
|
|
|
} repeat_info;
|
2017-12-13 14:27:57 +03:00
|
|
|
uint32_t key_time_msec;
|
2018-02-16 19:44:15 +03:00
|
|
|
struct timespec input_timestamp;
|
|
|
|
struct timespec key_time_timespec;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
2015-03-30 16:20:07 +03:00
|
|
|
struct touch {
|
|
|
|
struct wl_touch *wl_touch;
|
|
|
|
int down_x;
|
|
|
|
int down_y;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int id;
|
|
|
|
int up_id; /* id of last wl_touch.up event */
|
|
|
|
int frame_no;
|
|
|
|
int cancel_no;
|
2017-12-13 14:27:58 +03:00
|
|
|
uint32_t down_time_msec;
|
|
|
|
uint32_t up_time_msec;
|
|
|
|
uint32_t motion_time_msec;
|
2018-02-16 19:44:15 +03:00
|
|
|
struct timespec input_timestamp;
|
|
|
|
struct timespec down_time_timespec;
|
|
|
|
struct timespec up_time_timespec;
|
|
|
|
struct timespec motion_time_timespec;
|
2015-03-30 16:20:07 +03:00
|
|
|
};
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
struct output {
|
|
|
|
struct wl_output *wl_output;
|
2020-01-24 14:14:27 +03:00
|
|
|
struct wl_list link; /* struct client::output_list */
|
2012-12-08 01:50:32 +04:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
2015-03-30 13:37:56 +03:00
|
|
|
int scale;
|
|
|
|
int initialized;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
tests: introduce struct buffer for client-helper
We are growing more tests that need to handle buffers, both just images
and wl_buffers. Particularly the screenshooting facility needs these.
Currently everything is in struct surface, which contains more than we
need. It is a bit messy.
Create a new struct buffer to encapsulate the image representation, the
wl_buffer, and enough information to tear it all down (munmap) so we
don't have to leak everything. Some tests might start doing things in
loops, and leaking would accumulate.
Instead of inventing our own image representation, use pixman_image_t.
It is a well-tested library worth using, and we already rely on it in
other places.
This makes the tests depend on Pixman, which requires the fix for
building buffer-count, which would otherwise not find pixman.h.
The new create_shm_buffer_a8r8g8b8() creates an image with an explicit
format, and pixman_image_t keeps track of it. And stride and size and
data. This implementation is still a little hacky due to calling
create_shm_buffer().
A very new thing is buffer_destroy(). Previously we didn't really free
any buffers. It is not a problem when the process will exit soon anyway,
but it may become a problem if tests start iterating things.
Manual memset() on a image is converted to a pixman action, just to show
how to do it properly with pixman.
Stride and pixel format assumptions still linger all around, but those
are for another patch.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-05-20 17:25:38 +03:00
|
|
|
struct buffer {
|
|
|
|
struct wl_buffer *proxy;
|
|
|
|
size_t len;
|
|
|
|
pixman_image_t *image;
|
|
|
|
};
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
struct surface {
|
|
|
|
struct wl_surface *wl_surface;
|
2020-01-24 14:14:27 +03:00
|
|
|
struct output *output; /* not owned */
|
2012-12-08 01:50:32 +04:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
tests: introduce struct buffer for client-helper
We are growing more tests that need to handle buffers, both just images
and wl_buffers. Particularly the screenshooting facility needs these.
Currently everything is in struct surface, which contains more than we
need. It is a bit messy.
Create a new struct buffer to encapsulate the image representation, the
wl_buffer, and enough information to tear it all down (munmap) so we
don't have to leak everything. Some tests might start doing things in
loops, and leaking would accumulate.
Instead of inventing our own image representation, use pixman_image_t.
It is a well-tested library worth using, and we already rely on it in
other places.
This makes the tests depend on Pixman, which requires the fix for
building buffer-count, which would otherwise not find pixman.h.
The new create_shm_buffer_a8r8g8b8() creates an image with an explicit
format, and pixman_image_t keeps track of it. And stride and size and
data. This implementation is still a little hacky due to calling
create_shm_buffer().
A very new thing is buffer_destroy(). Previously we didn't really free
any buffers. It is not a problem when the process will exit soon anyway,
but it may become a problem if tests start iterating things.
Manual memset() on a image is converted to a pixman action, just to show
how to do it properly with pixman.
Stride and pixel format assumptions still linger all around, but those
are for another patch.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-05-20 17:25:38 +03:00
|
|
|
struct buffer *buffer;
|
2012-12-08 01:50:32 +04:00
|
|
|
};
|
|
|
|
|
2014-12-16 02:51:25 +03:00
|
|
|
struct rectangle {
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
};
|
|
|
|
|
2019-11-25 15:54:06 +03:00
|
|
|
struct range {
|
|
|
|
int a;
|
|
|
|
int b;
|
|
|
|
};
|
|
|
|
|
2015-03-26 13:49:35 +03:00
|
|
|
struct client *
|
|
|
|
create_client(void);
|
|
|
|
|
2020-01-24 14:14:27 +03:00
|
|
|
void
|
|
|
|
client_destroy(struct client *client);
|
|
|
|
|
2017-02-03 18:10:37 +03:00
|
|
|
struct surface *
|
|
|
|
create_test_surface(struct client *client);
|
|
|
|
|
2020-01-24 14:14:27 +03:00
|
|
|
void
|
|
|
|
surface_destroy(struct surface *surface);
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
struct client *
|
2015-03-26 13:56:10 +03:00
|
|
|
create_client_and_test_surface(int x, int y, int width, int height);
|
2012-12-08 01:50:32 +04:00
|
|
|
|
tests: introduce struct buffer for client-helper
We are growing more tests that need to handle buffers, both just images
and wl_buffers. Particularly the screenshooting facility needs these.
Currently everything is in struct surface, which contains more than we
need. It is a bit messy.
Create a new struct buffer to encapsulate the image representation, the
wl_buffer, and enough information to tear it all down (munmap) so we
don't have to leak everything. Some tests might start doing things in
loops, and leaking would accumulate.
Instead of inventing our own image representation, use pixman_image_t.
It is a well-tested library worth using, and we already rely on it in
other places.
This makes the tests depend on Pixman, which requires the fix for
building buffer-count, which would otherwise not find pixman.h.
The new create_shm_buffer_a8r8g8b8() creates an image with an explicit
format, and pixman_image_t keeps track of it. And stride and size and
data. This implementation is still a little hacky due to calling
create_shm_buffer().
A very new thing is buffer_destroy(). Previously we didn't really free
any buffers. It is not a problem when the process will exit soon anyway,
but it may become a problem if tests start iterating things.
Manual memset() on a image is converted to a pixman action, just to show
how to do it properly with pixman.
Stride and pixel format assumptions still linger all around, but those
are for another patch.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-05-20 17:25:38 +03:00
|
|
|
struct buffer *
|
|
|
|
create_shm_buffer_a8r8g8b8(struct client *client, int width, int height);
|
|
|
|
|
|
|
|
void
|
|
|
|
buffer_destroy(struct buffer *buf);
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
int
|
|
|
|
surface_contains(struct surface *surface, int x, int y);
|
|
|
|
|
|
|
|
void
|
|
|
|
move_client(struct client *client, int x, int y);
|
|
|
|
|
2012-12-12 16:26:41 +04:00
|
|
|
#define client_roundtrip(c) do { \
|
|
|
|
assert(wl_display_roundtrip((c)->wl_display) >= 0); \
|
|
|
|
} while (0)
|
2012-12-08 01:50:32 +04:00
|
|
|
|
2013-02-08 19:01:25 +04:00
|
|
|
struct wl_callback *
|
|
|
|
frame_callback_set(struct wl_surface *surface, int *done);
|
|
|
|
|
2014-07-16 13:32:50 +04:00
|
|
|
int
|
|
|
|
frame_callback_wait_nofail(struct client *client, int *done);
|
|
|
|
|
|
|
|
#define frame_callback_wait(c, d) assert(frame_callback_wait_nofail((c), (d)))
|
2013-02-08 19:01:25 +04:00
|
|
|
|
2014-01-02 05:38:04 +04:00
|
|
|
void
|
|
|
|
skip(const char *fmt, ...);
|
|
|
|
|
2014-07-16 13:27:06 +04:00
|
|
|
void
|
|
|
|
expect_protocol_error(struct client *client,
|
|
|
|
const struct wl_interface *intf, uint32_t code);
|
|
|
|
|
2015-09-25 00:31:44 +03:00
|
|
|
char *
|
2014-12-10 01:46:36 +03:00
|
|
|
screenshot_output_filename(const char *basename, uint32_t seq);
|
|
|
|
|
2015-09-25 00:31:44 +03:00
|
|
|
char *
|
2014-12-10 01:46:36 +03:00
|
|
|
screenshot_reference_filename(const char *basename, uint32_t seq);
|
|
|
|
|
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-01-21 13:00:28 +03:00
|
|
|
char *
|
|
|
|
image_filename(const char *basename);
|
|
|
|
|
2015-05-15 00:36:18 +03:00
|
|
|
bool
|
2016-05-23 17:42:27 +03:00
|
|
|
check_images_match(pixman_image_t *img_a, pixman_image_t *img_b,
|
2019-11-25 15:54:06 +03:00
|
|
|
const struct rectangle *clip,
|
|
|
|
const struct range *prec);
|
2014-12-16 02:51:25 +03:00
|
|
|
|
2016-06-02 18:02:46 +03:00
|
|
|
pixman_image_t *
|
|
|
|
visualize_image_difference(pixman_image_t *img_a, pixman_image_t *img_b,
|
2019-11-25 15:54:06 +03:00
|
|
|
const struct rectangle *clip_rect,
|
|
|
|
const struct range *prec);
|
2016-06-02 18:02:46 +03:00
|
|
|
|
2015-09-25 00:31:44 +03:00
|
|
|
bool
|
2016-05-27 13:54:35 +03:00
|
|
|
write_image_as_png(pixman_image_t *image, const char *fname);
|
2015-09-25 00:31:44 +03:00
|
|
|
|
2016-05-25 11:47:41 +03:00
|
|
|
pixman_image_t *
|
|
|
|
load_image_from_png(const char *fname);
|
2015-09-25 00:31:44 +03:00
|
|
|
|
2016-05-27 14:11:01 +03:00
|
|
|
struct buffer *
|
2015-09-25 00:31:44 +03:00
|
|
|
capture_screenshot_of_output(struct client *client);
|
|
|
|
|
2020-11-19 15:55:49 +03:00
|
|
|
bool
|
|
|
|
verify_image(struct buffer *shot,
|
|
|
|
const char *ref_image,
|
|
|
|
int ref_seq_no,
|
|
|
|
const struct rectangle *clip,
|
|
|
|
int seq_no);
|
|
|
|
|
2020-01-21 16:37:14 +03:00
|
|
|
bool
|
|
|
|
verify_screen_content(struct client *client,
|
|
|
|
const char *ref_image,
|
|
|
|
int ref_seq_no,
|
|
|
|
const struct rectangle *clip,
|
|
|
|
int seq_no);
|
2020-01-22 17:34:01 +03:00
|
|
|
|
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-01-21 13:00:28 +03:00
|
|
|
struct buffer *
|
|
|
|
client_buffer_from_image_file(struct client *client,
|
|
|
|
const char *basename,
|
|
|
|
int scale);
|
|
|
|
|
2020-03-11 18:11:03 +03:00
|
|
|
void *
|
|
|
|
bind_to_singleton_global(struct client *client,
|
|
|
|
const struct wl_interface *iface,
|
|
|
|
int version);
|
|
|
|
|
|
|
|
struct wp_viewport *
|
|
|
|
client_create_viewport(struct client *client);
|
|
|
|
|
2020-03-11 18:24:47 +03:00
|
|
|
void
|
2020-11-12 18:17:20 +03:00
|
|
|
fill_image_with_color(pixman_image_t *image, const pixman_color_t *color);
|
2020-03-11 18:24:47 +03:00
|
|
|
|
|
|
|
pixman_color_t *
|
|
|
|
color_rgb888(pixman_color_t *tmp, uint8_t r, uint8_t g, uint8_t b);
|
|
|
|
|
2012-12-08 01:50:32 +04:00
|
|
|
#endif
|