[cogl/cogl-1.14] cogland: Flush the clients in prepare, not check



commit 003886661c833a7fd4954cf2630e72d47d5c8596
Author: Neil Roberts <neil linux intel com>
Date:   Fri Mar 22 13:23:42 2013 +0000

    cogland: Flush the clients in prepare, not check
    
    The clients should be flushed before going idle, not after so the call
    to wl_display_flush_clients was in the wrong place.
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit a191366fbababd5b551140ef9297a9c6e3852c59)

 examples/cogland.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/examples/cogland.c b/examples/cogland.c
index fab76c6..c18850a 100644
--- a/examples/cogland.c
+++ b/examples/cogland.c
@@ -213,8 +213,12 @@ region_subtract (CoglandRegion *region,
 static CoglBool
 wayland_event_source_prepare (GSource *base, int *timeout)
 {
+  WaylandEventSource *source = (WaylandEventSource *)base;
+
   *timeout = -1;
 
+  wl_display_flush_clients (source->display);
+
   return FALSE;
 }
 
@@ -223,8 +227,6 @@ wayland_event_source_check (GSource *base)
 {
   WaylandEventSource *source = (WaylandEventSource *)base;
 
-  wl_display_flush_clients (source->display);
-
   return source->pfd.revents;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]