mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-30 12:58:19 +02:00
tests/color-management-protocol: add set_inert_surface_image_description
Extend test coverage. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
8e7e882b67
commit
22f6b4ecc7
1 changed files with 33 additions and 0 deletions
|
|
@ -452,6 +452,39 @@ TEST(set_surface_image_description)
|
|||
return RESULT_OK;
|
||||
}
|
||||
|
||||
TEST(set_inert_surface_image_description)
|
||||
{
|
||||
struct client *client;
|
||||
struct color_manager_client *cm;
|
||||
struct image_description *image_descr;
|
||||
struct wp_color_management_surface_v1 *cm_surface;
|
||||
|
||||
client = create_client_and_test_surface(100, 100, 100, 100);
|
||||
cm = color_manager_get(client);
|
||||
|
||||
/* Get guaranteed good image description. */
|
||||
image_descr = image_description_create_for_preferred(cm, client->surface);
|
||||
image_description_wait_until_ready(client, image_descr);
|
||||
|
||||
/* Destroy the wl_surface, making cm_surface inert. */
|
||||
cm_surface = wp_color_manager_v1_get_surface(cm->manager_proxy, client->surface->wl_surface);
|
||||
surface_destroy(client->surface);
|
||||
client->surface = NULL;
|
||||
|
||||
/* Set image description on inert surface. */
|
||||
wp_color_management_surface_v1_set_image_description(cm_surface,
|
||||
image_descr->proxy,
|
||||
WP_COLOR_MANAGER_V1_RENDER_INTENT_PERCEPTUAL);
|
||||
expect_protocol_error(client, &wp_color_management_surface_v1_interface,
|
||||
WP_COLOR_MANAGEMENT_SURFACE_V1_ERROR_INERT);
|
||||
|
||||
wp_color_management_surface_v1_destroy(cm_surface);
|
||||
image_description_destroy(image_descr);
|
||||
client_destroy(client);
|
||||
|
||||
return RESULT_OK;
|
||||
}
|
||||
|
||||
#define NOT_SET -99
|
||||
#define BAD_ENUM 99999
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue