tests: event-test to use create_shm_buffer_a8r8g8b8()

This removes the uses of create_shm_buffer() from this test.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Pekka Paalanen 9 years ago
parent 924cd948ee
commit 7789acd186
  1. 24
      tests/event-test.c

@ -370,9 +370,9 @@ TEST(buffer_release)
{ {
struct client *client; struct client *client;
struct wl_surface *surface; struct wl_surface *surface;
struct wl_buffer *buf1; struct buffer *buf1;
struct wl_buffer *buf2; struct buffer *buf2;
struct wl_buffer *buf3; struct buffer *buf3;
int buf1_released = 0; int buf1_released = 0;
int buf2_released = 0; int buf2_released = 0;
int buf3_released = 0; int buf3_released = 0;
@ -382,22 +382,22 @@ TEST(buffer_release)
assert(client); assert(client);
surface = client->surface->wl_surface; surface = client->surface->wl_surface;
buf1 = create_shm_buffer(client, 100, 100, NULL); buf1 = create_shm_buffer_a8r8g8b8(client, 100, 100);
wl_buffer_add_listener(buf1, &buffer_listener, &buf1_released); wl_buffer_add_listener(buf1->proxy, &buffer_listener, &buf1_released);
buf2 = create_shm_buffer(client, 100, 100, NULL); buf2 = create_shm_buffer_a8r8g8b8(client, 100, 100);
wl_buffer_add_listener(buf2, &buffer_listener, &buf2_released); wl_buffer_add_listener(buf2->proxy, &buffer_listener, &buf2_released);
buf3 = create_shm_buffer(client, 100, 100, NULL); buf3 = create_shm_buffer_a8r8g8b8(client, 100, 100);
wl_buffer_add_listener(buf3, &buffer_listener, &buf3_released); wl_buffer_add_listener(buf3->proxy, &buffer_listener, &buf3_released);
/* /*
* buf1 must never be released, since it is replaced before * buf1 must never be released, since it is replaced before
* it is committed, therefore it never becomes busy. * it is committed, therefore it never becomes busy.
*/ */
wl_surface_attach(surface, buf1, 0, 0); wl_surface_attach(surface, buf1->proxy, 0, 0);
wl_surface_attach(surface, buf2, 0, 0); wl_surface_attach(surface, buf2->proxy, 0, 0);
frame_callback_set(surface, &frame); frame_callback_set(surface, &frame);
wl_surface_commit(surface); wl_surface_commit(surface);
frame_callback_wait(client, &frame); frame_callback_wait(client, &frame);
@ -405,7 +405,7 @@ TEST(buffer_release)
/* buf2 may or may not be released */ /* buf2 may or may not be released */
assert(buf3_released == 0); assert(buf3_released == 0);
wl_surface_attach(surface, buf3, 0, 0); wl_surface_attach(surface, buf3->proxy, 0, 0);
frame_callback_set(surface, &frame); frame_callback_set(surface, &frame);
wl_surface_commit(surface); wl_surface_commit(surface);
frame_callback_wait(client, &frame); frame_callback_wait(client, &frame);

Loading…
Cancel
Save