diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-08-31 16:21:38 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-08-31 16:21:38 -0400 |
commit | f389cacc2050ef3d7ee4654a577fdf5ef47e6224 (patch) | |
tree | 8afc78a5f968146aeaf9d56bfb2bd3af1aa18003 /clients/screenshot.c | |
parent | 4ebf3a0c2efb4b0d78aa6509facec014825f5b4f (diff) | |
download | weston-f389cacc2050ef3d7ee4654a577fdf5ef47e6224.tar.gz weston-f389cacc2050ef3d7ee4654a577fdf5ef47e6224.tar.bz2 weston-f389cacc2050ef3d7ee4654a577fdf5ef47e6224.zip |
Move away from visuals and just use EGLConfigs or shm format tokens
Diffstat (limited to 'clients/screenshot.c')
-rw-r--r-- | clients/screenshot.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clients/screenshot.c b/clients/screenshot.c index 428befa7..1cccedf5 100644 --- a/clients/screenshot.c +++ b/clients/screenshot.c @@ -40,7 +40,6 @@ static struct wl_output *output; static struct wl_shm *shm; -static struct wl_visual *visual; static struct screenshooter *screenshooter; static int output_width, output_height; @@ -78,17 +77,11 @@ static void handle_global(struct wl_display *display, uint32_t id, const char *interface, uint32_t version, void *data) { - static int visual_count; - if (strcmp(interface, "wl_output") == 0) { output = wl_display_bind(display, id, &wl_output_interface); wl_output_add_listener(output, &output_listener, NULL); } else if (strcmp(interface, "wl_shm") == 0) { shm = wl_display_bind(display, id, &wl_shm_interface); - } else if (strcmp(interface, "wl_visual") == 0) { - if (visual_count++ == 1) - visual = wl_display_bind(display, id, - &wl_visual_interface); } else if (strcmp(interface, "screenshooter") == 0) { screenshooter = wl_display_bind(display, id, &screenshooter_interface); } @@ -124,7 +117,8 @@ create_shm_buffer(int width, int height, void **data_out) return NULL; } - buffer = wl_shm_create_buffer(shm, fd, width, height, stride, visual); + buffer = wl_shm_create_buffer(shm, fd, width, height, stride, + WL_SHM_FORMAT_XRGB32); close(fd); |