365c1296fa
Screenshooting does not involve creating a wl_surface, so using struct surface is superfluous. Return a struct buffer instead. It could have been just a pixman_image_t, but setting up proper destruction would be a bit more work. Should not hurt to keep the wl_buffer around until the user is ready to free the image. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>