---
 clients/simple-egl.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index 26ebe5c..8138a02 100644
--- a/clients/simple-egl.c
+++ b/clients/simple-egl.c
@@ -365,6 +365,7 @@ redraw(void *data, struct wl_callback *callback, uint32_t 
time)
        static const int32_t speed_div = 5;
        static uint32_t start_time = 0;
        struct wl_region *region;
+       struct wl_buffer *buffer;
 
        assert(window->callback == callback);
        window->callback = NULL;
@@ -416,7 +417,14 @@ redraw(void *data, struct wl_callback *callback, uint32_t 
time)
        window->callback = wl_surface_frame(window->surface);
        wl_callback_add_listener(window->callback, &frame_listener, window);
 
-       eglSwapBuffers(window->display->egl.dpy, window->egl_surface);
+       buffer = wl_egl_window_take_buffer(window->native);
+
+       wl_surface_attach(window->surface, buffer, 0, 0);
+
+       wl_surface_damage(window->surface, 0, 0,
+                    window->geometry.width, window->geometry.height);
+
+       wl_surface_commit(window->surface);
 }
 
 static const struct wl_callback_listener frame_listener = {
-- 
1.8.1.4

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to