forked from enlightenment/enlightenment
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.
This commit is contained in:
parent
e5300734dc
commit
65a1ed752e
|
@ -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))
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue