raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=65a1ed752ed08de58d2eea550ad1bbc2d451e8d9

commit 65a1ed752ed08de58d2eea550ad1bbc2d451e8d9
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Dec 8 14:44:26 2013 +0900

    comp - disable grab by default due to it causing erratic rendering
    
    so i found something interesting. the grab option causes some erratic
    framerate in clients IF thoise clients have to sync to the xserver and
    themselves try and render more smoothly. it masically means animators
    get delayed due to unusually long render times because of this. this
    fixes that. this also adds a comp config version number allowing the
    code to upgrade a users config to turn this off and thus allows for
    future upgrades too.
---
 src/bin/e_comp.c        | 17 +++++++++++++++++
 src/bin/e_comp_cfdata.c |  4 +++-
 src/bin/e_comp_cfdata.h |  3 +++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index dd36267..6315d25 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -4770,6 +4770,23 @@ e_comp_init(void)
    else
      conf = e_comp_cfdata_config_new();
 
+   // comp config versioning - add this in. over time add epochs etc. if
+   // necessary, but for now a simple version number will do
+   if (conf->version < E_COMP_VERSION)
+     {
+        switch (conf->version)
+          {
+           case 0:
+             // going from version 0 we should disable grab for smoothness
+             conf->grab = 0;
+             /* fallthrough */
+           default:
+             break;
+          }
+        e_config_save_queue();
+        conf->version = E_COMP_VERSION;
+     }
+
    if (!getenv("ECORE_X_NO_XLIB"))
      {
         if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11))
diff --git a/src/bin/e_comp_cfdata.c b/src/bin/e_comp_cfdata.c
index e95c5f5..e51a3c4 100644
--- a/src/bin/e_comp_cfdata.c
+++ b/src/bin/e_comp_cfdata.c
@@ -32,6 +32,7 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD 
**match_edd)
 #undef D
 #define T E_Comp_Config
 #define D *conf_edd
+   E_CONFIG_VAL(D, T, version, INT);
    E_CONFIG_VAL(D, T, shadow_style, STR);
    E_CONFIG_VAL(D, T, engine, INT);
    //E_CONFIG_VAL(D, T, max_unmapped_pixels, INT);
@@ -79,6 +80,7 @@ e_comp_cfdata_config_new(void)
    E_Comp_Match *mat;
 
    cfg = E_NEW(E_Comp_Config, 1);
+   cfg->version = E_COMP_VERSION;
    cfg->shadow_style = eina_stringshare_add("default");
    cfg->engine = E_COMP_ENGINE_SW;
    cfg->max_unmapped_pixels = 32 * 1024;  // implement
@@ -92,7 +94,7 @@ e_comp_cfdata_config_new(void)
    cfg->lock_fps = 0;
    cfg->efl_sync = 0;
    cfg->loose_sync = 1;
-   cfg->grab = 1;
+   cfg->grab = 0;
    cfg->vsync = 1;
 #ifdef ECORE_EVAS_GL_X11_OPT_SWAP_MODE
    cfg->swap_mode = ECORE_EVAS_GL_X11_SWAP_MODE_AUTO;
diff --git a/src/bin/e_comp_cfdata.h b/src/bin/e_comp_cfdata.h
index 79ee038..9f13e6c 100644
--- a/src/bin/e_comp_cfdata.h
+++ b/src/bin/e_comp_cfdata.h
@@ -4,8 +4,11 @@ typedef struct _E_Comp_Match  E_Comp_Match;
 #else
 #ifndef E_COMP_CFDATA_H
 #define E_COMP_CFDATA_H
+
+#define E_COMP_VERSION 1
 struct _E_Comp_Config
 {
+   int           version;
    const char   *shadow_style;
    int           engine;
    int           max_unmapped_pixels;

-- 


Reply via email to