fix sync to send done messges but not wait for sync counter with gl
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 31 Jan 2011 06:21:57 +0000 (06:21 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 31 Jan 2011 06:21:57 +0000 (06:21 +0000)
engine.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@56563 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/ecore_evas/ecore_evas_private.h
src/lib/ecore_evas/ecore_evas_x.c

index 1f91471..7edcfa5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,3 +10,8 @@
 
         * make https not fail (that's curl's responsibility, really).
 
+2011-01-31  Carsten Haitzler (The Rasterman)
+
+        * Fix: ecore-evas CAN send "render done" messages even if not
+        waiting for sync counter when using gl engine. new semi-sync
+        mode to account for that.
index 6344be5..510be70 100644 (file)
@@ -351,6 +351,7 @@ struct _Ecore_Evas
    unsigned char manual_render : 1;
    unsigned char registered : 1;
    unsigned char no_comp_sync  : 1;
+   unsigned char semi_sync  : 1;
 };
 
 #ifdef BUILD_ECORE_EVAS_X11
index be83418..5ef090e 100644 (file)
@@ -2983,8 +2983,9 @@ _ecore_evas_x_flush_pre(void *data, Evas *e __UNUSED__, void *event_info __UNUSE
              ee->engine.x.sync_val++;
              if (!ee->engine.x.sync_cancel)
                {
-                  ecore_x_sync_counter_val_wait(ee->engine.x.sync_counter,
-                                                ee->engine.x.sync_val);
+                  if (!ee->semi_sync)
+                     ecore_x_sync_counter_val_wait(ee->engine.x.sync_counter,
+                                                   ee->engine.x.sync_val);
                }
           }
      }
@@ -3436,7 +3437,8 @@ ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
 
    ee->driver = "opengl_x11";
-   ee->no_comp_sync = 1; // gl engine doesnt need to sync - its whole swaps
+   ee->semi_sync = 1; // gl engine doesnt need to sync - its whole swaps
+//   ee->no_comp_sync = 1; // gl engine doesnt need to sync - its whole swaps
    if (disp_name) ee->name = strdup(disp_name);
 
    if (w < 1) w = 1;