video: It should keep checking 'video_client' flag for E module implementation. 10/207910/4
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 14 Jun 2019 02:35:25 +0000 (11:35 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Fri, 14 Jun 2019 03:47:05 +0000 (12:47 +0900)
In case of HWC Planes mode, 'video_client' flag is still important to
manage its composition.

Change-Id: I1bd37f7fcb8e49aa80505f433200db8f268671fe

src/bin/e_comp_wl.c
src/bin/e_comp_wl_subsurface.c
src/bin/e_info_server.c
src/bin/video/e_client_video.c

index 3ccd1dc..4fedd0c 100644 (file)
@@ -2576,6 +2576,14 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
 
    e_comp_wl_subsurface_check_below_bg_rectangle(ec);
 
+   if ((ec->comp_data->video_client) &&
+       ((buffer) &&
+        (buffer->type == E_COMP_WL_BUFFER_TYPE_VIDEO)) &&
+       (e_comp->wl_comp_data->available_hw_accel.underlay))
+     {
+        e_pixmap_image_clear(ec->pixmap, 1);
+     }
+
    state->buffer_viewport.changed = 0;
 
    if (buffer &&
@@ -3347,6 +3355,7 @@ _e_comp_wl_client_cb_new(void *data EINA_UNUSED, E_Client *ec)
    ec->comp_data->layer = p_cdata->layer;
    ec->comp_data->fetch.win_type = p_cdata->fetch.win_type;
    ec->comp_data->fetch.layer = p_cdata->fetch.layer;
+   ec->comp_data->video_client = p_cdata->video_client;
 
    e_pixmap_cdata_set(ec->pixmap, ec->comp_data);
 
@@ -4137,9 +4146,12 @@ e_comp_wl_surface_commit(E_Client *ec)
    Eina_Bool ignored;
 
    _e_comp_wl_surface_state_commit(ec, &ec->comp_data->pending);
-   if ((!e_comp_object_damage_exists(ec->frame)) &&
-       (!e_client_video_hw_composition_check(ec)))
-     e_pixmap_image_clear(ec->pixmap, 1);
+   if (!e_comp_object_damage_exists(ec->frame))
+     {
+        if ((ec->comp_data->video_client) ||
+            (!e_client_video_hw_composition_check(ec)))
+          e_pixmap_image_clear(ec->pixmap, 1);
+     }
 
    ignored = ec->ignored;
 
@@ -4290,7 +4302,8 @@ e_comp_wl_buffer_get(struct wl_resource *resource, E_Client *ec)
           }
         else
           {
-             if ((ec) && (e_client_video_hw_composition_check(ec)))
+             if ((ec) &&
+                 ((ec->comp_data->video_client) || (e_client_video_hw_composition_check(ec))))
                {
                   buffer->type = E_COMP_WL_BUFFER_TYPE_VIDEO;
                   buffer->w = buffer->h = 1;
@@ -4342,7 +4355,8 @@ e_comp_wl_buffer_get(struct wl_resource *resource, E_Client *ec)
                if (!tbm_surf)
                  goto err;
 
-               if ((ec) && (e_client_video_hw_composition_check(ec)))
+               if ((ec) &&
+                   ((ec->comp_data->video_client) || (e_client_video_hw_composition_check(ec))))
                  {
                     buffer->type = E_COMP_WL_BUFFER_TYPE_VIDEO;
                     buffer->w = buffer->h = 1;
index 58e5806..e1c3b20 100644 (file)
@@ -83,7 +83,8 @@ _e_comp_wl_subsurface_video_has(E_Client *ec)
    if (e_object_is_del(E_OBJECT(ec))) return EINA_FALSE;
    if (!ec->comp_data) return EINA_FALSE;
 
-   if (ec->comp_data->video_client)
+   if ((ec->comp_data->video_client) ||
+       (e_client_video_hw_composition_check(ec)))
      return EINA_TRUE;
 
    if (ec->comp_data->has_video_client)
@@ -402,9 +403,12 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
 
    e_comp_wl_surface_state_commit(ec, &sdata->cached);
 
-   if ((!e_comp_object_damage_exists(ec->frame)) &&
-       (!e_client_video_hw_composition_check(ec)))
-     e_pixmap_image_clear(ec->pixmap, 1);
+   if (!e_comp_object_damage_exists(ec->frame))
+     {
+        if ((ec->comp_data->video_client) ||
+            (!e_client_video_hw_composition_check(ec)))
+          e_pixmap_image_clear(ec->pixmap, 1);
+     }
 
    e_comp_wl_buffer_reference(&sdata->cached_buffer_ref, NULL);
 
@@ -1124,7 +1128,8 @@ e_comp_wl_normal_subsurface_has(E_Client *ec)
 
    /* if a leaf client is not video cliet */
    if (ec->comp_data->sub.data && !ec->comp_data->sub.below_list &&
-       !ec->comp_data->sub.below_list_pending && !ec->comp_data->video_client)
+       !ec->comp_data->sub.below_list_pending &&
+       ((!ec->comp_data->video_client) && (!e_client_video_hw_composition_check(ec))))
      return EINA_TRUE;
 
    EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
index 1d35cb6..9beba74 100644 (file)
@@ -1302,7 +1302,7 @@ _get_win_prop_Video_Client(const Evas_Object *evas_obj)
 
    ec = evas_object_data_get(evas_obj, "E_Client");
 
-   if (asprintf(&str, "%d", ec->comp_data ? e_client_video_hw_composition_check((E_Client *)ec) : 0) < 0)
+   if (asprintf(&str, "%d", ec->comp_data ? (ec->comp_data->video_client || e_client_video_hw_composition_check((E_Client *)ec)) : 0) < 0)
      return NULL;
 
    return str;
@@ -2936,7 +2936,7 @@ _e_info_server_cb_subsurface(const Eldbus_Service_Interface *iface EINA_UNUSED,
              if (ec->comp_data->sub.below_obj)
                bgrect = (Ecore_Window)ec->comp_data->sub.below_obj;
              maskobj = e_comp_object_mask_has(ec->frame);
-             video = (e_client_video_hw_composition_check(ec)) ? 1 : 0;
+             video = (ec->comp_data->video_client || e_client_video_hw_composition_check(ec)) ? 1 : 0;
              if (ec->comp_data->sub.data)
                stand = ec->comp_data->sub.data->stand_alone;
              name = e_client_util_name_get(ec);
index 49bc913..c3f8ea3 100644 (file)
@@ -344,10 +344,6 @@ e_client_video_hw_composition_set(E_Client_Video *ecv)
 {
    EINA_SAFETY_ON_NULL_RETURN(ecv);
    ecv->hw_composition = EINA_TRUE;
-
-   /* Deprecated */
-   if (ecv->ec->comp_data)
-     ecv->ec->comp_data->video_client = EINA_TRUE;
 }
 
 EINTERN void
@@ -355,10 +351,6 @@ e_client_video_hw_composition_unset(E_Client_Video *ecv)
 {
    EINA_SAFETY_ON_NULL_RETURN(ecv);
    ecv->hw_composition = EINA_FALSE;
-
-   /* Deprecated */
-   if (ecv->ec->comp_data)
-     ecv->ec->comp_data->video_client = EINA_FALSE;
 }
 
 EINTERN Eina_Bool