forked from enlightenment/enlightenment
gl vsync smoother tear-free rendering on desktop (nvidia though only - i am
in no mood to figure out the convoluted vsync stuff for every linux gl drvier out there!) SVN revision: 46158
This commit is contained in:
parent
b7066f4191
commit
60b35967de
|
@ -202,6 +202,10 @@ _e_exec_cb_exec(void *data, Efreet_Desktop *desktop, char *exec, int remaining)
|
|||
snprintf(buf, sizeof(buf), "E_START|%i", startup_id);
|
||||
e_util_env_set("DESKTOP_STARTUP_ID", buf);
|
||||
|
||||
// dont set vsync for clients - maybe inherited from compositore. fixme:
|
||||
// need a way to still inherit from parent env of wm.
|
||||
e_util_env_set("__GL_SYNC_TO_VBLANK", NULL);
|
||||
|
||||
e_util_library_path_strip();
|
||||
//// FIXME: seem to be some issues with the pipe and filling up ram - need to
|
||||
//// check. for now disable.
|
||||
|
|
|
@ -1589,6 +1589,15 @@ _e_mod_comp_add(E_Manager *man)
|
|||
c = calloc(1, sizeof(E_Comp));
|
||||
if (!c) return NULL;
|
||||
|
||||
if (_comp_mod->conf->vsync)
|
||||
{
|
||||
e_util_env_set("__GL_SYNC_TO_VBLANK", "1");
|
||||
}
|
||||
else
|
||||
{
|
||||
e_util_env_set("__GL_SYNC_TO_VBLANK", NULL);
|
||||
}
|
||||
|
||||
ecore_x_e_comp_sync_supported_set(man->root, _comp_mod->conf->efl_sync);
|
||||
|
||||
c->man = man;
|
||||
|
|
|
@ -13,6 +13,7 @@ struct _E_Config_Dialog_Data
|
|||
int efl_sync;
|
||||
int loose_sync;
|
||||
int grab;
|
||||
int vsync;
|
||||
|
||||
int keep_unmapped;
|
||||
int max_unmapped_pixels;
|
||||
|
@ -76,6 +77,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
cfdata->efl_sync = _comp_mod->conf->efl_sync;
|
||||
cfdata->loose_sync = _comp_mod->conf->loose_sync;
|
||||
cfdata->grab = _comp_mod->conf->grab;
|
||||
cfdata->vsync = _comp_mod->conf->vsync;
|
||||
|
||||
cfdata->keep_unmapped = _comp_mod->conf->keep_unmapped;
|
||||
cfdata->max_unmapped_pixels = _comp_mod->conf->max_unmapped_pixels;
|
||||
|
@ -128,11 +130,13 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
|
||||
///////////////////////////////////////////
|
||||
ol = e_widget_list_add(evas, 0, 0);
|
||||
ob = e_widget_check_add(evas, _("Sync screen (VBlank)"), &(cfdata->vsync));
|
||||
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||
ob = e_widget_check_add(evas, _("Sync windows"), &(cfdata->efl_sync));
|
||||
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||
ob = e_widget_check_add(evas, _("Loose sync"), &(cfdata->loose_sync));
|
||||
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||
ob = e_widget_check_add(evas, _("Grab X11 during draw"), &(cfdata->grab));
|
||||
ob = e_widget_check_add(evas, _("Grab Server during draw"), &(cfdata->grab));
|
||||
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Sync"), ol, 0, 0, 0, 0, 0.5, 0.0);
|
||||
|
||||
|
@ -244,12 +248,14 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
if ((_comp_mod->conf->engine != cfdata->engine) ||
|
||||
(cfdata->texture_from_pixmap != _comp_mod->conf->texture_from_pixmap) ||
|
||||
(cfdata->efl_sync != _comp_mod->conf->efl_sync) ||
|
||||
(cfdata->loose_sync != _comp_mod->conf->loose_sync))
|
||||
(cfdata->loose_sync != _comp_mod->conf->loose_sync) ||
|
||||
(cfdata->vsync != _comp_mod->conf->vsync))
|
||||
{
|
||||
_comp_mod->conf->engine = cfdata->engine;
|
||||
_comp_mod->conf->texture_from_pixmap = cfdata->texture_from_pixmap;
|
||||
_comp_mod->conf->efl_sync = cfdata->efl_sync;
|
||||
_comp_mod->conf->loose_sync = cfdata->loose_sync;
|
||||
_comp_mod->conf->vsync = cfdata->vsync;
|
||||
e_mod_comp_shutdown();
|
||||
e_mod_comp_init();
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ e_modapi_init(E_Module *m)
|
|||
E_CONFIG_VAL(D, T, efl_sync, UCHAR);
|
||||
E_CONFIG_VAL(D, T, loose_sync, UCHAR);
|
||||
E_CONFIG_VAL(D, T, grab, UCHAR);
|
||||
E_CONFIG_VAL(D, T, vsync, UCHAR);
|
||||
E_CONFIG_VAL(D, T, keep_unmapped, UCHAR);
|
||||
E_CONFIG_VAL(D, T, send_flush, UCHAR);
|
||||
E_CONFIG_VAL(D, T, send_dump, UCHAR);
|
||||
|
@ -75,6 +76,7 @@ e_modapi_init(E_Module *m)
|
|||
mod->conf->efl_sync = 1;
|
||||
mod->conf->loose_sync = 1;
|
||||
mod->conf->grab = 0;
|
||||
mod->conf->vsync = 1;
|
||||
mod->conf->keep_unmapped = 1;
|
||||
mod->conf->send_flush = 1;
|
||||
mod->conf->send_dump = 0;
|
||||
|
|
|
@ -15,6 +15,7 @@ struct _Config
|
|||
unsigned char loose_sync;
|
||||
unsigned char efl_sync;
|
||||
unsigned char grab;
|
||||
unsigned char vsync;
|
||||
unsigned char keep_unmapped;
|
||||
unsigned char send_flush;
|
||||
unsigned char send_dump;
|
||||
|
|
Loading…
Reference in New Issue