In order to start the repaint loop, the Wayland backend tries to damage
the full SHM buffer, but doesn't actually damage the full area if we
have a frame.
Store the buffer's width and height alongside the buffer itself, so we
can damage the full area when required.
Signed-off-by: Daniel Stone <daniels@collabora.com>
struct wl_buffer *buffer;
void *data;
size_t size;
+ int width;
+ int height;
pixman_region32_t damage; /**< in global coords */
int frame_damaged;
sb->frame_damaged = 1;
sb->data = data;
+ sb->width = width;
+ sb->height = height;
sb->size = height * stride;
pool = wl_shm_create_pool(shm, fd, sb->size);
wl_surface_attach(output->parent.surface, sb->buffer, 0, 0);
wl_surface_damage(output->parent.surface, 0, 0,
- output->base.current_mode->width,
- output->base.current_mode->height);
+ sb->width, sb->height);
}
#ifdef ENABLE_EGL