summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-08 14:44:26 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-12-08 14:46:19 +0900
commit65a1ed752ed08de58d2eea550ad1bbc2d451e8d9 (patch)
tree724b34991ee3d666ed7ff33b4624ba7a5721d6ce
parente5300734dcbc1b7e0c94f335aae02b12f58487c6 (diff)
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.
-rw-r--r--src/bin/e_comp.c17
-rw-r--r--src/bin/e_comp_cfdata.c4
-rw-r--r--src/bin/e_comp_cfdata.h3
3 files changed, 23 insertions, 1 deletions
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index dd362671b..6315d2571 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -4770,6 +4770,23 @@ e_comp_init(void)
4770 else 4770 else
4771 conf = e_comp_cfdata_config_new(); 4771 conf = e_comp_cfdata_config_new();
4772 4772
4773 // comp config versioning - add this in. over time add epochs etc. if
4774 // necessary, but for now a simple version number will do
4775 if (conf->version < E_COMP_VERSION)
4776 {
4777 switch (conf->version)
4778 {
4779 case 0:
4780 // going from version 0 we should disable grab for smoothness
4781 conf->grab = 0;
4782 /* fallthrough */
4783 default:
4784 break;
4785 }
4786 e_config_save_queue();
4787 conf->version = E_COMP_VERSION;
4788 }
4789
4773 if (!getenv("ECORE_X_NO_XLIB")) 4790 if (!getenv("ECORE_X_NO_XLIB"))
4774 { 4791 {
4775 if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11)) 4792 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 e95c5f501..e51a3c4aa 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)
32#undef D 32#undef D
33#define T E_Comp_Config 33#define T E_Comp_Config
34#define D *conf_edd 34#define D *conf_edd
35 E_CONFIG_VAL(D, T, version, INT);
35 E_CONFIG_VAL(D, T, shadow_style, STR); 36 E_CONFIG_VAL(D, T, shadow_style, STR);
36 E_CONFIG_VAL(D, T, engine, INT); 37 E_CONFIG_VAL(D, T, engine, INT);
37 //E_CONFIG_VAL(D, T, max_unmapped_pixels, INT); 38 //E_CONFIG_VAL(D, T, max_unmapped_pixels, INT);
@@ -79,6 +80,7 @@ e_comp_cfdata_config_new(void)
79 E_Comp_Match *mat; 80 E_Comp_Match *mat;
80 81
81 cfg = E_NEW(E_Comp_Config, 1); 82 cfg = E_NEW(E_Comp_Config, 1);
83 cfg->version = E_COMP_VERSION;
82 cfg->shadow_style = eina_stringshare_add("default"); 84 cfg->shadow_style = eina_stringshare_add("default");
83 cfg->engine = E_COMP_ENGINE_SW; 85 cfg->engine = E_COMP_ENGINE_SW;
84 cfg->max_unmapped_pixels = 32 * 1024; // implement 86 cfg->max_unmapped_pixels = 32 * 1024; // implement
@@ -92,7 +94,7 @@ e_comp_cfdata_config_new(void)
92 cfg->lock_fps = 0; 94 cfg->lock_fps = 0;
93 cfg->efl_sync = 0; 95 cfg->efl_sync = 0;
94 cfg->loose_sync = 1; 96 cfg->loose_sync = 1;
95 cfg->grab = 1; 97 cfg->grab = 0;
96 cfg->vsync = 1; 98 cfg->vsync = 1;
97#ifdef ECORE_EVAS_GL_X11_OPT_SWAP_MODE 99#ifdef ECORE_EVAS_GL_X11_OPT_SWAP_MODE
98 cfg->swap_mode = ECORE_EVAS_GL_X11_SWAP_MODE_AUTO; 100 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 79ee03853..9f13e6c1e 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;
4#else 4#else
5#ifndef E_COMP_CFDATA_H 5#ifndef E_COMP_CFDATA_H
6#define E_COMP_CFDATA_H 6#define E_COMP_CFDATA_H
7
8#define E_COMP_VERSION 1
7struct _E_Comp_Config 9struct _E_Comp_Config
8{ 10{
11 int version;
9 const char *shadow_style; 12 const char *shadow_style;
10 int engine; 13 int engine;
11 int max_unmapped_pixels; 14 int max_unmapped_pixels;