add gl engine option - still slow way to update tho.

SVN revision: 45329
This commit is contained in:
Carsten Haitzler 2010-01-19 14:28:56 +00:00
parent 06c33bb3ab
commit 89d6be54fc
5 changed files with 51 additions and 8 deletions

View File

@ -34,6 +34,8 @@ struct _E_Comp
Eina_Inlist *wins; Eina_Inlist *wins;
Eina_List *updates; Eina_List *updates;
Ecore_Animator *render_animator; Ecore_Animator *render_animator;
Eina_Bool gl : 1; // is visible
}; };
struct _E_Comp_Win struct _E_Comp_Win
@ -908,7 +910,15 @@ _e_mod_comp_add(E_Manager *man)
} }
if (c->man->num == 0) e_alert_composite_win = c->win; if (c->man->num == 0) e_alert_composite_win = c->win;
c->ee = ecore_evas_software_x11_new(NULL, c->win, 0, 0, man->w, man->h);
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 (c->ee) c->gl = 1;
}
if (!c->ee)
c->ee = ecore_evas_software_x11_new(NULL, c->win, 0, 0, man->w, man->h);
ecore_evas_manual_render_set(c->ee, 1); ecore_evas_manual_render_set(c->ee, 1);
c->evas = ecore_evas_get(c->ee); c->evas = ecore_evas_get(c->ee);
ecore_evas_show(c->ee); ecore_evas_show(c->ee);

View File

@ -7,6 +7,7 @@
struct _E_Config_Dialog_Data struct _E_Config_Dialog_Data
{ {
int use_shadow; int use_shadow;
int engine;
}; };
/* Protos */ /* Protos */
@ -49,6 +50,10 @@ _create_data(E_Config_Dialog *cfd)
cfdata = E_NEW(E_Config_Dialog_Data, 1); cfdata = E_NEW(E_Config_Dialog_Data, 1);
cfdata->use_shadow = _comp_mod->conf->use_shadow; cfdata->use_shadow = _comp_mod->conf->use_shadow;
cfdata->engine = _comp_mod->conf->engine;
if ((cfdata->engine != E_EVAS_ENGINE_SOFTWARE_X11) &&
(cfdata->engine != E_EVAS_ENGINE_GL_X11))
cfdata->engine = E_EVAS_ENGINE_SOFTWARE_X11;
return cfdata; return cfdata;
} }
@ -65,6 +70,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
{ {
Evas_Object *o, *ob, *of, *ot; Evas_Object *o, *ob, *of, *ot;
E_Radio_Group *rg; E_Radio_Group *rg;
int engine;
o = e_widget_list_add(evas, 0, 0); o = e_widget_list_add(evas, 0, 0);
ot = e_widget_table_add(evas, 1); ot = e_widget_table_add(evas, 1);
@ -75,6 +81,24 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_framelist_object_append(of, ob); e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1); e_widget_table_object_append(ot, of, 0, 0, 1, 1, 1, 1, 1, 1);
of = e_widget_framelist_add(evas, _("Engine"), 0);
e_widget_framelist_content_align_set(of, 0.5, 0.0);
rg = e_widget_radio_group_new(&(cfdata->engine));
engine = E_EVAS_ENGINE_SOFTWARE_X11;
ob = e_widget_radio_add(evas, _("Software"), engine, rg);
e_widget_framelist_object_append(of, ob);
if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_X11))
{
engine = E_EVAS_ENGINE_GL_X11;
ob = e_widget_radio_add(evas, _("OpenGL"), engine, rg);
e_widget_framelist_object_append(of, ob);
}
e_widget_table_object_append(ot, of, 0, 1, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.5); e_widget_list_object_append(o, ot, 1, 1, 0.5);
return o; return o;
@ -88,7 +112,12 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
_comp_mod->conf->use_shadow = cfdata->use_shadow; _comp_mod->conf->use_shadow = cfdata->use_shadow;
e_mod_comp_shadow_set(); e_mod_comp_shadow_set();
} }
if (_comp_mod->conf->engine != cfdata->engine)
{
_comp_mod->conf->engine = cfdata->engine;
e_mod_comp_shutdown();
e_mod_comp_init();
}
e_config_save_queue(); e_config_save_queue();
return 1; return 1;
} }

View File

@ -32,6 +32,7 @@ e_modapi_init(E_Module *m)
#define D mod->conf_edd #define D mod->conf_edd
E_CONFIG_VAL(D, T, use_shadow, UCHAR); E_CONFIG_VAL(D, T, use_shadow, UCHAR);
E_CONFIG_VAL(D, T, shadow_file, STR); E_CONFIG_VAL(D, T, shadow_file, STR);
E_CONFIG_VAL(D, T, engine, INT);
mod->conf = e_config_domain_load("module.comp", mod->conf_edd); mod->conf = e_config_domain_load("module.comp", mod->conf_edd);
if (!mod->conf) if (!mod->conf)
@ -39,6 +40,7 @@ e_modapi_init(E_Module *m)
mod->conf = E_NEW(Config, 1); mod->conf = E_NEW(Config, 1);
mod->conf->use_shadow = 1; mod->conf->use_shadow = 1;
mod->conf->shadow_file = NULL; mod->conf->shadow_file = NULL;
mod->conf->engine = E_EVAS_ENGINE_SOFTWARE_X11;
} }
_comp_mod = mod; _comp_mod = mod;

View File

@ -9,6 +9,7 @@ struct _Config
{ {
unsigned char use_shadow; unsigned char use_shadow;
const char *shadow_file; const char *shadow_file;
int engine;
}; };
struct _Mod struct _Mod

11
x-ui.sh
View File

@ -12,9 +12,9 @@
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640x16 & #Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640x16 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 640x480x16 -host-cursor & #Xephyr :1 -noreset -ac -br -dpi 284 -screen 640x480x16 -host-cursor &
Xephyr :1 -noreset -ac -br -dpi 183 -screen 960x400x16 -host-cursor & #Xephyr :1 -noreset -ac -br -dpi 183 -screen 960x400x16 -host-cursor &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x800 -host-cursor & Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x800 -host-cursor &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640 & #Xephyr :1 -noreset -ac -br -dpi 284 -screen 480x640 &
#Xephyr :1 -noreset -ac -br -dpi 284 -screen 640x480 & #Xephyr :1 -noreset -ac -br -dpi 284 -screen 640x480 &
#Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320 & #Xephyr :1 -noreset -ac -br -dpi 181 -screen 320x320 &
@ -30,6 +30,7 @@ unset E_RESTART E_START E_IPC_SOCKET E_START_TIME E_CONF_PROFILE
enlightenment_start \ enlightenment_start \
-no-precache \ -no-precache \
-i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it \ -i-really-know-what-i-am-doing-and-accept-full-responsibility-for-it \
-profile illume-home \ -profile illume-home
-fake-xinerama-screen 480x400+0+0 \
-fake-xinerama-screen 480x400+480+0 #-fake-xinerama-screen 480x400+0+0 \
#$-fake-xinerama-screen 480x400+480+0