hwc_deactive is a condition whether hwc policy to run or not.
'hwc_fs' is removed because, 'hwc_deactive' condition replaces it exclusively
default value is 0, it may be deactevated by plane init failure
even success, it could be deactivated by e_comp.cfg or by enlightenment_info command
Change-Id: Ic3009e664989b0fa2c50ac0ee282b7221f56889b
Signed-off-by: Juyeon Lee <juyeonne.lee@samsung.com>
// query if HWC can be used
if (!e_comp_gl_get() || // TODO: e_comp_gl_get can be removed out if evas sw backend is TBM
!e_comp->hwc ||
- !e_comp->hwc_fs)
+ e_comp->hwc_deactive)
{
goto end;
}
e_comp_canvas_fake_layers_init();
+ if (conf->hwc_deactive) e_comp->hwc_deactive = EINA_TRUE; // deactive hwc policy
+
#ifdef HAVE_HWC
if (conf->hwc &&
e_comp_gl_get()) // TODO: it can be removed out if evas sw backend is TBM
{
e_comp->hwc = _e_comp_hwc_init();
if (!e_comp->hwc)
- WRN("fail to init hwc.");
- else
- e_comp->hwc_fs = EINA_TRUE; // 1: active hwc policy
+ {
+ WRN("fail to init hwc.");
+ e_comp->hwc_deactive = EINA_TRUE;
+ }
}
#endif
Eina_Bool nocomp_want : 1;
int hwc_mode;
Eina_Bool hwc : 1;
- Eina_Bool hwc_fs : 1; // active hwc policy
+ Eina_Bool hwc_deactive : 1; // deactive hwc policy
int depth;
unsigned int input_key_grabs;
E_CONFIG_VAL(D, T, nocomp_begin_timeout, DOUBLE);
E_CONFIG_VAL(D, T, hwc, UCHAR);
E_CONFIG_VAL(D, T, hwc_use_multi_plane, UCHAR);
+ E_CONFIG_VAL(D, T, hwc_deactive, UCHAR);
E_CONFIG_VAL(D, T, nofade, UCHAR);
E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
cfg->nocomp_begin_timeout = 2.0;
cfg->hwc = 0;
cfg->hwc_use_multi_plane = 0;
+ cfg->hwc_deactive = 0;
cfg->nofade = 0;
cfg->smooth_windows = 0; // 1 if gl, 0 if not
cfg->first_draw_delay = 0.15;
double nocomp_begin_timeout;
unsigned char hwc;
unsigned char hwc_use_multi_plane;
+ unsigned char hwc_deactive;
unsigned char smooth_windows;
unsigned char nofade;
double first_draw_delay;
else
snprintf(tmp, sizeof(tmp), " - ");
}
- else // hwc is not initialized or hwc_fs deactivated
+ else // hwc is not initialized or hwc_deactive 1
{
hwc_off = 1;
snprintf(tmp, sizeof(tmp), " - ");
#ifdef ENABLE_HWC_MULTI
- if (e_comp->hwc && e_comp->hwc_fs)
+ if ((e_comp->hwc) && (!e_comp->hwc_deactive))
{
Eina_List *l;
E_Plane *ep;
if (onoff == 1)
{
- e_comp->hwc_fs = EINA_TRUE;
+ e_comp->hwc_deactive = EINA_FALSE;
}
else if (onoff == 0)
{
e_comp_hwc_end("in runtime by e_info..");
- e_comp->hwc_fs = EINA_FALSE;
+ e_comp->hwc_deactive = EINA_TRUE;
}
return reply;
{
switch (on)
{
- case 0: accept = EINA_TRUE; e_comp->hwc_fs = EINA_FALSE; break;
- case 1: accept = EINA_TRUE; e_comp->hwc_fs = EINA_TRUE; break;
+ case 0: accept = EINA_TRUE; e_comp->hwc_deactive = EINA_TRUE; break;
+ case 1: accept = EINA_TRUE; e_comp->hwc_deactive = EINA_FALSE; break;
default: break;
}
}