e_comp_object: add code not to use edje object 31/322831/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 10 Apr 2025 00:25:12 +0000 (09:25 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 16 Apr 2025 08:08:15 +0000 (08:08 +0000)
We are in the process of removing Edje objects.
This patch adds the code that doesn't use the Edje objects cw->effect_obj and cw->shobj in
e_comp_object, as part of the process of removing Edje objects.

FYI, We configures this feature using REMOVE_EDJE_OBJ define.
We don't enable this feature currently because this patch will cause the effect to stop
working.
We will enable this feature after redesigning the code for the effect.

Change-Id: I5627905a0c72f23bcaf0e74770b002aad8b38eb6

src/bin/compmgr/e_comp_object.c
src/bin/compmgr/e_comp_object_intern.h
src/include/e_comp_object.h

index bf6aaca2a8cdfa4944263412cd512497d9ad937d..cdee1e7faff40cf47ac96da8bea2148e6c1f2304 100644 (file)
@@ -749,6 +749,14 @@ _e_comp_object_cb_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj E
 }
 /////////////////////////////////////
 
+#ifdef REMOVE_EDJE_OBJ
+static void
+_e_comp_object_update(E_Comp_Object *cw)
+{
+   evas_object_smart_member_add(cw->obj, cw->smart_obj);
+   evas_object_clip_set(cw->obj, cw->clip);
+}
+#else
 /* function for setting up a client's compositor frame theme (cw->shobj) */
 static Eina_Bool
 _e_comp_object_shadow_setup(E_Comp_Object *cw)
@@ -793,8 +801,19 @@ _e_comp_object_shadow_setup(E_Comp_Object *cw)
 
    return EINA_TRUE;
 }
+#endif
 
 /////////////////////////////////////////////
+#ifdef REMOVE_EDJE_OBJ
+static Eina_Bool _e_comp_object_animating_end(E_Comp_Object *cw);
+
+static void
+_e_comp_object_animating_end_job(void *data)
+{
+   E_Comp_Object *cw = data;
+   _e_comp_object_animating_end(cw);
+}
+#endif
 
 static void
 _e_comp_object_animating_begin(E_Comp_Object *cw)
@@ -808,6 +827,11 @@ _e_comp_object_animating_begin(E_Comp_Object *cw)
         REFD(cw->ec, 2);
         e_object_ref(E_OBJECT(cw->ec));
      }
+
+#ifdef REMOVE_EDJE_OBJ
+   // TODO: This should be changed after applying new effect feature
+   ecore_job_add(_e_comp_object_animating_end_job, cw);
+#endif
 }
 
 static Eina_Bool
@@ -838,6 +862,14 @@ _e_comp_object_animating_end(E_Comp_Object *cw)
                             e_comp_object_signal_emit(cw->ec->frame, "e,action,launch,done", "e");
                          }
                     }
+#ifdef REMOVE_EDJE_OBJ
+                  else if (cw->defer_hide)
+                    {
+                       // This is the code that replaces the _e_comp_object_done_defer function.
+                       ELOGF("COMP", "defer hide after finishing animation", cw->ec);
+                       evas_object_hide(cw->smart_obj);
+                    }
+#endif
                }
              comp->animating--;
              cw->showing = cw->hiding = 0;
@@ -851,6 +883,8 @@ _e_comp_object_animating_end(E_Comp_Object *cw)
    return EINA_TRUE;
 }
 
+#ifdef REMOVE_EDJE_OBJ
+#else
 /* handle the end of a compositor animation */
 static void
 _e_comp_object_done_defer(void *data, Evas_Object *obj EINA_UNUSED, const char *emission, const char *source EINA_UNUSED)
@@ -860,6 +894,7 @@ _e_comp_object_done_defer(void *data, Evas_Object *obj EINA_UNUSED, const char *
    /* visible clients which have never been sized are a bug */
    if ((!cw->ec->new_client) && (!cw->ec->changes.size) && ((cw->w < 0) || (cw->h < 0)) && (!strcmp(emission, "e,action,show,done")))
      CRI("ACK! ec:%p", cw->ec);
+
    if (!_e_comp_object_animating_end(cw)) return;
    if (cw->animating) return;
    /* hide only after animation finishes to guarantee a full run of the animation */
@@ -872,6 +907,7 @@ _e_comp_object_done_defer(void *data, Evas_Object *obj EINA_UNUSED, const char *
         evas_object_hide(cw->smart_obj);
      }
 }
+#endif
 
 /////////////////////////////////////////////
 
@@ -934,6 +970,8 @@ _e_comp_object_color_visible_update(E_Comp_Object *cw)
         return;
      }
 
+#ifdef REMOVE_EDJE_OBJ
+#else
    if (cw->effect_obj)
      {
         evas_object_color_get(cw->effect_obj, NULL, NULL, NULL, &a);
@@ -944,7 +982,6 @@ _e_comp_object_color_visible_update(E_Comp_Object *cw)
           }
      }
 
-
    if (cw->shobj)
      {
         evas_object_color_get(cw->shobj, NULL, NULL, NULL, &a);
@@ -954,6 +991,7 @@ _e_comp_object_color_visible_update(E_Comp_Object *cw)
              return;
           }
      }
+#endif
 
    if (cw->obj)
      {
@@ -968,6 +1006,8 @@ _e_comp_object_color_visible_update(E_Comp_Object *cw)
    _e_comp_object_color_visible_set(cw, EINA_TRUE);
 }
 
+#ifdef REMOVE_EDJE_OBJ
+#else
 static void
 _e_comp_intercept_effect_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
 {
@@ -987,6 +1027,7 @@ _e_comp_intercept_shobj_color_set(void *data, Evas_Object *obj, int r, int g, in
 
    _e_comp_object_color_visible_update(cw);
 }
+#endif
 
 static void
 _e_comp_intercept_obj_color_set(void *data, Evas_Object *obj, int r, int g, int b, int a)
@@ -1001,6 +1042,24 @@ _e_comp_intercept_obj_color_set(void *data, Evas_Object *obj, int r, int g, int
 static void
 _e_comp_object_setup(E_Comp_Object *cw, E_Comp *comp)
 {
+#ifdef REMOVE_EDJE_OBJ
+   if (cw->setup) return;
+
+   cw->clip = evas_object_rectangle_add(comp->evas);
+   evas_object_move(cw->clip, -9999, -9999);
+   evas_object_resize(cw->clip, 999999, 999999);
+   evas_object_smart_member_add(cw->clip, cw->smart_obj);
+
+   /* name objects appropriately for nicer printing */
+   if (cw->ec->override)
+     {
+        evas_object_name_set(cw->clip, "cw->clip::WINDOW");
+     }
+   else if (!cw->ec->input_only)
+     {
+        evas_object_name_set(cw->clip, "cw->clip::CLIENT");
+     }
+#else
    cw->clip = evas_object_rectangle_add(comp->evas);
    evas_object_move(cw->clip, -9999, -9999);
    evas_object_resize(cw->clip, 999999, 999999);
@@ -1030,6 +1089,8 @@ _e_comp_object_setup(E_Comp_Object *cw, E_Comp *comp)
         evas_object_name_set(cw->effect_obj, "cw->effect_obj::CLIENT");
         evas_object_name_set(cw->clip, "cw->clip::CLIENT");
      }
+#endif
+
    cw->real_hid = !cw->ec->input_only;
    if (!cw->ec->input_only)
      {
@@ -1044,6 +1105,8 @@ _e_comp_object_setup(E_Comp_Object *cw, E_Comp *comp)
    evas_object_smart_member_add(cw->default_input_obj, cw->smart_obj);
 
    _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_OBJECT_SETUP, cw->ec);
+
+   cw->setup = EINA_TRUE;
 }
 
 /////////////////////////////////////////////
@@ -1071,6 +1134,8 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
         bx = by = bxx = byy = 0;
         evas_object_image_border_set(cw->obj, bx, bxx, by, byy);
      }
