add support for indirect option for gl.
SVN revision: 46179
This commit is contained in:
parent
60b35967de
commit
a0874fb2b3
|
@ -876,6 +876,13 @@ _e_mod_comp_win_del(E_Comp_Win *cw)
|
|||
cw->pw = 0;
|
||||
cw->ph = 0;
|
||||
}
|
||||
if (cw->redirected)
|
||||
{
|
||||
ecore_x_composite_unredirect_window(cw->win, ECORE_X_COMPOSITE_UPDATE_MANUAL);
|
||||
cw->redirected = 0;
|
||||
cw->pw = 0;
|
||||
cw->ph = 0;
|
||||
}
|
||||
// segv?
|
||||
// evas_object_image_native_surface_set(cw->obj, NULL);
|
||||
// cw->native = 0;
|
||||
|
@ -1632,7 +1639,17 @@ _e_mod_comp_add(E_Manager *man)
|
|||
|
||||
if (_comp_mod->conf->engine == E_EVAS_ENGINE_GL_X11)
|
||||
{
|
||||
c->ee = ecore_evas_gl_x11_new(NULL, c->win, 0, 0, man->w, man->h);
|
||||
if (_comp_mod->conf->indirect)
|
||||
{
|
||||
const int opt[] =
|
||||
{ ECORE_EVAS_GL_X11_OPT_INDIRECT, 1,
|
||||
ECORE_EVAS_GL_X11_OPT_NONE
|
||||
};
|
||||
c->ee = ecore_evas_gl_x11_options_new
|
||||
(NULL, c->win, 0, 0, man->w, man->h, opt);
|
||||
}
|
||||
if (!c->ee)
|
||||
c->ee = ecore_evas_gl_x11_new(NULL, c->win, 0, 0, man->w, man->h);
|
||||
if (c->ee)
|
||||
{
|
||||
c->gl = 1;
|
||||
|
|
|
@ -8,6 +8,7 @@ struct _E_Config_Dialog_Data
|
|||
{
|
||||
int use_shadow;
|
||||
int engine;
|
||||
int indirect;
|
||||
int texture_from_pixmap;
|
||||
int lock_fps;
|
||||
int efl_sync;
|
||||
|
@ -72,6 +73,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
if ((cfdata->engine != E_EVAS_ENGINE_SOFTWARE_X11) &&
|
||||
(cfdata->engine != E_EVAS_ENGINE_GL_X11))
|
||||
cfdata->engine = E_EVAS_ENGINE_SOFTWARE_X11;
|
||||
cfdata->indirect = _comp_mod->conf->indirect;
|
||||
cfdata->texture_from_pixmap = _comp_mod->conf->texture_from_pixmap;
|
||||
cfdata->lock_fps = _comp_mod->conf->lock_fps;
|
||||
cfdata->efl_sync = _comp_mod->conf->efl_sync;
|
||||
|
@ -154,6 +156,8 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_widget_framelist_content_align_set(of, 0.5, 0.0);
|
||||
ob = e_widget_check_add(evas, _("Texture from pixmap"), &(cfdata->texture_from_pixmap));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
ob = e_widget_check_add(evas, _("Indirect OpenGL"), &(cfdata->indirect));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(ol, of, 1, 1, 0.5);
|
||||
e_widget_toolbook_page_append(otb, NULL, _("Engine"), ol, 0, 0, 0, 0, 0.5, 0.0);
|
||||
|
||||
|
@ -246,18 +250,25 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
e_mod_comp_shadow_set();
|
||||
}
|
||||
if ((_comp_mod->conf->engine != cfdata->engine) ||
|
||||
(cfdata->indirect != _comp_mod->conf->indirect) ||
|
||||
(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->vsync != _comp_mod->conf->vsync))
|
||||
{
|
||||
E_Action *a;
|
||||
|
||||
_comp_mod->conf->engine = cfdata->engine;
|
||||
_comp_mod->conf->indirect = cfdata->indirect;
|
||||
_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();
|
||||
|
||||
a = e_action_find("restart");
|
||||
if ((a) && (a->func.go)) a->func.go(NULL, NULL);
|
||||
// e_mod_comp_shutdown();
|
||||
// e_mod_comp_init();
|
||||
}
|
||||
e_config_save_queue();
|
||||
return 1;
|
||||
|
|
|
@ -47,6 +47,7 @@ e_modapi_init(E_Module *m)
|
|||
E_CONFIG_VAL(D, T, use_shadow, UCHAR);
|
||||
E_CONFIG_VAL(D, T, shadow_file, STR);
|
||||
E_CONFIG_VAL(D, T, engine, INT);
|
||||
E_CONFIG_VAL(D, T, indirect, UCHAR);
|
||||
E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR);
|
||||
E_CONFIG_VAL(D, T, lock_fps, UCHAR);
|
||||
E_CONFIG_VAL(D, T, efl_sync, UCHAR);
|
||||
|
@ -71,7 +72,8 @@ e_modapi_init(E_Module *m)
|
|||
mod->conf->use_shadow = 1;
|
||||
mod->conf->shadow_file = NULL;
|
||||
mod->conf->engine = E_EVAS_ENGINE_SOFTWARE_X11;
|
||||
mod->conf->texture_from_pixmap = 0;
|
||||
mod->conf->indirect = 0;
|
||||
mod->conf->texture_from_pixmap = 0;
|
||||
mod->conf->lock_fps = 1;
|
||||
mod->conf->efl_sync = 1;
|
||||
mod->conf->loose_sync = 1;
|
||||
|
|
|
@ -10,6 +10,7 @@ struct _Config
|
|||
unsigned char use_shadow;
|
||||
const char *shadow_file;
|
||||
int engine;
|
||||
unsigned char indirect;
|
||||
unsigned char texture_from_pixmap;
|
||||
unsigned char lock_fps;
|
||||
unsigned char loose_sync;
|
||||
|
|
Loading…
Reference in New Issue