compositor, clients: make damage double-buffered

This change depends on the Wayland commit
"protocol: double-buffered state for wl_surface".

Implement double-buffering of damage in the compositor as required by
the new protocol.

Ensure all Weston demo clients call wl_surface_commit() after
wl_surface_damage().

Mesa does not need a fix for this, as the patch adding
wl_surface_commit() call to Mesa already takes care of damage, too;
Mesa commit: "wayland: use wl_surface_commit()"

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen
2012-10-10 12:49:25 +03:00
committed by Kristian Høgsberg
parent c9e00c06e9
commit 8e159180cc
4 changed files with 20 additions and 3 deletions
+4
View File
@@ -142,6 +142,10 @@ touch_paint(struct touch *touch, int32_t x, int32_t y, int32_t id)
p[2] = c;
wl_surface_damage(touch->surface, x - 2, y - 2, 5, 5);
/* todo: We could queue up more damage before committing, if there
* are more input events to handle.
*/
wl_surface_commit(touch->surface);
}
static void
+1
View File
@@ -223,6 +223,7 @@ redraw_handler(struct widget *widget, void *data)
callback = wl_surface_frame(window_get_wl_surface(smoke->window));
wl_callback_add_listener(callback, &listener, smoke);
wl_surface_commit(window_get_wl_surface(smoke->window));
}
static int