+#ifdef REMOVE_EDJE_OBJ
+#else
    {
       Edje_Message_Int_Set *msg;
       Edje_Message_Int msg2;
@@ -1086,6 +1151,7 @@ _e_comp_object_pixels_get(void *data, Evas_Object *obj EINA_UNUSED)
       msg2.val = id;
       edje_object_message_send(cw->shobj, EDJE_MESSAGE_INT, 0, &msg2);
    }
+#endif
    if (cw->native)
      {
         E_FREE_FUNC(cw->pending_updates, eina_tiler_free);
@@ -1321,7 +1387,11 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
              return;
           }
      }
+#ifdef REMOVE_EDJE_OBJ
+   if (cw->ec->new_client || (!cw->ec->visible) || (!cw->setup))
+#else
    if (cw->ec->new_client || (!cw->ec->visible) || (!cw->effect_obj))
+#endif
      {
         /* do nothing until client idler loops */
         if ((cw->ec->w != w) || (cw->ec->h != h))
@@ -1840,7 +1910,11 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
    if (ec->ignored) return;
 
    comp = e_comp_get();
+#ifdef REMOVE_EDJE_OBJ
+   if (cw->setup)
+#else
    if (cw->effect_obj)
+#endif
      {
         //INF("SHOW2 %p", ec);
         _e_comp_intercept_show_helper(cw, comp);
@@ -1849,10 +1923,14 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
    //INF("SHOW %p", ec);
    if (ec->input_only)
      {
+#ifdef REMOVE_EDJE_OBJ
+#else
         cw->effect_obj = evas_object_rectangle_add(comp->evas);
         evas_object_color_set(cw->effect_obj, 0, 0, 0, 0);
         evas_object_smart_member_add(cw->effect_obj, cw->smart_obj);
         evas_object_name_set(cw->effect_obj, "cw->effect_obj::input_only");
+#endif
+        cw->setup = EINA_TRUE;
      }
    else
      {
@@ -1883,7 +1961,10 @@ _e_comp_intercept_show(void *data, Evas_Object *obj EINA_UNUSED)
      }
 
    _e_comp_object_map_transform_rect(cw->ec, 0, 0, cw->w, cw->h, NULL, NULL, &tw, &th);
+#ifdef REMOVE_EDJE_OBJ
+#else
    evas_object_geometry_set(cw->effect_obj, cw->x, cw->y, tw, th);
+#endif
    if (cw->input_obj)
      {
         input_rect_sd = evas_object_smart_data_get(cw->input_obj);
@@ -2287,7 +2368,12 @@ _e_comp_smart_hide(Evas_Object *obj)
    cw->hiding = 0;
    evas_object_hide(cw->clip);
    if (cw->input_obj) evas_object_hide(cw->input_obj);
+#ifdef REMOVE_EDJE_OBJ
+   if (cw->obj) evas_object_hide(cw->obj);
+#else
    evas_object_hide(cw->effect_obj);
+#endif
+
    if (cw->default_input_obj) evas_object_hide(cw->default_input_obj);
    if (cw->transform_bg_obj) evas_object_hide(cw->transform_bg_obj);
    if (cw->transform_tranp_obj) evas_object_hide(cw->transform_tranp_obj);
@@ -2306,12 +2392,15 @@ _e_comp_smart_hide(Evas_Object *obj)
           _e_comp_object_native_surface_set(cw, NULL, EINA_TRUE);
      }
 
+#ifdef REMOVE_EDJE_OBJ
+#else
    if (!cw->ec->input_only)
      {
         edje_object_freeze(cw->effect_obj);
         edje_object_freeze(cw->shobj);
         edje_object_play_set(cw->shobj, 0);
      }
+#endif
 
    e_comp_render_queue(); //force nocomp recheck
 
@@ -2333,6 +2422,9 @@ _e_comp_smart_show(Evas_Object *obj)
 
    evas_object_show(cw->clip);
    if (cw->input_obj) evas_object_show(cw->input_obj);
+#ifdef REMOVE_EDJE_OBJ
+   if (cw->obj) evas_object_show(cw->obj);
+#else
    if (!cw->ec->input_only)
      {
         edje_object_thaw(cw->effect_obj);
@@ -2340,6 +2432,7 @@ _e_comp_smart_show(Evas_Object *obj)
         edje_object_play_set(cw->shobj, 1);
      }
    evas_object_show(cw->effect_obj);
+#endif
    if (cw->mask.obj) evas_object_show(cw->mask.obj);
    if (cw->transform_bg_obj) evas_object_show(cw->transform_bg_obj);
    if (cw->transform_tranp_obj) evas_object_show(cw->transform_tranp_obj);
@@ -2439,8 +2532,11 @@ _e_comp_smart_del(Evas_Object *obj)
    _e_comp_object_mouse_event_callback_unset(cw);
    evas_object_del(cw->clip);
    evas_object_del(cw->obj);
+#ifdef REMOVE_EDJE_OBJ
+#else
    evas_object_del(cw->shobj);
    evas_object_del(cw->effect_obj);
+#endif
    evas_object_del(cw->input_obj);
    evas_object_del(cw->mask.obj);
    if (cw->dim.mask_obj) evas_object_del(cw->dim.mask_obj);
@@ -2477,7 +2573,11 @@ _e_comp_smart_move(Evas_Object *obj, int x, int y)
    INTERNAL_ENTRY;
 
    cw->x = x, cw->y = y;
+#ifdef REMOVE_EDJE_OBJ
+   evas_object_move(cw->obj, x, y);
+#else
    evas_object_move(cw->effect_obj, x, y);
+#endif
    evas_object_move(cw->default_input_obj, x, y);
    if (cw->input_obj) evas_object_move(cw->input_obj, x, y);
 
@@ -2492,7 +2592,10 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
 
    INTERNAL_ENTRY;
 
+#ifdef REMOVE_EDJE_OBJ
+#else
    if (!cw->effect_obj) CRI("ACK! ec:%p", cw->ec);
+#endif
 
    TRACE_DS_BEGIN(COMP:SMART RESIZE);
 
@@ -2514,7 +2617,11 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
         if ((ww != pw) || (hh != ph))
           ELOGF("COMP", "CW RSZ: %dx%d || PX: %dx%d.", cw->ec, ww, hh, pw, ph);
      }
+#ifdef REMOVE_EDJE_OBJ
+   evas_object_resize(cw->obj, tw, th);
+#else
    evas_object_resize(cw->effect_obj, tw, th);
+#endif
    evas_object_resize(cw->default_input_obj, w, h);
    if (cw->input_obj)
      evas_object_resize(cw->input_obj, w, h);
@@ -2824,7 +2931,13 @@ e_comp_object_frame_theme_set(Evas_Object *obj, const char *name)
    API_ENTRY EINA_FALSE;
 
    if (!e_util_strcmp(name, "COMP_RESHADOW"))
+#ifdef REMOVE_EDJE_OBJ
+     {
+        _e_comp_object_update(cw);
+     }
+#else
      return _e_comp_object_shadow_setup(cw);
+#endif
 
    return EINA_FALSE;
 }
@@ -2832,6 +2945,8 @@ e_comp_object_frame_theme_set(Evas_Object *obj, const char *name)
 E_API void
 e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src)
 {
+#ifdef REMOVE_EDJE_OBJ
+#else
    E_Comp_Object_Mover *prov;
 
    API_ENTRY;
@@ -2845,31 +2960,41 @@ e_comp_object_signal_emit(Evas_Object *obj, const char *sig, const char *src)
         if (!e_util_glob_match(sig, prov->sig)) continue;
         if (prov->func(prov->data, obj, sig)) break;
      }
+#endif
 }
 
 E_API void
 e_comp_object_signal_callback_add(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb, const void *data)
 {
+#ifdef REMOVE_EDJE_OBJ
+#else
    /* FIXME: at some point I guess this should use eo to inherit
     * -EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_ADD
     * -EDJE_OBJ_SUB_ID_SIGNAL_CALLBACK_DEL
     */
    API_ENTRY;
    edje_object_signal_callback_add(cw->shobj, sig, src, cb, (void*)data);
+#endif
 }
 
 E_API void
 e_comp_object_signal_callback_del(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb)
 {
+#ifdef REMOVE_EDJE_OBJ
+#else
    API_ENTRY;
    edje_object_signal_callback_del(cw->shobj, sig, src, cb);
+#endif
 }
 
 E_API void
 e_comp_object_signal_callback_del_full(Evas_Object *obj, const char *sig, const char *src, Edje_Signal_Cb cb, const void *data)
 {
+#ifdef REMOVE_EDJE_OBJ
+#else
    API_ENTRY;
    edje_object_signal_callback_del_full(cw->shobj, sig, src, cb, (void*)data);
+#endif
 }
 
 E_API void
