add avoid_afill option 03/187003/2 accepted/tizen/unified/20180820.153936 submit/tizen/20180820.053147
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 30 Jul 2018 08:31:59 +0000 (17:31 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 17 Aug 2018 07:03:40 +0000 (07:03 +0000)
The avoid_afill option is for initializing ecore_evas engine.

When the avoid_afill is 1, e20 uses the gl_tbm_ES engine.
The gl_tbm_ES engine does not fill 0xff the alpha channel even if
the depth of the ecore_evas is 24 depth and the bpp of the buffer
is 32bits.
Otherwise, the gl_tbm engine which is used when the avoid_afill is 0
(default value) fills the 0xff at the same condition.

p.s. this patch is temporary. therefore it will be revoved later.

Change-Id: I8af6e3be883d800687a8cfd893bd5f5c2555eddf

src/bin/e_comp.c
src/bin/e_comp.h
src/bin/e_comp_cfdata.c
src/bin/e_comp_cfdata.h
src/bin/e_hwc.c
src/bin/e_hwc_window.c
src/bin/e_plane.c

index 22d074d1d5cb0d8b59f777bb73bb89266f63f6c0..d0aa08feb251c00c87df5cdb0d26d8b407863fbe 100644 (file)
@@ -460,6 +460,7 @@ e_comp_init(void)
    if (conf->use_native_type_buffer) e_comp->use_native_type_buffer = EINA_TRUE;
 
    e_comp->comp_type = E_PIXMAP_TYPE_WL;
+   if (conf->avoid_afill) e_comp->avoid_afill = EINA_TRUE;
 
    e_comp_canvas_fake_layers_init();
 
index b270ee1f73f21e5bd617e843747c23a69804a415..7fc486ebf5cee901ece2a685280d925fc0b78711 100644 (file)
@@ -148,6 +148,7 @@ struct _E_Comp
    Eina_Bool       hwc_use_detach;
    Eina_Bool       hwc_ignore_primary;
    Eina_Bool       use_native_type_buffer : 1; // use native buffer type
+   Eina_Bool       avoid_afill; // avoid to fill the alpha channel as 0xff. that means filling 0x00.
 
    int depth;
    unsigned int    input_key_grabs;
index cd708cddce34202c5f1ff7683f42288eb3a3f7b8..db0b4bed6b09f3110568f24f86129c7a59a33232 100644 (file)
@@ -88,6 +88,7 @@ e_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
    E_CONFIG_VAL(D, T, dim_rect_effect, UCHAR);
    E_CONFIG_VAL(D, T, dim_rect_enable, UCHAR);
    E_CONFIG_VAL(D, T, input_log_enable, UCHAR);
+   E_CONFIG_VAL(D, T, avoid_afill, UCHAR);
 }
 
 E_API E_Comp_Config *
@@ -249,6 +250,8 @@ e_comp_cfdata_config_new(void)
 
    cfg->input_log_enable = 0;
 
+   cfg->avoid_afill = 0; // 0: use gl_tbm ee engine, 1: use gl_tbm_ES ee engine
+
    return cfg;
 
 error:
index 07bdd9e4e1516474f977925fca7b1492b0fa7af1..ecc6bad7812684afa989a1a1eaec6a336774dae4 100644 (file)
@@ -71,6 +71,7 @@ struct _E_Comp_Config
    unsigned char dim_rect_enable;
    unsigned char dim_rect_effect;
    Eina_Bool input_log_enable;
+   unsigned char avoid_afill; // used for avoiding to fill the alpha channel. 0: use gl_tbm ee engine, 1: use gl_tbm_ES ee engine
 };
 
 struct _E_Comp_Match
index a6dc5faba8d0f7957b3a71574d2b24df8730f26f..0d6938de89a33573285b30b44d233e6f31d53cca 100644 (file)
@@ -209,7 +209,10 @@ _e_hwc_ee_init(E_Hwc* hwc)
        (e_comp_config_get()->engine == E_COMP_ENGINE_GL))
      {
         e_main_ts_begin("\tEE_GL_DRM New");
-        ee = ecore_evas_tbm_allocfunc_new("gl_tbm", scr_w, scr_h, _e_hwc_tbm_surface_queue_alloc, _e_hwc_tbm_surface_queue_free, (void *)hwc);
+        if (e_comp->avoid_afill)
+          ee = ecore_evas_tbm_allocfunc_new("gl_tbm_ES", scr_w, scr_h, _e_hwc_tbm_surface_queue_alloc, _e_hwc_tbm_surface_queue_free, (void *)hwc);
+        else
+          ee = ecore_evas_tbm_allocfunc_new("gl_tbm", scr_w, scr_h, _e_hwc_tbm_surface_queue_alloc, _e_hwc_tbm_surface_queue_free, (void *)hwc);
         snprintf(buf, sizeof(buf), "\tEE_GL_DRM New Done %p %dx%d", ee, scr_w, scr_h);
         e_main_ts_end(buf);
 
index a6fd09a4d7d796002fd834882e4932ad0a2b5d03..c2d3a342a37e13491d50019598ea2184bfb6a951 100644 (file)
@@ -390,7 +390,8 @@ _e_hwc_window_target_new(E_Hwc *hwc)
    if(!strcmp("gl_drm_tbm", name) ||
       !strcmp("drm_tbm", name) ||
       !strcmp("gl_tbm", name) ||
-      !strcmp("software_tbm", name))
+      !strcmp("software_tbm", name) ||
+      !strcmp("gl_tbm_ES", name))
      {
         ecore_evas_manual_render_set(e_comp->ee, 1);
      }
index f4abaf729cfebb314ee663fa0dc62ba53938c6c4..427aa2a974ab8880ad2e2fa422e9fbd93376870a 100644 (file)
@@ -1728,6 +1728,10 @@ e_plane_setup(E_Plane *plane)
      {
         ecore_evas_manual_render_set(e_comp->ee, 1);
      }
+   else if(!strcmp("gl_tbm_ES", name))
+     {
+        ecore_evas_manual_render_set(e_comp->ee, 1);
+     }
    else if(!strcmp("software_tbm", name))
      {
         ecore_evas_manual_render_set(e_comp->ee, 1);