subsurface: Remove deprecated function 12/261512/3
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 20 Jul 2021 05:28:28 +0000 (14:28 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 21 Jul 2021 02:32:10 +0000 (02:32 +0000)
The function e_comp_wl_subsurface_create got deprecated since
e_comp_wl_subsurface_add have been introduced.

Change-Id: I18867627bfce0e73002222abe8eae09b391d4580

src/bin/e_comp_wl_subsurface.c
src/bin/e_comp_wl_subsurface.h

index 71a00bf9e5a8c9ec181c171d107256436fb54578..b31f1e0bd34a8c80ec2d6e4ba7028f331f5bde57 100644 (file)
@@ -925,97 +925,6 @@ e_comp_wl_subsurfaces_shutdown(void)
    E_FREE_LIST(handlers, ecore_event_handler_del);
 }
 
-E_API Eina_Bool
-e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_resource *surface_resource)
-{
-   struct wl_client *client;
-   struct wl_resource *res;
-   E_Subsurface *sub;
-   E_Client *offscreen_parent = NULL;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(surface_resource, EINA_FALSE);
-
-   /* try to get the wayland client from the surface resource */
-   if (!(client = wl_resource_get_client(surface_resource)))
-     {
-        ERR("Could not get client from resource %d",
-            wl_resource_get_id(surface_resource));
-        return EINA_FALSE;
-     }
-
-   if (e_object_is_del(E_OBJECT(ec)) || !ec->comp_data) return EINA_FALSE;
-
-   res = wl_resource_create(client, &wl_subsurface_interface, 1, id);
-   if (!res)
-     {
-        ERR("Failed to create subsurface resource");
-        wl_resource_post_no_memory(surface_resource);
-        return EINA_FALSE;
-     }
-
-   if (!epc || e_object_is_del(E_OBJECT(epc)))
-     {
-        ERR("tizen_policy failed: invalid parent");
-        _e_comp_wl_subsurface_invalid_parent_handle(ec, res);
-        return EINA_FALSE;
-     }
-
-   // reparent remote surface provider's subsurfaces
-   if ((epc->comp_data) && (epc->comp_data->remote_surface.onscreen_parent))
-     {
-        offscreen_parent = epc;
-        epc = epc->comp_data->remote_surface.onscreen_parent;
-     }
-
-   // check parent relationship is a cycle
-   if (_e_comp_wl_subsurface_circular_reference_check(ec, epc))
-     {
-        ERR("Subsurface parent relationship is a cycle : [child win : %zx, %s], [parent win : %zx, %s]",
-            e_client_util_win_get(ec), e_client_util_name_get(ec),
-            e_client_util_win_get(epc), e_client_util_name_get(epc));
-        wl_resource_destroy(res);
-        return EINA_FALSE;
-     }
-
-   /* FIXME
-    * Deliberately not checking return value to keep wl_client alive which
-    * has been assigning several role to one wl_surface.
-    * Some client, probably video client, has assigned the role xdg_toplevel
-    * to the wl_surface which already has role wl_subsurface.
-    * For this reason, we cannot post error to the wl_client.
-    * Passing null as 3rd argument 'error_resource' to the function is meant
-    * to not post error to wl_client. */
-   e_comp_wl_surface_role_set(ec, e_comp_wl_subsurface_role_name, NULL, 0);
-
-   sub = E_NEW(E_Subsurface, 1);
-   if (!sub)
-     {
-        ERR("Could not allocate space for E_Subsurface");
-        wl_resource_destroy(res);
-        return EINA_FALSE;
-     }
-
-   sub->base.resource = res;
-   sub->base.cached_buffer_ref.buffer = NULL;
-   sub->base.synchronized = EINA_TRUE;
-
-  /* set resource implementation */
-   wl_resource_set_implementation(res, &_e_subsurface_interface, sub,
-                                  _e_comp_wl_subsurface_cb_resource_destroy);
-
-   _e_comp_wl_subsurface_ec_link(sub, ec);
-   _e_comp_wl_subsurface_parent_link(sub, epc);
-
-   sub->base.remote_surface.offscreen_parent = offscreen_parent;
-   if (offscreen_parent)
-     ELOGF("COMP", "         |offscreen_parent:%p", ec, offscreen_parent);
-
-   e_comp_wl_hook_call(E_COMP_WL_HOOK_SUBSURFACE_CREATE, ec);
-
-   return EINA_TRUE;
-}
-
 EINTERN Eina_Bool
 e_comp_wl_subsurface_add(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface, struct wl_resource *parent_surface)
 {
index 2f87106530b5b8e6ac73ed0a1cc4469708c11d13..685fd14a8fca8e5632f403f5d278b1dc4ca1edd7 100644 (file)
 EINTERN void          e_comp_wl_subsurface_resource_stand_alone_mode_set(struct wl_resource *subsurface_resource);
 EINTERN void          e_comp_wl_subsurface_resource_place_below_parent(struct wl_resource *subsurface_resource);
 
-E_API Eina_Bool       e_comp_wl_subsurface_create(E_Client *ec, E_Client *epc, uint32_t id, struct wl_resource *surface_resource) EINA_DEPRECATED;
-EINTERN Eina_Bool     e_comp_wl_subsurface_add(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface, struct wl_resource *parent_surface);
-
 EINTERN Eina_Bool     e_comp_wl_subsurfaces_init(E_Comp_Wl_Data *wl_comp);
 EINTERN void          e_comp_wl_subsurfaces_shutdown(void);
+
+EINTERN Eina_Bool     e_comp_wl_subsurface_add(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface, struct wl_resource *parent_surface);
 EINTERN void          e_comp_wl_subsurface_parent_commit(E_Client *ec, Eina_Bool parent_synchronized);
 EINTERN Eina_Bool     e_comp_wl_subsurface_order_commit(E_Client *ec);
 EINTERN Eina_Bool     e_comp_wl_subsurface_commit(E_Client *ec);