Commit f1cecef2 authored by Daniel Stone's avatar Daniel Stone

gl-renderer: Demystify output repaint slightly

Add some comments in the function to make it clear what's going on,
especially as we twist and turn between a lot of things called 'damage'
meaning different things in different co-ordinate spaces.
Signed-off-by: Daniel Stone's avatarDaniel Stone <>
parent 30f58637
......@@ -1491,12 +1491,19 @@ gl_renderer_repaint_output(struct weston_output *output,
/* previous_damage covers regions damaged in previous paints since we
* last used this buffer */
pixman_region32_init(&total_damage); /* total area to redraw */
/* Update previous_damage using buffer_age (if available), and store
* current damaged region for future use. */
output_get_damage(output, &previous_damage, &border_status);
output_rotate_damage(output, output_damage, go->border_status);
/* Redraw both areas which have changed since we last used this buffer,
* as well as the areas we now want to repaint, to make sure the
* buffer is up to date. */
pixman_region32_union(&total_damage, &previous_damage, output_damage);
border_status |= go->border_status;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment