src/bin/e_tbm_gbm_server.c \
src/bin/e_comp_input.c \
src/bin/e_linux_dmabuf.c \
-src/bin/e_input_thread_client.c
+src/bin/e_input_thread_client.c \
+src/bin/e_alpha_mask_rect.c
src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=2 @WAYLAND_CFLAGS@ $(TTRACE_CFLAGS) $(DLOG_CFLAGS) $(PIXMAN_CFLAGS) $(POLICY_CFLAGS) $(EGL_CFLAGS)
if HAVE_LIBGOMP
--- /dev/null
+#include <wayland-server.h>
+#include <Evas.h>
+
+#include "e_alpha_mask_rect_intern.h"
+#include "e_client_intern.h"
+#include "e_comp_wl_subsurface_intern.h"
+#include "e_comp_object_intern.h"
+#include "e_map_intern.h"
+
+struct _E_Alpha_Mask_Rect
+{
+ Evas_Object *eo;
+ E_Map *map;
+ E_Client *ec;
+ E_Comp_Wl_Hook *subsurface_create_hook;
+
+ struct wl_listener destroy;
+ struct wl_listener transform_change;
+};
+
+static void _e_alpha_mask_rect_destroy(E_Alpha_Mask_Rect *rect);
+
+static void
+_e_alpha_mask_rect_cb_client_destroy(struct wl_listener *listener, void *data)
+{
+ E_Alpha_Mask_Rect *rect = wl_container_of(listener, rect, destroy);
+ _e_alpha_mask_rect_destroy(rect);
+}
+
+static void
+_e_alpha_mask_rect_map_apply(E_Alpha_Mask_Rect *rect)
+{
+ E_Map *map = NULL, *new_map = NULL;
+ Eina_Bool enable;
+ int w, h;
+
+ e_map_util_points_populate_from_object_full(rect->map, rect->ec->frame, 0);
+
+ evas_object_geometry_get(rect->eo, NULL, NULL, &w, &h);
+ e_map_point_image_uv_set(rect->map, 0, 0, 0);
+ e_map_point_image_uv_set(rect->map, 1, w, 0);
+ e_map_point_image_uv_set(rect->map, 2, w, h);
+ e_map_point_image_uv_set(rect->map, 3, 0, h);
+
+ enable = e_client_transform_core_enable_get(rect->ec);
+ if (enable)
+ map = e_comp_object_map_get(rect->ec->frame);
+
+ if ((enable) && (map))
+ {
+ new_map = e_map_dup(map);
+ if (!new_map)
+ {
+ ERR("fail to dup e_map ec:%p", rect->ec);
+ e_map_free(map);
+ return;
+ }
+
+ e_map_point_image_uv_set(new_map, 0, 0, 0);
+ e_map_point_image_uv_set(new_map, 1, w, 0);
+ e_map_point_image_uv_set(new_map, 2, w, h);
+ e_map_point_image_uv_set(new_map, 3, 0, h);
+
+ e_comp_object_map_set(rect->eo, new_map);
+ e_comp_object_map_enable_set(rect->eo, EINA_TRUE);
+ e_map_free(new_map);
+ }
+ else
+ {
+ e_comp_object_map_set(rect->eo, rect->map);
+ e_comp_object_map_enable_set(rect->eo, EINA_TRUE);
+ }
+
+ if (map) e_map_free(map);
+}
+
+static void
+_e_alpha_mask_rect_cb_frame_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event EINA_UNUSED)
+{
+ E_Alpha_Mask_Rect *rect = data;
+
+ evas_object_show(rect->eo);
+}
+
+static void
+_e_alpha_mask_rect_cb_frame_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event EINA_UNUSED)
+{
+ E_Alpha_Mask_Rect *rect = data;
+
+ evas_object_hide(rect->eo);
+}
+
+static void
+_e_alpha_mask_rect_cb_frame_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event EINA_UNUSED)
+{
+ E_Alpha_Mask_Rect *rect = data;
+
+ evas_object_move(rect->eo, rect->ec->x, rect->ec->y);
+ _e_alpha_mask_rect_map_apply(rect);
+}
+
+static void
+_e_alpha_mask_rect_cb_frame_resize(void *data, Evas *evas EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void *event EINA_UNUSED)
+{
+ E_Alpha_Mask_Rect *rect = data;
+
+ _e_alpha_mask_rect_map_apply(rect);
+}
+
+static void
+_e_alpha_mask_rect_cb_client_resize(void *data, Evas_Object *eo EINA_UNUSED, void *event EINA_UNUSED)
+{
+ E_Alpha_Mask_Rect *rect = data;
+
+ _e_alpha_mask_rect_map_apply(rect);
+}
+
+static void
+_e_alpha_mask_rect_cb_transform_change(struct wl_listener *listener, void *data)
+{
+ E_Alpha_Mask_Rect *rect = wl_container_of(listener, rect, transform_change);
+
+ _e_alpha_mask_rect_map_apply(rect);
+}
+
+static void
+_e_alpha_mask_rect_cb_subsurface_create(void *data, E_Client *ec)
+{
+ E_Alpha_Mask_Rect *rect = data;
+
+ if (rect->ec != ec)
+ return;
+
+ _e_alpha_mask_rect_destroy(rect);
+}
+
+static E_Alpha_Mask_Rect *
+_e_alpha_mask_rect_try_from_ec(E_Client *ec)
+{
+ E_Alpha_Mask_Rect *rect;
+ struct wl_listener *listener;
+
+ listener = e_client_destroy_listener_get(ec, _e_alpha_mask_rect_cb_client_destroy);
+ if (!listener)
+ return NULL;
+
+ return wl_container_of(listener, rect, destroy);
+}
+
+static void
+_e_alpha_mask_rect_destroy(E_Alpha_Mask_Rect *rect)
+{
+ ELOGF("ALPHA_MASK", "Destroy E_Alpha_Mask_Rect(%p)", rect->ec, rect);
+
+ e_comp_wl_hook_del(rect->subsurface_create_hook);
+ evas_object_smart_callback_del(rect->ec->frame, "client_resize", _e_alpha_mask_rect_cb_client_resize);
+ evas_object_event_callback_del(rect->ec->frame, EVAS_CALLBACK_SHOW, _e_alpha_mask_rect_cb_frame_show);
+ evas_object_event_callback_del(rect->ec->frame, EVAS_CALLBACK_HIDE, _e_alpha_mask_rect_cb_frame_hide);
+ evas_object_event_callback_del(rect->ec->frame, EVAS_CALLBACK_MOVE, _e_alpha_mask_rect_cb_frame_move);
+ evas_object_event_callback_del(rect->ec->frame, EVAS_CALLBACK_RESIZE, _e_alpha_mask_rect_cb_frame_resize);
+ evas_object_del(rect->eo);
+ e_map_free(rect->map);
+ wl_list_remove(&rect->transform_change.link);
+ wl_list_remove(&rect->destroy.link);
+ free(rect);
+}
+
+EINTERN E_Alpha_Mask_Rect *
+e_alpha_mask_rect_create(E_Client *ec)
+{
+ E_Alpha_Mask_Rect *rect;
+ short layer;
+
+ rect = E_NEW(E_Alpha_Mask_Rect, 1);
+ if (!rect)
+ return NULL;
+
+ rect->eo = evas_object_rectangle_add(e_comp->evas);
+ if (!rect->eo)
+ {
+ free(rect);
+ return NULL;
+ }
+
+ rect->map = e_map_new();
+ if (!rect->map)
+ {
+ ERR("Failed to new e_map ec:%p", ec);
+ evas_object_del(rect->eo);
+ free(rect);
+ return NULL;
+ }
+
+ /* This object doesn't care about mouse event. And It's also
+ * to avoid events of mouse on the E_Client. */
+ evas_object_pass_events_set(rect->eo, EINA_TRUE);
+
+ layer = evas_object_layer_get(ec->frame);
+ evas_object_layer_set(rect->eo, layer);
+ evas_object_render_op_set(rect->eo, EVAS_RENDER_COPY);
+
+ /* It's more reasonable to use the transparent color instead of black because
+ * we can show the alpha value of the 24 depth topmost window.
+ */
+ evas_object_color_set(rect->eo, 0x00, 0x00, 0x00, 0x00);
+ evas_object_move(rect->eo, ec->x, ec->y);
+ evas_object_resize(rect->eo, 1, 1);
+ evas_object_name_set(rect->eo, "below_bg_rectangle");
+
+ rect->ec = ec;
+
+ rect->destroy.notify = _e_alpha_mask_rect_cb_client_destroy;
+ e_client_destroy_listener_add(ec, &rect->destroy);
+
+ rect->transform_change.notify = _e_alpha_mask_rect_cb_transform_change;
+ e_client_transform_change_listener_add(ec, &rect->transform_change);
+
+ _e_alpha_mask_rect_map_apply(rect);
+
+ if (evas_object_visible_get(ec->frame))
+ evas_object_show(rect->eo);
+
+ evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_SHOW, _e_alpha_mask_rect_cb_frame_show, rect);
+ evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_HIDE, _e_alpha_mask_rect_cb_frame_hide, rect);
+ evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_MOVE, _e_alpha_mask_rect_cb_frame_move, rect);
+ evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE, _e_alpha_mask_rect_cb_frame_resize, rect);
+ evas_object_smart_callback_add(ec->frame, "client_resize", _e_alpha_mask_rect_cb_client_resize, rect);
+
+ rect->subsurface_create_hook = e_comp_wl_hook_add(E_COMP_WL_HOOK_SUBSURFACE_CREATE, _e_alpha_mask_rect_cb_subsurface_create, rect);
+
+ /* set alpha only if SW path */
+ e_comp_object_alpha_set(ec->frame, EINA_TRUE);
+
+ /* force update for changing alpha value. if the native surface has been already
+ * set before, changing alpha value can't be applied to egl image.
+ */
+ e_comp_object_native_surface_set(ec->frame, EINA_FALSE);
+ e_pixmap_image_refresh(ec->pixmap);
+ e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
+ e_comp_object_dirty(ec->frame);
+ e_comp_object_render(ec->frame);
+
+ e_comp_wl_subsurface_restack(ec);
+ e_alpha_mask_rect_restack(rect);
+
+ /* 'below_obj' has to be transformed according to ec's transformation.
+ * that's the reason invoking 'transform_core_update()' here. */
+ e_client_transform_core_update(ec);
+
+ ELOGF("ALPHA_MASK", "Created E_Alpha_Mask_Rect(%p)", ec, rect);
+
+ return rect;
+}
+
+EINTERN void
+e_alpha_mask_rect_destroy(E_Alpha_Mask_Rect *rect)
+{
+ EINA_SAFETY_ON_NULL_RETURN(rect);
+
+ _e_alpha_mask_rect_destroy(rect);
+}
+
+EINTERN E_Alpha_Mask_Rect *
+e_alpha_mask_rect_try_from_ec(E_Client *ec)
+{
+ E_Alpha_Mask_Rect *rect;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
+
+ rect = _e_alpha_mask_rect_try_from_ec(ec);
+
+ return rect;
+}
+
+EINTERN void
+e_alpha_mask_rect_restack(E_Alpha_Mask_Rect *rect)
+{
+ E_Client *bottom = rect->ec;
+
+ while (bottom)
+ {
+ short layer = evas_object_layer_get(bottom->frame);
+
+ if (evas_object_layer_get(rect->eo) != layer)
+ evas_object_layer_set(rect->eo, layer);
+
+ evas_object_stack_below(rect->eo, bottom->frame);
+ bottom = eina_list_nth(bottom->comp_data->sub.below_list, 0);
+ }
+}
+
+EINTERN Evas_Object *
+e_alpha_mask_rect_evas_object_get(E_Alpha_Mask_Rect *rect)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(rect, NULL);
+ return rect->eo;
+}
--- /dev/null
+#ifndef E_ALPHA_MASK_RECT_INTERN_H
+#define E_ALPHA_MASK_RECT_INTERN_H
+
+#include <Evas.h>
+#include "e_client.h"
+
+struct _E_Alpha_Mask_Rect;
+typedef struct _E_Alpha_Mask_Rect E_Alpha_Mask_Rect;
+
+E_Alpha_Mask_Rect *e_alpha_mask_rect_create(E_Client *ec);
+void e_alpha_mask_rect_destroy(E_Alpha_Mask_Rect *rect);
+E_Alpha_Mask_Rect *e_alpha_mask_rect_try_from_ec(E_Client *ec);
+Evas_Object *e_alpha_mask_rect_evas_object_get(E_Alpha_Mask_Rect *rect);
+void e_alpha_mask_rect_restack(E_Alpha_Mask_Rect *rect);
+
+#endif
topmost = e_comp_wl_topmost_parent_get(ec);
if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
e_comp_wl_subsurface_show(ec);
-
- if (ec->comp_data->sub.below_obj)
- evas_object_show(ec->comp_data->sub.below_obj);
}
static void
if (topmost == ec && (ec->comp_data->sub.list || ec->comp_data->sub.below_list))
e_comp_wl_subsurface_hide(ec);
- if (ec->comp_data->sub.below_obj)
- evas_object_hide(ec->comp_data->sub.below_obj);
-
wl_signal_emit(&e_comp_wl->ptr_constraints.surface_unmap_signal, ec);
}
if (cdata->viewport_transform)
e_comp_wl_map_apply(subc);
}
-
- if (ec->comp_data->sub.below_obj)
- {
- evas_object_move(ec->comp_data->sub.below_obj, ec->x, ec->y);
- e_comp_wl_subsurface_bg_rectangle_map_apply(ec);
- }
}
static void
e_client_hide(ec);
}
-
- if ((cdata->sub.below_obj) &&
- (evas_object_visible_get(cdata->sub.below_obj)))
- {
- evas_object_hide(cdata->sub.below_obj);
- }
}
else
{
/* map ec */
e_client_show(ec);
-
- if ((cdata->sub.below_obj) &&
- (!evas_object_visible_get(cdata->sub.below_obj)) &&
- (evas_object_visible_get(ec->frame)))
- {
- evas_object_show(cdata->sub.below_obj);
- }
}
if ((state->new_attach) ||
eina_tiler_clear(state->input);
}
- e_comp_wl_subsurface_check_below_bg_rectangle(ec);
+ e_comp_wl_subsurface_check_alpha_mask_rect(ec);
if ((cdata->video_client) &&
((buffer) &&
ec->new_client = ec->netwm.ping = EINA_TRUE;
e_comp->new_clients++;
e_client_unignore(ec);
-
- /* Delete 'below_obj' if it was created before 'E_Client' becomes subsurface.
- * It's not for subsurface. */
- E_FREE_FUNC(ec->comp_data->sub.below_obj, evas_object_del);
}
static void
#include "e_client_video_intern.h"
#include "e_client_intern.h"
#include "e_comp_object_intern.h"
+#include "e_alpha_mask_rect_intern.h"
#include <tizen-extension-server-protocol.h>
static void _e_comp_wl_subsurface_commit_to_cache(E_Client *ec);
static void _e_comp_wl_subsurface_commit_from_cache(E_Client *ec);
static void _e_comp_wl_subsurface_stack_update(E_Client *ec);
-static void _e_comp_wl_subsurface_below_obj_destroy(E_Client *ec);
EINTERN void
e_comp_wl_client_subsurface_commit_to_cache(E_Client *ec)
}
static void
-_e_comp_wl_subsurface_restack_bg_rectangle(E_Client *ec)
-{
- E_Client *bottom = ec;
-
- if (!ec || !ec->comp_data || e_object_is_del(E_OBJECT(ec)))
- return;
-
- if (!ec->comp_data->sub.below_obj)
- return;
-
- while (bottom)
- {
- short layer = evas_object_layer_get(bottom->frame);
-
- if (evas_object_layer_get(ec->comp_data->sub.below_obj) != layer)
- evas_object_layer_set(ec->comp_data->sub.below_obj, layer);
-
- evas_object_stack_below(ec->comp_data->sub.below_obj, bottom->frame);
- bottom = eina_list_nth(bottom->comp_data->sub.below_list, 0);
- }
-}
-
-static void
_e_comp_wl_subsurface_restack(E_Client *ec)
{
E_Client *subc, *temp;
_e_comp_wl_subsurface_restack(subc);
}
-EINTERN void
-e_comp_wl_subsurface_bg_rectangle_map_apply(E_Client *ec)
-{
- E_Map *map = NULL, *new_map = NULL;
- Eina_Bool enable;
- int w, h;
-
- if (e_object_is_del(E_OBJECT(ec))) return;
- if (!ec->comp_data) return;
- if (!ec->comp_data->sub.below_obj) return;
- if (!ec->comp_data->sub.below_obj_map) return;
-
- e_map_util_points_populate_from_object_full(ec->comp_data->sub.below_obj_map, ec->frame, 0);
-
- evas_object_geometry_get(ec->comp_data->sub.below_obj, NULL, NULL, &w, &h);
- e_map_point_image_uv_set(ec->comp_data->sub.below_obj_map, 0, 0, 0);
- e_map_point_image_uv_set(ec->comp_data->sub.below_obj_map, 1, w, 0);
- e_map_point_image_uv_set(ec->comp_data->sub.below_obj_map, 2, w, h);
- e_map_point_image_uv_set(ec->comp_data->sub.below_obj_map, 3, 0, h);
-
- enable = e_client_transform_core_enable_get(ec);
- if (enable)
- map = e_comp_object_map_get(ec->frame);
-
- if ((enable) && (map))
- {
- new_map = e_map_dup(map);
- if (!new_map)
- {
- ERR("fail to dup e_map ec:%p", ec);
- e_map_free(map);
- return;
- }
-
- e_map_point_image_uv_set(new_map, 0, 0, 0);
- e_map_point_image_uv_set(new_map, 1, w, 0);
- e_map_point_image_uv_set(new_map, 2, w, h);
- e_map_point_image_uv_set(new_map, 3, 0, h);
-
- e_comp_object_map_set(ec->comp_data->sub.below_obj, new_map);
- e_comp_object_map_enable_set(ec->comp_data->sub.below_obj, EINA_TRUE);
- e_map_free(new_map);
- }
- else
- {
- e_comp_object_map_set(ec->comp_data->sub.below_obj, ec->comp_data->sub.below_obj_map);
- e_comp_object_map_enable_set(ec->comp_data->sub.below_obj, EINA_TRUE);
- }
-
- if (map) e_map_free(map);
-}
-
-static void
-_e_comp_wl_subsurface_bg_evas_cb_resize(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
-{
- E_Client *ec;
-
- if (!(ec = data)) return;
-
- e_comp_wl_subsurface_bg_rectangle_map_apply(ec);
-}
-
-static void
-_e_comp_wl_subsurface_bg_cb_hook_transform_change(void *data, E_Client *ec)
-{
- e_comp_wl_subsurface_bg_rectangle_map_apply(ec);
-}
-
-static void
-_e_comp_wl_subsurface_bg_cb_hook_del(void *data, E_Client *ec)
-{
- if (!ec) return;
-
- if (ec->comp_data)
- {
- if (ec->comp_data->sub.below_obj)
- {
- ELOGF("COMP", "below_obj becomes useless by destroyed ec. argb(%d)", ec, ec->argb);
- _e_comp_wl_subsurface_below_obj_destroy(ec);
- }
- }
-}
-
static Eina_Bool
_e_comp_wl_subsurface_video_has(E_Client *ec)
{
}
static void
-_e_comp_wl_subsurface_below_obj_create(E_Client *ec)
-{
- Evas_Object *below_obj;
- E_Map *below_obj_map;
- short layer;
-
- /* create a bg rectangle if topmost window is 24 depth window */
- below_obj = evas_object_rectangle_add(e_comp->evas);
- EINA_SAFETY_ON_NULL_RETURN(below_obj);
-
- below_obj_map = e_map_new();
- if (!below_obj_map)
- {
- ERR("Failed to new e_map ec:%p", ec);
- evas_object_del(below_obj);
- return;
- }
-
- /* This object doesn't care about mouse event. And It's also
- * to avoid events of mouse on the E_Client. */
- evas_object_pass_events_set(below_obj, EINA_TRUE);
-
- layer = evas_object_layer_get(ec->frame);
- evas_object_layer_set(below_obj, layer);
- evas_object_render_op_set(below_obj, EVAS_RENDER_COPY);
-
- /* It's more reasonable to use the transparent color instead of black because
- * we can show the alpha value of the 24 depth topmost window.
- */
- evas_object_color_set(below_obj, 0x00, 0x00, 0x00, 0x00);
- evas_object_move(below_obj, ec->x, ec->y);
- evas_object_resize(below_obj, 1, 1);
- evas_object_name_set(below_obj, "below_bg_rectangle");
-
- ec->comp_data->sub.below_obj = below_obj;
-
- ec->comp_data->sub.below_obj_map = below_obj_map;
- ec->comp_data->sub.below_obj_map_transform_hook =
- e_client_hook_add(E_CLIENT_HOOK_TRANSFORM_CHANGE,
- _e_comp_wl_subsurface_bg_cb_hook_transform_change,
- ec);
- ec->comp_data->sub.comp_wl_del_hook =
- e_comp_wl_hook_add(E_COMP_WL_HOOK_DEL,
- _e_comp_wl_subsurface_bg_cb_hook_del,
- ec);
-
- e_comp_wl_subsurface_bg_rectangle_map_apply(ec);
-
- if (evas_object_visible_get(ec->frame))
- evas_object_show(below_obj);
-
- ELOGF("COMP", " |bg_rectangle(%p) created", ec, below_obj);
-
- evas_object_event_callback_add(ec->frame, EVAS_CALLBACK_RESIZE,
- _e_comp_wl_subsurface_bg_evas_cb_resize, ec);
-
- /* set alpha only if SW path */
- e_comp_object_alpha_set(ec->frame, EINA_TRUE);
-
- /* force update for changing alpha value. if the native surface has been already
- * set before, changing alpha value can't be applied to egl image.
- */
- e_comp_object_native_surface_set(ec->frame, EINA_FALSE);
- e_pixmap_image_refresh(ec->pixmap);
- e_comp_object_damage(ec->frame, 0, 0, ec->w, ec->h);
- e_comp_object_dirty(ec->frame);
- e_comp_object_render(ec->frame);
-
- _e_comp_wl_subsurface_restack(ec);
- _e_comp_wl_subsurface_restack_bg_rectangle(ec);
-
- /* 'below_obj' has to be transformed according to ec's transformation.
- * that's the reason invoking 'transform_core_update()' here. */
- e_client_transform_core_update(ec);
-}
-
-static void
-_e_comp_wl_subsurface_below_obj_destroy(E_Client *ec)
-{
- if (!ec->comp_data) return;
-
- ELOGF("COMP", " |bg_rectangle(%p) delete", ec, ec->comp_data->sub.below_obj);
-
- E_FREE_FUNC(ec->comp_data->sub.below_obj, evas_object_del);
-
- if (ec->comp_data->sub.below_obj_map)
- {
- e_map_free(ec->comp_data->sub.below_obj_map);
- ec->comp_data->sub.below_obj_map = NULL;
- }
- E_FREE_FUNC(ec->comp_data->sub.below_obj_map_transform_hook, e_client_hook_del);
- E_FREE_FUNC(ec->comp_data->sub.comp_wl_del_hook, e_comp_wl_hook_del);
-}
-
-static void
-_e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
+_e_comp_wl_subsurface_check_alpha_mask_rect(E_Client *ec)
{
E_Client *topmost;
+ E_Alpha_Mask_Rect *rect;
topmost = e_comp_wl_topmost_parent_get(ec);
if (!topmost)
if (_e_comp_wl_subsurface_data_get(topmost))
return;
- if (topmost->comp_data->sub.below_obj)
+ rect = e_alpha_mask_rect_try_from_ec(topmost);
+ if (rect)
{
if ((topmost->argb) ||
((!topmost->comp_data->sub.below_list) &&
{
ELOGF("COMP", "below_obj becomes useless. argb(%d)",
topmost, topmost->argb);
- _e_comp_wl_subsurface_below_obj_destroy(topmost);
+ e_alpha_mask_rect_destroy(rect);
}
}
else
(_e_comp_wl_subsurface_video_has(topmost))))
{
ELOGF("COMP", "it has below subsurfaces and video.", topmost);
- _e_comp_wl_subsurface_below_obj_create(topmost);
+ e_alpha_mask_rect_create(topmost);
}
}
}
_e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
{
E_Comp_Wl_Subsurf_Data *sdata;
+ E_Alpha_Mask_Rect *rect;
sdata = _e_comp_wl_subsurface_data_get(ec);
EINA_SAFETY_ON_NULL_RETURN(sdata);
{
E_Client *topmost = e_comp_wl_topmost_parent_get(ec);
_e_comp_wl_subsurface_restack(topmost);
- _e_comp_wl_subsurface_restack_bg_rectangle(topmost);
+
+ rect = e_alpha_mask_rect_try_from_ec(topmost);
+ if (rect)
+ e_alpha_mask_rect_restack(rect);
}
sdata->cached.has_data = EINA_FALSE;
EINTERN void
e_comp_wl_subsurface_restack_bg_rectangle(E_Client *ec)
{
+ E_Alpha_Mask_Rect *rect;
+
EINA_SAFETY_ON_NULL_RETURN(ec);
- _e_comp_wl_subsurface_restack_bg_rectangle(ec);
+ rect = e_alpha_mask_rect_try_from_ec(ec);
+ if (rect)
+ e_alpha_mask_rect_restack(rect);
}
EINTERN void
}
EINTERN void
-e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec)
+e_comp_wl_subsurface_check_alpha_mask_rect(E_Client *ec)
{
EINA_SAFETY_ON_NULL_RETURN(ec);
if ((e_object_is_del(E_OBJECT(ec))) || (!ec->comp_data))
return;
- _e_comp_wl_subsurface_check_below_bg_rectangle(ec);
+ _e_comp_wl_subsurface_check_alpha_mask_rect(ec);
}
EINTERN Eina_Bool
_e_comp_wl_subsurface_stack_update(E_Client *ec)
{
E_Client *topmost;
+ E_Alpha_Mask_Rect *rect;
if (!ec->comp_data) return;
if (e_object_is_del(E_OBJECT(ec))) return;
/* return if ec isn't both a parent of a subsurface and a subsurface itself */
if (!ec->comp_data->sub.list && !ec->comp_data->sub.below_list && !ec->comp_data->sub.data)
{
- if (ec->comp_data->sub.below_obj)
- _e_comp_wl_subsurface_restack_bg_rectangle(ec);
+ rect = e_alpha_mask_rect_try_from_ec(ec);
+ if (rect)
+ e_alpha_mask_rect_restack(rect);
return;
}
topmost = e_comp_wl_topmost_parent_get(ec);
_e_comp_wl_subsurface_restack(topmost);
- _e_comp_wl_subsurface_restack_bg_rectangle(topmost);
+
+ rect = e_alpha_mask_rect_try_from_ec(topmost);
+ if (rect)
+ e_alpha_mask_rect_restack(rect);
e_client_subsurface_stack_update(ec);
}
EINTERN void e_comp_wl_subsurface_restack(E_Client *ec);
EINTERN Eina_Bool e_comp_wl_video_subsurface_has(E_Client *ec);
EINTERN Eina_Bool e_comp_wl_normal_subsurface_has(E_Client *ec);
-EINTERN void e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec);
+EINTERN void e_comp_wl_subsurface_check_alpha_mask_rect(E_Client *ec);
EINTERN Eina_Bool e_comp_wl_subsurface_check(E_Client *ec);
EINTERN E_Client *e_comp_wl_subsurface_parent_get(E_Client *ec);
EINTERN Eina_Bool e_comp_wl_subsurface_stand_alone_mode_get(E_Client *ec);
EINTERN Eina_Bool e_comp_wl_subsurface_position_get(E_Client *ec, int *x, int *y);
EINTERN Eina_Bool e_comp_wl_subsurface_global_coord_get(E_Client *ec, int *x, int *y);
-EINTERN void e_comp_wl_subsurface_bg_rectangle_map_apply(E_Client *ec);
#endif
_e_desk_area_configure_send(ec, 1, 1);
}
}
-
- if (ec->comp_data->sub.below_obj)
- e_comp_wl_subsurface_bg_rectangle_map_apply(ec);
}
static void
#include "e_dbus_conn_intern.h"
#include "e_hints_intern.h"
#include "e_comp_input_intern.h"
+#include "e_alpha_mask_rect_intern.h"
#include <tbm_bufmgr.h>
#include <tbm_surface.h>
unsigned int buf_id = 0;
int x = 0, y = 0, w = 0, h = 0;
unsigned int transform = 0, visible = 0, alpha = 0, ignore = 0, maskobj = 0, video = 0, stand = 0;
- Ecore_Window bgrect = 0;
+ E_Alpha_Mask_Rect *mask_rect;
+ Ecore_Window mask_rect_object = 0;
const char *name = NULL;
E_Comp_Wl_Buffer *buffer;
E_Map *map;
visible = evas_object_visible_get(o);
alpha = e_comp_object_alpha_get(ec->frame);
ignore = e_client_util_ignored_get(ec);
- if (ec->comp_data->sub.below_obj)
- bgrect = (Ecore_Window)ec->comp_data->sub.below_obj;
+ mask_rect = e_alpha_mask_rect_try_from_ec(ec);
+ if (mask_rect)
+ mask_rect_object = (Ecore_Window)e_alpha_mask_rect_evas_object_get(mask_rect);
maskobj = e_comp_object_mask_has(ec->frame);
video = (ec->comp_data->video_client || e_client_video_hw_composition_check(ec)) ? 1 : 0;
name = e_client_util_name_get(ec);
eldbus_message_iter_arguments_append
(struct_of_ec, SIGNATURE_SUBSURFACE,
- win, parent, buf_id, x, y, w, h, transform, visible, alpha, ignore, maskobj, video, stand, bgrect, name);
+ win, parent, buf_id, x, y, w, h, transform, visible, alpha, ignore, maskobj, video, stand, mask_rect_object, name);
eldbus_message_iter_container_close(array_of_ec, struct_of_ec);
}
Eina_List *below_list;
Eina_List *below_list_pending;
- Evas_Object *below_obj;
- E_Map *below_obj_map;
- E_Client_Hook *below_obj_map_transform_hook;
- E_Comp_Wl_Hook *comp_wl_del_hook;
+ EINA_DEPRECATED Evas_Object *below_obj;
+ EINA_DEPRECATED E_Map *below_obj_map;
+ EINA_DEPRECATED E_Client_Hook *below_obj_map_transform_hook;
+ EINA_DEPRECATED E_Comp_Wl_Hook *comp_wl_del_hook;
Eina_Bool restacking : 1;
} sub;