diff options
author | Pekka Paalanen <ppaalanen@gmail.com> | 2012-10-10 12:49:25 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-10-10 21:38:31 -0400 |
commit | 8e159180cc2cb149399b20300cbed106e298241f (patch) | |
tree | 602fa48ffc2c74fcb887449fd5e9543621cbd4eb /clients | |
parent | c9e00c06e97c74bc96951f4b81d08ecf4a01c705 (diff) | |
download | weston-8e159180cc2cb149399b20300cbed106e298241f.tar.gz weston-8e159180cc2cb149399b20300cbed106e298241f.tar.bz2 weston-8e159180cc2cb149399b20300cbed106e298241f.zip |
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>
Diffstat (limited to 'clients')
-rw-r--r-- | clients/simple-touch.c | 4 | ||||
-rw-r--r-- | clients/smoke.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/clients/simple-touch.c b/clients/simple-touch.c index 72a7e072..fa248f5c 100644 --- a/clients/simple-touch.c +++ b/clients/simple-touch.c @@ -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 diff --git a/clients/smoke.c b/clients/smoke.c index 69d4f23e..905e53fb 100644 --- a/clients/smoke.c +++ b/clients/smoke.c @@ -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 |