@@ -3470,6 +3595,9 @@ e_comp_object_util_mirror_add(Evas_Object *obj)
 E_API Eina_Bool
 e_comp_object_effect_set(Evas_Object *obj, const char *effect)
 {
+#ifdef REMOVE_EDJE_OBJ
+   return EINA_FALSE;
+#else
    char buf[4096];
    Eina_Stringshare *grp;
    E_Comp_Config *config;
@@ -3529,12 +3657,15 @@ e_comp_object_effect_set(Evas_Object *obj, const char *effect)
    _e_comp_object_dim_update(cw);
 
    return cw->effect_set;
+#endif
 }
 
 /* set params for embryo scripts in effect */
 E_API void
 e_comp_object_effect_params_set(Evas_Object *obj, int id, int *params, unsigned int count)
 {
+#ifdef REMOVE_EDJE_OBJ
+#else
    Edje_Message_Int_Set *msg;
    unsigned int x;
 
@@ -3549,8 +3680,11 @@ e_comp_object_effect_params_set(Evas_Object *obj, int id, int *params, unsigned
       msg->val[x] = params[x];
    edje_object_message_send(cw->effect_obj, EDJE_MESSAGE_INT_SET, id, msg);
    edje_object_message_signal_process(cw->effect_obj);
+#endif
 }
 
+#ifdef REMOVE_EDJE_OBJ
+#else
 static void
 _e_comp_object_effect_end_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
 {
@@ -3577,6 +3711,7 @@ _e_comp_object_effect_end_cb(void *data, Evas_Object *obj, const char *emission,
    _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_EFFECT_END, cw->ec);
    end_cb(end_data, cw->smart_obj, emission, source);
 }
+#endif
 
 /* clip effect to client's zone */
 EINTERN void
@@ -3610,6 +3745,13 @@ e_comp_object_effect_start(Evas_Object *obj, Edje_Signal_Cb end_cb, const void *
    EINA_SAFETY_ON_NULL_RETURN_VAL(cw->ec, EINA_FALSE); //NYI
    if (!cw->effect_set) return EINA_FALSE;
 
+#ifdef REMOVE_EDJE_OBJ
+   e_comp_object_effect_clip(obj);
+   evas_object_data_set(cw->smart_obj, "effect_running", (void*)1);
+
+   _e_comp_object_hook_call(E_COMP_OBJECT_HOOK_EFFECT_START, cw->ec);
+   _e_comp_object_event_simple(obj, E_EVENT_COMP_OBJECT_EFFECT_START);
+#else
    if (cw->effect_running)
      {
         e_comp_object_effect_stop(obj, evas_object_data_get(cw->effect_obj, "_e_comp.end_cb"));
@@ -3627,6 +3769,8 @@ e_comp_object_effect_start(Evas_Object *obj, Edje_Signal_Cb end_cb, const void *
    _e_comp_object_event_simple(obj, E_EVENT_COMP_OBJECT_EFFECT_START);
 
    edje_object_signal_emit(cw->effect_obj, "e,action,go", "e");
+#endif
+
    _e_comp_object_animating_begin(cw);
    cw->effect_running = 1;
    return EINA_TRUE;
@@ -3641,6 +3785,14 @@ e_comp_object_effect_stop(Evas_Object *obj, Edje_Signal_Cb end_cb)
    void *end_data_before = NULL;
    API_ENTRY EINA_FALSE;
 
+#ifdef REMOVE_EDJE_OBJ
+   if (end_cb_before != end_cb) return EINA_TRUE;
+   e_comp_object_effect_unclip(obj);
+   if (cw->effect_clip)
+     {
+        cw->effect_clip = 0;
+     }
+#else
    end_cb_before   = evas_object_data_get(cw->effect_obj, "_e_comp.end_cb");
    end_data_before = evas_object_data_get(cw->effect_obj, "_e_comp.end_data");
 
@@ -3653,6 +3805,7 @@ e_comp_object_effect_stop(Evas_Object *obj, Edje_Signal_Cb end_cb)
      }
    edje_object_signal_emit(cw->effect_obj, "e,action,stop", "e");
    edje_object_signal_callback_del_full(cw->effect_obj, "e,action,done", "e", _e_comp_object_effect_end_cb, cw);
+#endif
 
    if (evas_object_data_get(cw->smart_obj, "effect_running"))
      {
@@ -3708,7 +3861,11 @@ e_comp_object_effect_object_get(Evas_Object *obj)
 {
    API_ENTRY NULL;
 
+#ifdef REMOVE_EDJE_OBJ
+   return NULL;
+#else
    return cw->effect_obj;
+#endif
 }
 
 E_API Eina_Bool
@@ -4034,8 +4191,12 @@ e_comp_object_content_set(Evas_Object *obj,
    evas_object_pass_events_set(cw->obj, EINA_TRUE);
    _e_comp_object_alpha_set(cw);
 
+#ifdef REMOVE_EDJE_OBJ
+   _e_comp_object_update(cw);
+#else
    if (cw->shobj)
      _e_comp_object_shadow_setup(cw);
+#endif
 
    wl_signal_emit(&cw->events.content_type_set, NULL);
 
@@ -4065,11 +4226,14 @@ e_comp_object_content_unset(Evas_Object *obj)
 
    if (cw->obj)
      {
+#ifdef REMOVE_EDJE_OBJ
+#else
         if (cw->shobj)
           edje_object_part_unswallow(cw->shobj, cw->obj);
+#endif
 
-        evas_object_del(cw->obj);
         evas_object_hide(cw->obj);
+        evas_object_del(cw->obj);
         cw->obj = NULL;
      }
 
@@ -4097,8 +4261,12 @@ e_comp_object_content_unset(Evas_Object *obj)
    evas_object_pass_events_set(cw->obj, EINA_TRUE);
    _e_comp_object_alpha_set(cw);
 
+#ifdef REMOVE_EDJE_OBJ
+   _e_comp_object_update(cw);
+#else
    if (cw->shobj)
      _e_comp_object_shadow_setup(cw);
+#endif
 
    if (cw->visible)
      {
@@ -4253,7 +4421,10 @@ _e_comp_object_dim_enable_set(E_Client *ec, Evas_Object *obj, Eina_Bool enable,
 
    if (!ec) return;
    if (!conf->dim_rect_enable) return;
+#ifdef REMOVE_EDJE_OBJ
+#else
    if (!cw->effect_obj) return;
+#endif
    if (enable == cw->dim.enable) return;
 
    ELOGF("COMP", "DIM  |set on Client [%d]", ec, enable);
@@ -4284,7 +4455,10 @@ _e_comp_object_dim_update(E_Comp_Object *cw)
 
    if (!cw) return;
    if (!conf->dim_rect_enable) return;
+#ifdef REMOVE_EDJE_OBJ
+#else
    if (!cw->effect_obj) return;
+#endif
    if (cw->dim.enable)
      {
         ELOGF("COMP", "DIM  |Applied on Client dim.enable[%d]", cw->ec, cw->dim.enable);
@@ -4322,7 +4496,11 @@ E_API Eina_Bool
 e_comp_object_effect_object_part_swallow(Evas_Object *obj, const char *part_name, Evas_Object *swallow_obj)
 {
    API_ENTRY EINA_FALSE;
+#ifdef REMOVE_EDJE_OBJ
+   return EINA_FALSE;
+#else
    return edje_object_part_swallow(cw->effect_obj, part_name, swallow_obj);
+#endif
 }
 
 /* buffer transform and scale are applied to e_comp_object and e_pixmap internaly */
@@ -4354,6 +4532,16 @@ e_comp_object_map_update(Evas_Object *obj)
        (!e_surface_buffer_transform_get(surface) &&
         e_surface_buffer_scale_get(surface) == 1))
      {
+#ifdef REMOVE_EDJE_OBJ
+        if (evas_object_map_enable_get(cw->obj))
+          {
+             ELOGF("TRANSFORM", "map: disable", cw->ec);
+             evas_object_map_enable_set(cw->obj, EINA_FALSE);
+             _e_comp_object_map_transform_rect(cw->ec, 0, 0, cw->w, cw->h, NULL, NULL, &tw, &th);
+             evas_object_resize(cw->obj, tw, th);
+          }
+
+#else
         if (evas_object_map_enable_get(cw->effect_obj))
           {
              ELOGF("TRANSFORM", "map: disable", cw->ec);
@@ -4361,6 +4549,7 @@ e_comp_object_map_update(Evas_Object *obj)
              _e_comp_object_map_transform_rect(cw->ec, 0, 0, cw->w, cw->h, NULL, NULL, &tw, &th);
              evas_object_resize(cw->effect_obj, tw, th);
           }
+#endif
 
         return;
      }
@@ -4400,8 +4589,13 @@ e_comp_object_map_update(Evas_Object *obj)
          cw->ec,
          ec->x, ec->y, bw, bh, x1, y1, x2, y1, x2, y2, x1, y2, buffer);
 
+#ifdef REMOVE_EDJE_OBJ
+   e_comp_object_map_set(cw->obj, map);
+   e_comp_object_map_enable_set(cw->obj, EINA_TRUE);
+#else
    e_comp_object_map_set(cw->effect_obj, map);
    e_comp_object_map_enable_set(cw->effect_obj, EINA_TRUE);
+#endif
 
    e_map_free(map);
 
@@ -4409,7 +4603,11 @@ e_comp_object_map_update(Evas_Object *obj)
     * ec->obj should rotate. if not, in evas_map, update region is clipped.
     */
    _e_comp_object_map_transform_rect(cw->ec, 0, 0, bw, bh, NULL, NULL, &tw, &th);
+#ifdef REMOVE_EDJE_OBJ
+   evas_object_resize(cw->obj, tw, th);
+#else
    evas_object_resize(cw->effect_obj, tw, th);
+#endif
 }
 
 EINTERN Eina_Bool
index a51950458770bea7e87cb804525e3a314bfa8a00..9d64be2edbdab73f267b30bbb9023437731b5d30 100644 (file)
@@ -12,6 +12,7 @@ struct _E_Comp_Object
 {
    EINA_INLIST;
 
+   Eina_Bool setup;
    int                  x, y, w, h;  // geometry
 
    E_Client *ec;
@@ -22,8 +23,11 @@ struct _E_Comp_Object
    Evas_Object         *clip; // clipper over effect object
    Evas_Object         *input_obj; // input smart object
    Evas_Object         *obj;  // composite object
+#ifdef REMOVE_EDJE_OBJ
+#else
    Evas_Object         *shobj;  // shadow object
    Evas_Object         *effect_obj; // effects object
+#endif
    Evas_Object         *transform_bg_obj;   // transform backgroung with keep_ratio option
    struct
      {
index 97c31ae31a8889406a2163836b97de8eea276d23..6c276d19b618934216412e0a9767fb0935abb46e 100644 (file)
@@ -12,6 +12,9 @@
 
 #define E_COMP_OBJECT_FRAME_RESHADOW "COMP_RESHADOW"
 
+// For removing edje_object
+//#define REMOVE_EDJE_OBJ
+
 typedef struct E_Event_Comp_Object E_Event_Comp_Object;
 typedef struct E_Comp_Object_Mover E_Comp_Object_Mover;