wayland: Force a display flush when committing surfaces
authorDerek Foreman <derekf@osg.samsung.com>
Wed, 30 Aug 2017 17:29:48 +0000 (12:29 -0500)
committerDerek Foreman <derekf@osg.samsung.com>
Wed, 30 Aug 2017 19:11:47 +0000 (14:11 -0500)
We had a hack in place to flush the display from an idle enterer instead
of after a surface commit.  This led to a problem where the idle
enterer dispatch order was:

renderer for main canvas
wayland dispatch idle enterer
renderer for mouse cursor canvas

The surface commit for the mouse cursor was never dispatched, so the mouse
cursor animation would only update at the rate other events occurred.

By flushing at the appropriate times instead we ensure a proper update.

ref T5850

src/lib/ecore_wl2/ecore_wl2_window.c
src/modules/evas/engines/wayland_egl/evas_wl_main.c

index 2ea2bd9..81d8568 100644 (file)
@@ -1398,7 +1398,11 @@ ecore_wl2_window_commit(Ecore_Wl2_Window *window, Eina_Bool flush)
    window->callback = wl_surface_frame(window->surface);
    wl_callback_add_listener(window->callback, &_frame_listener, window);
 
-   if (flush) wl_surface_commit(window->surface);
+   if (flush)
+     {
+        wl_surface_commit(window->surface);
+        ecore_wl2_display_flush(window->display);
+     }
 }
 
 EAPI Eina_Bool
index b024996..4f1823e 100644 (file)
@@ -547,6 +547,7 @@ eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_
 
  end:
    glsym_evas_gl_preload_render_unlock(eng_preload_make_current, ob);
+   ecore_wl2_display_flush(ob->wl2_disp);
 }
 
 Evas_Engine_GL_Context *