summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-02-15 05:27:36 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-02-15 05:27:36 +0000
commita0874fb2b33c76d79cfeebe5962755e9ee03a1cc (patch)
tree49d8287c0fc21153175627c7f5129c210e00de95
parent60b35967de7b43f7007eddc1c354c933bd88261f (diff)
downloadenlightenment-a0874fb2b33c76d79cfeebe5962755e9ee03a1cc.tar.gz
add support for indirect option for gl.
SVN revision: 46179
-rw-r--r--src/modules/comp/e_mod_comp.c19
-rw-r--r--src/modules/comp/e_mod_config.c15
-rw-r--r--src/modules/comp/e_mod_main.c4
-rw-r--r--src/modules/comp/e_mod_main.h1
4 files changed, 35 insertions, 4 deletions
diff --git a/src/modules/comp/e_mod_comp.c b/src/modules/comp/e_mod_comp.c
index dd7257b7aa..47c238f367 100644
--- a/src/modules/comp/e_mod_comp.c
+++ b/src/modules/comp/e_mod_comp.c
@@ -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;
diff --git a/src/modules/comp/e_mod_config.c b/src/modules/comp/e_mod_config.c
index 1f0dd3a45f..4fc9ed485d 100644
--- a/src/modules/comp/e_mod_config.c
+++ b/src/modules/comp/e_mod_config.c
@@ -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;
diff --git a/src/modules/comp/e_mod_main.c b/src/modules/comp/e_mod_main.c
index 02b0a5b479..13e59b41ae 100644
--- a/src/modules/comp/e_mod_main.c
+++ b/src/modules/comp/e_mod_main.c
@@ -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;
diff --git a/src/modules/comp/e_mod_main.h b/src/modules/comp/e_mod_main.h
index dba9d0e5bc..20a7c0eec4 100644
--- a/src/modules/comp/e_mod_main.h
+++ b/src/modules/comp/e_mod_main.h
@@ -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;