return;
}
- if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_NEW_CLIENT, ec)) return;
+ TRACE_DS_BEGIN(CLIENT:EVAL);
+
+ if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_NEW_CLIENT, ec))
+ {
+ TRACE_DS_END();
+ return;
+ }
if ((ec->new_client) && (!e_client_util_ignored_get(ec)) && (ec->zone))
{
}
}
- if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_NEW_CLIENT, ec)) return;
+ if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_POST_NEW_CLIENT, ec))
+ {
+ TRACE_DS_END();
+ return;
+ }
/* effect changes to the window border itself */
if ((ec->changes.shading))
#endif
_e_client_hook_call(E_CLIENT_HOOK_EVAL_END, ec);
+
+ TRACE_DS_END();
}
static void
if (!zone) return;
+ TRACE_DS_BEGIN(CLIENT:VISIBILITY CALCULATE);
+
t = eina_tiler_new(zone->w + edge, zone->h + edge);
eina_tiler_tile_size_set(t, 1, 1);
evas_object_focus_set(focus_ec->frame, 1);
}
}
+
+ TRACE_DS_END();
}
E_API void
if ((!eina_hash_population(clients_hash[0])) && (!eina_hash_population(clients_hash[1]))) return;
+ TRACE_DS_BEGIN(CLIENT:IDLE BEFORE);
EINA_LIST_FOREACH(e_comp->clients, l, ec)
{
ec->changed = ec->changes.visible;
}
}
+
+ TRACE_DS_END();
}
(!ec->icccm.take_focus)) return;
if (ec->lock_focus_out) return;
if (ec == focused) return;
+
+ TRACE_DS_BEGIN(CLIENT:FOCUS SET WITH POINTER);
evas_object_focus_set(ec->frame, 1);
- if (e_config->focus_policy == E_FOCUS_CLICK) return;
- if (!ec->visible) return;
+ if (e_config->focus_policy == E_FOCUS_CLICK)
+ {
+ TRACE_DS_END();
+ return;
+ }
+ if (!ec->visible)
+ {
+ TRACE_DS_END();
+ return;
+ }
if (e_config->focus_policy == E_FOCUS_SLOPPY)
{
if (e_config->pointer_slide)
e_client_pointer_warp_to_center(ec);
}
+
+ TRACE_DS_END();
}
EINTERN void
Eina_List *l, *ll;
if (ec == focused) return;
+
+ TRACE_DS_BEGIN(CLIENT:FOCUSED SET);
+
ELOG("CLIENT FOCUS_SET", NULL, ec);
focused = ec;
if ((ec) && (ec->zone))
}
break;
}
- if (!ec) return;
+ if (!ec)
+ {
+ TRACE_DS_END();
+ return;
+ }
_e_client_hook_call(E_CLIENT_HOOK_FOCUS_SET, ec);
e_focus_event_focus_in(ec);
_e_client_event_simple(ec, E_EVENT_CLIENT_FOCUS_IN);
if (ec->sticky && ec->desk && (!ec->desk->visible))
e_client_desk_set(ec, e_desk_current_get(ec->zone));
+
+ TRACE_DS_END();
}
E_API void
{
E_OBJECT_CHECK(ec);
E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
+
+ TRACE_DS_BEGIN(CLIENT:ACTIVATE);
+
if ((e_config->focus_setting == E_FOCUS_NEW_WINDOW) ||
((ec->parent) &&
((e_config->focus_setting == E_FOCUS_NEW_DIALOG) ||
evas_object_focus_set(ec->frame, 1);
}
}
+
+ TRACE_DS_END();
}
E_API E_Client *
if (!ec->zone) return;
if (ec->shading || ec->iconic) return;
- TRACE_DS_BEGIN(ICONIC:e_client_iconify);
+ TRACE_DS_BEGIN(CLIENT:ICONIFY);
ec->iconic = 1;
ec->want_focus = ec->take_focus = 0;
if (!ec->zone) return;
if (ec->shading || (!ec->iconic)) return;
- TRACE_DS_BEGIN(ICONIC:e_client_uniconify);
+ TRACE_DS_BEGIN(CLIENT:UNICONIFY);
desk = e_desk_current_get(ec->desk->zone);
e_client_desk_set(ec, desk);
// static int doframeinfo = -1;
if (!e_comp) return EINA_FALSE;
+
+ TRACE_DS_BEGIN(COMP:UPDATE CB);
+
if (e_comp->update_job)
e_comp->update_job = NULL;
else
else
_e_comp_nocomp_end();
+ TRACE_DS_END();
+
return ECORE_CALLBACK_RENEW;
}
Evas_Object *o;
Eina_List *screens;
+ TRACE_DS_BEGIN(COMP_CANVAS:INIT);
+
e_comp->evas = ecore_evas_get(e_comp->ee);
e_comp->w = w;
e_comp->h = h;
ecore_evas_callback_resize_set(e_comp->ee, _e_comp_canvas_resize);
ecore_evas_resize(e_comp->ee, w, h);
+ TRACE_DS_END();
return EINA_TRUE;
}
{
EINA_SAFETY_ON_TRUE_RETURN(obj == above);
if (evas_object_below_get(obj) == above) return;
+
+ TRACE_DS_BEGIN(COMP:INTERCEPT STACK ABOVE);
_e_comp_intercept_stack_helper(data, above, evas_object_stack_above);
+ TRACE_DS_END();
}
static void
{
EINA_SAFETY_ON_TRUE_RETURN(obj == below);
if (evas_object_above_get(obj) == below) return;
+
+ TRACE_DS_BEGIN(COMP:INTERCEPT STACK BELOW);
_e_comp_intercept_stack_helper(data, below, evas_object_stack_below);
+ TRACE_DS_END();
}
static void
E_Comp_Object *cw = data;
Evas_Object *o;
+ TRACE_DS_BEGIN(COMP:INTERCEPT LOWER);
+
if (cw->ec->layer_block)
{
evas_object_lower(obj);
- return;
+ goto end;
}
- if (!EINA_INLIST_GET(cw->ec)->prev) return; //already lowest on layer
+ if (!EINA_INLIST_GET(cw->ec)->prev) goto end; //already lowest on layer
o = evas_object_below_get(obj);
_e_comp_object_layers_remove(cw);
/* prepend to client list since this client should be the first item now */
_e_comp_object_layers_add(cw, NULL, NULL, 1);
- if (evas_object_layer_get(o) != evas_object_layer_get(obj)) return; //already at bottom!
- if (obj == e_comp->layers[cw->layer].obj) return; //never lower a layer marker!
+ if (evas_object_layer_get(o) != evas_object_layer_get(obj)) goto end; //already at bottom!
+ if (obj == e_comp->layers[cw->layer].obj) goto end; //never lower a layer marker!
evas_object_data_set(obj, "client_restack", (void*)1);
evas_object_lower(obj);
evas_object_data_del(obj, "client_restack");
- if (!cw->visible) return;
+ if (!cw->visible) goto end;
e_comp_render_queue();
e_comp_shape_queue();
+
+end:
+ TRACE_DS_END();
}
static void
E_Comp_Object *cw = data;
Evas_Object *o;
+ TRACE_DS_BEGIN(COMP:INTERCEPT RAISE);
+
if (cw->ec->layer_block)
{
evas_object_raise(obj);
- return;
+ goto end;
}
- if (!EINA_INLIST_GET(cw->ec)->next) return;//already highest on layer
+ if (!EINA_INLIST_GET(cw->ec)->next) goto end;//already highest on layer
o = evas_object_above_get(obj);
{
E_Client *ecabove = e_client_above_get(cw->ec);
if (ecabove && (ecabove->frame == e_comp->layers[cw->layer].obj) &&
- (ecabove->frame == o)) return; //highest below marker
+ (ecabove->frame == o)) goto end; //highest below marker
}
- if (evas_object_layer_get(o) != evas_object_layer_get(obj)) return; //already at top!
+ if (evas_object_layer_get(o) != evas_object_layer_get(obj)) goto end; //already at top!
if (obj == e_comp->layers[cw->layer].obj) //never raise a non-layer marker!
evas_object_raise(obj);
else
if (e_client_focus_track_enabled())
e_client_raise_latest_set(cw->ec); //modify raise list if necessary
}
- if (!cw->visible) return;
+ if (!cw->visible) goto end;
e_comp_render_queue();
e_comp_shape_queue();
+
+end:
+ TRACE_DS_END();
}
static void
static void
_e_comp_smart_hide(Evas_Object *obj)
{
+ TRACE_DS_BEGIN(COMP:SMART HIDE);
+
INTERNAL_ENTRY;
cw->visible = 0;
evas_object_hide(cw->clip);
evas_object_event_callback_del_full(o, EVAS_CALLBACK_DEL, _e_comp_object_cb_mirror_del, cw);
evas_object_del(o);
}
- if (!_e_comp_object_animating_end(cw)) return;
+ if (!_e_comp_object_animating_end(cw))
+ {
+ TRACE_DS_END();
+ return;
+ }
+ }
+ if (stopping)
+ {
+ TRACE_DS_END();
+ return;
}
- if (stopping) return;
if (!cw->ec->input_only)
{
edje_object_freeze(cw->effect_obj);
evas_object_focus_set(cw->ec->frame, 0);
e_comp_render_queue(); //force nocomp recheck
e_comp_shape_queue();
+
+ TRACE_DS_END();
}
static void
//INF("SMART SHOW: %p EC(%dx%d) CW(%dx%d)", cw->ec, cw->ec->w, cw->ec->h, cw->w, cw->h);
+ TRACE_DS_BEGIN(COMP:SMART SHOW);
+
EINA_LIST_FOREACH(cw->ec->e.state.video_child, l, tmp)
evas_object_show(tmp->frame);
if (cw->ec->input_only)
{
e_comp_shape_queue();
+ TRACE_DS_END();
return;
}
if (cw->ec->iconic && (!cw->ec->new_client))
e_comp_object_signal_emit(cw->smart_obj, "e,state,visible", "e");
_e_comp_object_animating_begin(cw);
cw->showing = 1;
- if (!_e_comp_object_effect_visibility_start(cw, 1)) return;
+ if (!_e_comp_object_effect_visibility_start(cw, 1))
+ {
+ TRACE_DS_END();
+ return;
+ }
}
/* ensure some random effect doesn't lock the client offscreen */
if (!cw->animating)
e_comp_object_effect_set(obj, NULL);
e_comp_shape_queue();
}
+
+ TRACE_DS_END();
}
static void
//INF("RSZ(%p): %dx%d -> %dx%d", cw->ec, cw->w, cw->h, w, h);
if (!cw->effect_obj) CRI("ACK!");
+
+ TRACE_DS_BEGIN(COMP:SMART RESIZE);
+
first = ((cw->w < 1) || (cw->h < 1));
cw->w = w, cw->h = h;
if ((!cw->ec->shading) && (!cw->ec->shaded))
{
evas_object_resize(cw->effect_obj, w, h);
}
- if (!cw->visible) return;
+ if (!cw->visible)
+ {
+ TRACE_DS_END();
+ return;
+ }
e_comp_render_queue();
if (!cw->animating)
e_comp_shape_queue();
+
+ TRACE_DS_END();
}
static void
DBG("Compositor Cb Surface Create: %d", id);
+ TRACE_DS_BEGIN(COMP_WL:SURFACE CREATE CB);
+
/* try to create an internal surface */
if (!(res = wl_resource_create(client, &wl_surface_interface,
wl_resource_get_version(resource), id)))
{
ERR("Could not create compositor surface");
wl_client_post_no_memory(client);
+ TRACE_DS_END();
return;
}
ERR("Could not create new pixmap");
wl_resource_destroy(res);
wl_client_post_no_memory(client);
+ TRACE_DS_END();
return;
}
#endif
/* emit surface create signal */
wl_signal_emit(&e_comp_wl->signals.surface.create, res);
+
+ TRACE_DS_END();
}
static void
/* make sure this is a wayland client */
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+ TRACE_DS_BEGIN(COMP_WL:CLIENT NEW HOOK);
+
/* get window id from pixmap */
win = e_pixmap_window_get(ec->pixmap);
{
e_comp_ignore_win_add(E_PIXMAP_TYPE_WL, win);
e_object_del(E_OBJECT(ec));
+ TRACE_DS_END();
return;
}
if (!(ec->comp_data = E_NEW(E_Comp_Client_Data, 1)))
{
ERR("Could not allocate new client data structure");
+ TRACE_DS_END();
return;
}
e_hints_client_list_set();
e_pixmap_cdata_set(ec->pixmap, ec->comp_data);
+
+ TRACE_DS_END();
}
static void
/* make sure this is a wayland client */
if (e_pixmap_type_get(ec->pixmap) != E_PIXMAP_TYPE_WL) return;
+ TRACE_DS_BEGIN(COMP_WL:CLIENT DEL CB);
+
if ((!ec->already_unparented) && (ec->comp_data->reparented))
_e_comp_wl_focus_down_set(ec);
E_FREE(ec->comp_data);
_e_comp_wl_focus_check();
+
+ TRACE_DS_END();
}
#if 0
E_API Eina_Bool
e_comp_wl_init(void)
{
+ TRACE_DS_BEGIN(COMP_WL:INIT);
+
/* set gl available if we have ecore_evas support */
if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_EGL) ||
ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_DRM))
if (!_e_comp_wl_compositor_create())
{
e_error_message_show(_("Enlightenment cannot create a Wayland Compositor!\n"));
+ TRACE_DS_END();
return EINA_FALSE;
}
_last_event_time = ecore_loop_time_get();
+ TRACE_DS_END();
return EINA_TRUE;
}
int argc;
char **argv;
- TRACE_DS_BEGIN(MAIN:_e_main_subsystem_defer);
+ TRACE_DS_BEGIN(MAIN:SUBSYSTEMS DEFER);
ecore_app_args_get(&argc, &argv);
/* try to init delayed subsystems */
+
+ TRACE_DS_BEGIN(MAIN:DEFFERED EFL INIT);
+
TS("[DEFERRED] Elementary Init");
if (!elm_init(argc, argv))
{
e_error_message_show(_("Enlightenment cannot initialize Elementary!\n"));
+ TRACE_DS_END();
_e_main_shutdown(-1);
}
TS("[DEFERRED] Elementary Init Done");
if (!edje_init())
{
e_error_message_show(_("Enlightenment cannot initialize Edje!\n"));
+ TRACE_DS_END();
_e_main_shutdown(-1);
}
TS("[DEFERRED] Edje Init Done");
e_error_message_show(_("Enlightenment cannot initialize the FDO desktop system.\n"
"Perhaps you lack permissions on ~/.cache/efreet or are\n"
"out of memory or disk space?"));
+ TRACE_DS_END();
_e_main_shutdown(-1);
}
TS("[DEFERRED] Efreet Init Done");
_e_main_shutdown_push(efreet_shutdown);
+ TRACE_DS_END();
+ TRACE_DS_BEGIN(MAIN:DEFERRED INTERNAL SUBSYSTEMS INIT);
+
TS("[DEFERRED] Screens Init: win");
if (!e_win_init())
{
e_error_message_show(_("Enlightenment cannot setup elementary trap!\n"));
+ TRACE_DS_END();
_e_main_shutdown(-1);
}
TS("[DEFERRED] Screens Init: win Done");
if (!e_pointer_init())
{
e_error_message_show(_("Enlightenment cannot set up its pointer system.\n"));
+ TRACE_DS_END();
_e_main_shutdown(-1);
}
if (!e_scale_init())
{
e_error_message_show(_("Enlightenment cannot set up its scale system.\n"));
+ TRACE_DS_END();
_e_main_shutdown(-1);
}
TS("[DEFERRED E_Scale Init Done");
_e_main_shutdown_push(e_info_server_shutdown);
TS("[DEFERRED] E_INFO_SERVER Done");
+ TRACE_DS_END();
+ TRACE_DS_BEGIN(MAIN:DEFERRED COMP JOB);
+
/* try to do deferred job of any subsystems*/
TS("[DEFERRED] Compositor's deferred job");
e_comp_deferred_job();
TS("[DEFERRED] Compositor's deferred job Done");
+ TRACE_DS_END();
+ TRACE_DS_BEGIN(MAIN:DEFERRED MODULE JOB);
+
TS("[DEFERRED] E_Module's deferred job");
e_module_deferred_job();
TS("[DEFERRED] E_Module's deferred job Done");
TRACE_DS_END();
+ TRACE_DS_END();
return ECORE_CALLBACK_DONE;
}
#ifdef TS_DO
t0 = t1 = t2 = ecore_time_unix_get();
#endif
- TRACE_DS_BEGIN(MAIN:Begin_Startup);
+ TRACE_DS_BEGIN(MAIN:BEGIN STARTUP);
TS("Begin Startup");
/* trap deadly bug signals and allow some form of sane recovery */
if (e_config->show_splash)
e_init_status_set(_("Setup Screens"));
- TRACE_DS_BEGIN(MAIN:SCREEN_INIT);
+ TRACE_DS_BEGIN(MAIN:SCREEN INIT);
TS("Screens Init");
if (!_e_main_screens_init())
{
if (e_config->show_splash)
e_init_status_set(_("Setup Screens"));
- TRACE_DS_BEGIN(MAIN:SCREEN_INIT);
+ TRACE_DS_BEGIN(MAIN:SCREEN INIT);
TS("Screens Init");
if (!_e_main_screens_init())
{
E_Config_Module *em;
char buf[128];
+ TRACE_DS_BEGIN(MODULE:ALL LOAD);
+
_e_modules_initting = EINA_TRUE;
- if (_e_module_path_lists) return;
+ if (_e_module_path_lists)
+ {
+ TRACE_DS_END();
+ return;
+ }
e_config->modules =
eina_list_sort(e_config->modules, 0, _e_module_sort_priority);
}
unsetenv("E_MODULE_LOAD");
+
+ TRACE_DS_END();
}
E_API Eina_Bool
static Eina_Bool
_e_module_cb_idler(void *data EINA_UNUSED)
{
+ TRACE_DS_BEGIN(MODULE:DELAYER MODULES);
while (_e_modules_delayed)
{
const char *name;
if (_e_modules_delayed)
{
e_util_wakeup();
+ TRACE_DS_END();
return ECORE_CALLBACK_RENEW;
}
_e_module_whitelist_check();
_e_module_idler = NULL;
+ TRACE_DS_END();
return ECORE_CALLBACK_CANCEL;
}
if ((ec->maximized) || (ec->fullscreen)) return;
+ TRACE_DS_BEGIN(SHELL:SURFACE MOVE REQUEST CB);
+
switch (e_comp_wl->ptr.button)
{
case BTN_LEFT:
&ev.canvas.x, &ev.canvas.y);
_e_shell_surface_mouse_down_helper(ec, &ev, EINA_TRUE);
+
+ TRACE_DS_END();
}
static void
if ((ec->maximized) || (ec->fullscreen)) return;
+ TRACE_DS_BEGIN(SHELL:SURFACE RESIZE REQUEST CB);
+
e_comp_wl->resize.resource = resource;
e_comp_wl->resize.edges = edges;
e_comp_wl->ptr.grab_x = e_comp_wl->ptr.x - wl_fixed_from_int(ec->client.x);
&ev.canvas.x, &ev.canvas.y);
_e_shell_surface_mouse_down_helper(ec, &ev, EINA_FALSE);
+
+ TRACE_DS_END();
}
static void
/* DBG("XDG_SHELL: Map Surface: %d", wl_resource_get_id(resource)); */
+ TRACE_DS_BEGIN(SHELL:MAP);
+
/* get the client for this resource */
if (!(ec = wl_resource_get_user_data(resource)))
{
wl_resource_post_error(resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"No Client For Shell Surface");
+ TRACE_DS_END();
return;
}
/* if (ec->netwm.type == E_WINDOW_TYPE_POPUP_MENU) */
/* e_client_raise_latest_set(ec); */
}
+
+ TRACE_DS_END();
}
static void
/* DBG("XDG_SHELL: Unmap Surface: %d", wl_resource_get_id(resource)); */
+ TRACE_DS_BEGIN(SHELL:UNMAP);
+
/* get the client for this resource */
if (!(ec = wl_resource_get_user_data(resource)))
{
wl_resource_post_error(resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
"No Client For Shell Surface");
+ TRACE_DS_END();
return;
}
evas_object_hide(ec->frame);
ec->comp_data->mapped = EINA_FALSE;
}
+
+ TRACE_DS_END();
}
static void
printf("LOAD WL_DRM MODULE\n");
+ TRACE_DS_BEGIN(WL_DRM:INIT);
+
if (!(comp = e_comp))
{
comp = e_comp_new();
- EINA_SAFETY_ON_NULL_RETURN_VAL(comp, NULL);
+ if (!comp)
+ {
+ TRACE_DS_END();
+ EINA_SAFETY_ON_NULL_RETURN_VAL(comp, NULL);
+ }
comp->comp_type = E_PIXMAP_TYPE_WL;
}
else
{
fprintf(stderr, "Could not create ecore_evas_drm canvas");
+ TRACE_DS_END();
return NULL;
}
}
e_comp->screen = &drmiface;
- if (!e_comp_wl_init()) return NULL;
- if (!e_comp_canvas_init(w, h)) return NULL;
+ if (!e_comp_wl_init())
+ {
+ TRACE_DS_END();
+ return NULL;
+ }
+ if (!e_comp_canvas_init(w, h))
+ {
+ TRACE_DS_END();
+ return NULL;
+ }
e_comp_wl->screenshooter.read_pixels = _drm_read_pixels;
E_LIST_HANDLER_APPEND(event_handlers, ECORE_DRM_EVENT_INPUT_DEVICE_DEL,
_e_mod_drm_cb_input_device_del, comp);
+ TRACE_DS_END();
+
return m;
}