Do not enter nocomp mode if ec has sub surface which isn't video client 59/72259/2
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 31 May 2016 08:08:57 +0000 (17:08 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 31 May 2016 09:26:16 +0000 (02:26 -0700)
if client have sub surface which isn't vide, doesn't enter nocomp mode

Change-Id: I69b6aa885aca7debfbdfec44ef6d637c02a773c7

src/bin/e_comp.c
src/bin/e_comp_hwc.c
src/bin/e_comp_wl.c
src/bin/e_comp_wl.h

index 0e21737..a7be01d 100644 (file)
@@ -159,6 +159,12 @@ _e_comp_fullscreen_check(void)
             (cdata->buffer_ref.buffer->type != E_COMP_WL_BUFFER_TYPE_NATIVE))
           break;
 
+        if (cdata->sub.below_list || cdata->sub.below_list_pending)
+          {
+             if (!e_comp_wl_video_client_has(ec))
+                break;
+          }
+
         ow = cdata->width_from_buffer;
         oh = cdata->height_from_buffer;
         vw = cdata->width_from_viewport;
index 569b624..cf800f9 100644 (file)
@@ -1542,10 +1542,14 @@ e_comp_hwc_display_client(E_Client *ec)
    Eina_List *l_o, *ll_o;
    Eina_List *l_l, *ll_l;
    tdm_output_conn_status conn_status;
+   E_Comp_Wl_Client_Data *cdata;
 
    EINA_SAFETY_ON_NULL_RETURN(ec);
    EINA_SAFETY_ON_NULL_RETURN(hwc);
 
+   cdata = (E_Comp_Wl_Client_Data*)ec->comp_data;
+   EINA_SAFETY_ON_NULL_RETURN(cdata);
+
    EINA_LIST_FOREACH_SAFE(hwc->hwc_outputs, l_o, ll_o, hwc_output)
      {
         if (!hwc_output) continue;
@@ -1568,6 +1572,12 @@ e_comp_hwc_display_client(E_Client *ec)
                     _e_comp_hwc_output_display_client_reserved_memory(hwc_output, hwc_layer, ec);
                   else
                     _e_comp_hwc_output_display_client(hwc_output, hwc_layer, ec);
+
+                  if (cdata->sub.below_list || cdata->sub.below_list_pending)
+                    {
+                       if (!e_comp_wl_video_client_has(ec))
+                         e_comp_nocomp_end(__FUNCTION__);
+                    }
                }
              else
                ERR("no primary layer");
index 291f70e..784f736 100644 (file)
@@ -342,21 +342,24 @@ _e_comp_wl_topmost_parent_get(E_Client *ec)
    return ec;
 }
 
-static Eina_Bool
-_e_comp_wl_video_client_has(E_Client *ec)
+E_API Eina_Bool
+e_comp_wl_video_client_has(E_Client *ec)
 {
    E_Client *subc;
    Eina_List *l;
 
+   if (!ec) return EINA_FALSE;
+   if (!ec->comp_data) return EINA_FALSE;
+
    if (ec->comp_data->video_client)
      return EINA_TRUE;
 
    EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
-     if (_e_comp_wl_video_client_has(subc))
+     if (e_comp_wl_video_client_has(subc))
         return EINA_TRUE;
 
    EINA_LIST_FOREACH(ec->comp_data->sub.below_list, l, subc)
-     if (_e_comp_wl_video_client_has(subc))
+     if (e_comp_wl_video_client_has(subc))
         return EINA_TRUE;
 
    return EINA_FALSE;
@@ -3140,7 +3143,7 @@ _e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
    evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE,
                                   _e_comp_wl_subsurface_bg_evas_cb_resize, ec);
 
-   has_video_client = _e_comp_wl_video_client_has(ec);
+   has_video_client = e_comp_wl_video_client_has(ec);
    ELOGF("COMP", "         |bg_rectangle|video_client:%d", NULL, ec, has_video_client);
 
    /* set alpha only if SW path */
index 95ec5ec..51e23fe 100644 (file)
@@ -513,6 +513,8 @@ E_API void e_comp_wl_hook_del(E_Comp_Wl_Hook *ch);
 
 E_API void e_comp_wl_shell_surface_ready(E_Client *ec);
 
+E_API Eina_Bool e_comp_wl_video_client_has(E_Client *ec);
+
 E_API extern int E_EVENT_WAYLAND_GLOBAL_ADD;
 
 # endif