#define ALEN(array) (sizeof(array) / sizeof(array)[0])
-#define EOMER(msg, ARG...) ERR("[eom module][ERR] " msg, ##ARG)
-#define EOMWR(msg, ARG...) WRN("[eom module][WRN] " msg, ##ARG)
-#define EOMIN(msg, ARG...) INF("[eom module][INF] " msg, ##ARG)
-#define EOMDB(msg, ARG...) DBG("[eom module][DBG] " msg, ##ARG)
-#define EOMDBG(msg, ARG...) ;
+#define EOMER(msg, ARG...) ERR("[EOM][ERR] " msg, ##ARG)
+#define EOMWR(msg, ARG...) WRN("[EOM][WRN] " msg, ##ARG)
+#define EOMIN(msg, ARG...) INF("[EOM][INF] " msg, ##ARG)
+#define EOMDB(msg, ARG...) DBG("[EOM][DBG] " msg, ##ARG)
#define EOM_NUM_ATTR 3
#define EOM_CONNECT_CHECK_TIMEOUT 7.0
};
static E_EomPtr g_eom = NULL;
+static Eina_Bool eom_trace_debug = 0;
static void _e_eom_cb_dequeuable(tbm_surface_queue_h queue, void *user_data);
static void _e_eom_cb_pp(tbm_surface_h surface, void *user_data);
E_EomOutputBufferPtr outbuff = E_NEW(E_EomOutputBuffer, 1);
EINA_SAFETY_ON_NULL_RETURN_VAL(outbuff, NULL);
- EOMDB("Allocate output buffer:%p", outbuff);
+ if (eom_trace_debug)
+ EOMDB("Allocate output buffer:%p", outbuff);
outbuff->eom_output = eom_output;
/* double reference to avoid sigterm crash */
e_comp_wl_buffer_reference(&eom_buffer->comp_wl_buffer_ref_2, wl_buffer);
- EOMDB("E_EomBuffer:%p wl_buffer:%p busy:%d", eom_buffer, wl_buffer, wl_buffer->busy);
+ if (eom_trace_debug)
+ EOMDB("E_EomBuffer:%p wl_buffer:%p busy:%d", eom_buffer, wl_buffer, wl_buffer->busy);
+
return eom_buffer;
}
{
EINA_SAFETY_ON_NULL_RETURN(eom_buffer);
- EOMDB("wl_buffer:%p busy:%d", eom_buffer->wl_buffer, eom_buffer->wl_buffer->busy);
+ if (eom_trace_debug)
+ EOMDB("wl_buffer:%p busy:%d", eom_buffer->wl_buffer, eom_buffer->wl_buffer->busy);
eom_buffer->wl_buffer = NULL;
err = tdm_output_get_layer_count(eom_output->output, &count);
if (err != TDM_ERROR_NONE)
{
- EOMDB ("tdm_output_get_layer_count fail(%d)", err);
+ EOMER("tdm_output_get_layer_count fail(%d)", err);
return NULL;
}
if (capa & TDM_LAYER_CAPABILITY_PRIMARY)
{
- EOMDB("TDM_LAYER_CAPABILITY_PRIMARY layer found : %d", i);
+ if (eom_trace_debug)
+ EOMDB("TDM_LAYER_CAPABILITY_PRIMARY layer found : %d", i);
break;
}
}
if (primary_output == NULL)
{
- EOMER("Get primary output.(%s)", name);
+ EOMER("Get primary output fail.(%s)", name);
EINA_LIST_FOREACH(ecore_drm_devices_get(), l, dev)
{
primary_output = ecore_drm_output_primary_get(dev);
if (primary_output == NULL)
{
- EOMER("Get primary output.(%s)", name);
+ EOMER("Get primary output fail.(%s)", name);
return NULL;
}
}
static void
_e_eom_tbm_buffer_release_mirror_mod(E_EomOutputPtr eom_output, tbm_surface_h surface, void * unused)
{
- EOMDB("release eom_output:%p, tbm_surface_h:%p data:%p", eom_output, surface, unused);
+ if (eom_trace_debug)
+ EOMDB("release eom_output:%p, tbm_surface_h:%p data:%p", eom_output, surface, unused);
tbm_surface_queue_release(eom_output->pp_queue, surface);
}
eom_output = outbuff->eom_output;
EINA_SAFETY_ON_NULL_RETURN(eom_output);
- EOMDB("========================> CM END tbm_buff:%p", outbuff->tbm_surface);
+ if (eom_trace_debug)
+ EOMDB("========================> CM END tbm_buff:%p", outbuff->tbm_surface);
/*it means that eom_output has been canceled*/
- if(eom_output->wait_buff == NULL)
+ if (eom_output->wait_buff == NULL)
{
_e_eom_output_buff_delete(outbuff);
return;
EINA_SAFETY_ON_FALSE_RETURN(eom_output->wait_buff == outbuff);
- EOMDB("commit finish tbm_surface_h:%p", outbuff->tbm_surface);
+ if (eom_trace_debug)
+ EOMDB("commit finish tbm_surface_h:%p", outbuff->tbm_surface);
/* check if show buffer is present */
- if(eom_output->show_buff != NULL)
+ if (eom_output->show_buff != NULL)
{
- EOMDB("delete show buffer tbm_surface_h:%p", eom_output->show_buff->tbm_surface);
+ if (eom_trace_debug)
+ EOMDB("delete show buffer tbm_surface_h:%p", eom_output->show_buff->tbm_surface);
_e_eom_output_buff_delete(eom_output->show_buff);
eom_output->show_buff = NULL;
}
/* set wait_buffer as show_buff; */
- EOMDB("set wait_buffer as show_buff tbm_surface_h:%p", outbuff->tbm_surface);
+ if (eom_trace_debug)
+ EOMDB("set wait_buffer as show_buff tbm_surface_h:%p", outbuff->tbm_surface);
eom_output->wait_buff = NULL;
eom_output->show_buff = outbuff;
{
eom_output->pending_buff = eina_list_remove(eom_output->pending_buff, outbuff);
- EOMDB("========================> CM- START tbm_buff:%p", outbuff->tbm_surface);
- EOMDB("do commit tdm_output:%p tdm_layer:%p tbm_surface_h:%p", eom_output->output,
- eom_output->layer, outbuff->tbm_surface);
+ if (eom_trace_debug)
+ {
+ EOMDB("========================> CM- START tbm_buff:%p", outbuff->tbm_surface);
+ EOMDB("do commit tdm_output:%p tdm_layer:%p tbm_surface_h:%p", eom_output->output,
+ eom_output->layer, outbuff->tbm_surface);
+ }
err = tdm_layer_set_buffer(eom_output->layer, outbuff->tbm_surface);
EINA_SAFETY_ON_FALSE_GOTO(err == TDM_ERROR_NONE, error);
return;
error:
-
if (outbuff)
{
EOMDB("========================> CM- ENDERR tbm_buff:%p", outbuff);
/* check if output free to commit */
if (eom_output->wait_buff == NULL) /* do commit */
{
- EOMDB("========================> CM START tbm_buff:%p", tbm_srfc);
- EOMDB("do commit tdm_output:%p tdm_layer:%p tbm_surface_h:%p", eom_output->output,
- eom_output->layer, outbuff->tbm_surface);
+ if (eom_trace_debug)
+ {
+ EOMDB("========================> CM START tbm_buff:%p", tbm_srfc);
+ EOMDB("do commit tdm_output:%p tdm_layer:%p tbm_surface_h:%p", eom_output->output,
+ eom_output->layer, outbuff->tbm_surface);
+ }
err = tdm_layer_set_buffer(eom_output->layer, outbuff->tbm_surface);
EINA_SAFETY_ON_FALSE_GOTO(err == TDM_ERROR_NONE, error);
{
eom_output->pending_buff = eina_list_append(eom_output->pending_buff , outbuff);
- EOMDB("add to pending list tdm_output:%p tdm_layer:%p tbm_surface_h:%p",
- eom_output->output, eom_output->layer, outbuff->tbm_surface);
+ if (eom_trace_debug)
+ EOMDB("add to pending list tdm_output:%p tdm_layer:%p tbm_surface_h:%p",
+ eom_output->output, eom_output->layer, outbuff->tbm_surface);
}
return EINA_TRUE;
error2:
-
tdm_layer_unset_buffer(eom_output->layer);
error:
-
if (outbuff)
_e_eom_output_buff_delete(outbuff);
- EOMDB("========================> CM ENDERR tbm_buff:%p", tbm_srfc);
+
+ if (eom_trace_debug)
+ EOMDB("========================> CM ENDERR tbm_buff:%p", tbm_srfc);
+
return EINA_FALSE;
}
&x, &y, &w, &h);
}
- EOMDB("PP: angle:%d", g_eom->angle);
- EOMDB("PP: src:%dx%d, dst:%dx%d", g_eom->width, g_eom->height,
- eom_output->width, eom_output->height);
- EOMDB("PP calculation: x:%d, y:%d, w:%d, h:%d", x, y, w, h);
+ if (eom_trace_debug)
+ {
+ EOMDB("PP: angle:%d", g_eom->angle);
+ EOMDB("PP: src:%dx%d, dst:%dx%d", g_eom->width, g_eom->height,
+ eom_output->width, eom_output->height);
+ EOMDB("PP calculation: x:%d, y:%d, w:%d, h:%d", x, y, w, h);
+ }
pp_info.src_config.size.h = g_eom->width;
pp_info.src_config.size.v = g_eom->height;
pp_info.transform = TDM_TRANSFORM_270;
break;
default:
- EOMDB("Never get here");
+ EOMIN("Never get here");
break;
}
err = tbm_surface_queue_get_surfaces(queue, surface, &num);
if (err != TBM_SURFACE_QUEUE_ERROR_NONE)
{
- EOMDB("get surfaces");
+ EOMER("surface get fail");
return;
}
bo = tbm_surface_internal_get_bo(surface[i], 0);
if (!bo)
{
- EOMDB("bo get error");
+ EOMER("bo get fail");
return;
}
hndl = tbm_bo_map(bo, TBM_DEVICE_CPU, TBM_OPTION_READ | TBM_OPTION_WRITE);
if (!hndl.ptr)
{
- EOMDB("handle get error");
+ EOMER("handle get fail");
return;
}
if (g_eom->angle != ec->e.state.rot.ang.curr)
{
g_eom->angle = ec->e.state.rot.ang.curr;
- EOMDB("rotate check: rotate angle:%d", g_eom->angle);
+ if (eom_trace_debug)
+ EOMDB("rotate check: rotate angle:%d", g_eom->angle);
+
return EINA_TRUE;
}
tdm_err = tbm_surface_queue_dequeue(eom_output->pp_queue, &dst_surface);
EINA_SAFETY_ON_FALSE_GOTO(tdm_err == TDM_ERROR_NONE, error);
- EOMDB("============================> PP START tbm_buff:%p", dst_surface);
+ if (eom_trace_debug)
+ EOMDB("============================> PP START tbm_buff:%p", dst_surface);
src_surface = _e_eom_util_get_output_surface(g_eom->main_output_name);
tdm_err = TDM_ERROR_OPERATION_FAILED;
tdm_err = tdm_pp_commit(eom_output->pp);
EINA_SAFETY_ON_FALSE_GOTO(tdm_err == TDM_ERROR_NONE, error);
- EOMDB("do pp commit tdm_output:%p tbm_surface_h(src:%p dst:%p)", eom_output->output, src_surface, dst_surface);
+ if (eom_trace_debug)
+ EOMDB("do pp commit tdm_output:%p tbm_surface_h(src:%p dst:%p)", eom_output->output, src_surface, dst_surface);
}
else
{
- EOMDB("all pp buffers are busy, wait release queue");
+ if (eom_trace_debug)
+ EOMDB("all pp buffers are busy, wait release queue");
tbm_surface_queue_add_dequeuable_cb(eom_output->pp_queue, _e_eom_cb_dequeuable, eom_output);
}
return;
error:
-
EOMER("failed run pp tdm error: %d", tdm_err);
if (eom_output->pp_src_surface)
if (dst_surface)
{
- EOMDB("============================> PP ENDERR tbm_buff:%p", dst_surface);
+ if (eom_trace_debug)
+ EOMDB("============================> PP ENDERR tbm_buff:%p", dst_surface);
tdm_buffer_remove_release_handler(dst_surface, _e_eom_cb_pp, eom_output);
tbm_surface_queue_release(eom_output->pp_queue, dst_surface);
}
eom_output->pp_dst_surface = NULL;
}
- EOMDB("==============================> PP END tbm_buff:%p", surface);
+ if (eom_trace_debug)
+ EOMDB("==============================> PP END tbm_buff:%p", surface);
if (eom_output->pp_queue == NULL)
return;
tbm_surface_internal_dump_buffer(surface, file, i++, 0);
#endif
- if(!_e_eom_output_show(eom_output, surface, _e_eom_tbm_buffer_release_mirror_mod, NULL))
+ if (!_e_eom_output_show(eom_output, surface, _e_eom_tbm_buffer_release_mirror_mod, NULL))
{
EOMER("_e_eom_add_buff_to_show fail");
tbm_surface_queue_release(eom_output->pp_queue, surface);
_e_eom_pp_run(eom_output, EINA_FALSE);
- EOMDB("==============================< PP");
+ if (eom_trace_debug)
+ EOMDB("==============================< PP");
}
static void
E_EomOutputPtr eom_output = (E_EomOutputPtr)user_data;
EINA_SAFETY_ON_NULL_RETURN(user_data);
- EOMDB("release before in queue");
+ if (eom_trace_debug)
+ EOMDB("release before in queue");
tbm_surface_queue_remove_dequeuable_cb(eom_output->pp_queue, _e_eom_cb_dequeuable, eom_output);
{
if (eom_output->pp_queue)
{
- EOMDB("flush and destroy queue");
+ if (eom_trace_debug)
+ EOMDB("flush and destroy queue");
tbm_surface_queue_flush(eom_output->pp_queue);
tbm_surface_queue_destroy(eom_output->pp_queue);
eom_output->pp_queue = NULL;
if (!_e_eom_pp_is_needed(g_eom->width, g_eom->height, eom_output->width, eom_output->height))
{
/* TODO: Internal and external outputs are equal */
- EOMDB("internal and external outputs are equal");
+ if (eom_trace_debug)
+ EOMDB("internal and external outputs are equal");
}
tdm_err = tdm_layer_get_info(hal_layer, &layer_info);
EINA_SAFETY_ON_FALSE_GOTO(tdm_err == TDM_ERROR_NONE, err);
- EOMDB("layer info: %dx%d, pos (x:%d, y:%d, w:%d, h:%d, dpos (x:%d, y:%d, w:%d, h:%d))",
- layer_info.src_config.size.h, layer_info.src_config.size.v,
- layer_info.src_config.pos.x, layer_info.src_config.pos.y,
- layer_info.src_config.pos.w, layer_info.src_config.pos.h,
- layer_info.dst_pos.x, layer_info.dst_pos.y,
- layer_info.dst_pos.w, layer_info.dst_pos.h);
+ if (eom_trace_debug)
+ EOMDB("layer info: %dx%d, pos (x:%d, y:%d, w:%d, h:%d, dpos (x:%d, y:%d, w:%d, h:%d))",
+ layer_info.src_config.size.h, layer_info.src_config.size.v,
+ layer_info.src_config.pos.x, layer_info.src_config.pos.y,
+ layer_info.src_config.pos.w, layer_info.src_config.pos.h,
+ layer_info.dst_pos.x, layer_info.dst_pos.y,
+ layer_info.dst_pos.w, layer_info.dst_pos.h);
eom_output->layer = hal_layer;
return EINA_TRUE;
err:
-
_e_eom_output_state_set_mode(eom_output, EOM_OUTPUT_MODE_NONE);
eom_output->state = NONE;
tdm_err = tdm_layer_get_info(hal_layer, &layer_info);
EINA_SAFETY_ON_FALSE_GOTO(tdm_err == TDM_ERROR_NONE, err);
- EOMDB("layer info: %dx%d, pos (x:%d, y:%d, w:%d, h:%d, dpos (x:%d, y:%d, w:%d, h:%d))",
- layer_info.src_config.size.h, layer_info.src_config.size.v,
- layer_info.src_config.pos.x, layer_info.src_config.pos.y,
- layer_info.src_config.pos.w, layer_info.src_config.pos.h,
- layer_info.dst_pos.x, layer_info.dst_pos.y,
- layer_info.dst_pos.w, layer_info.dst_pos.h);
+ if (eom_trace_debug)
+ EOMDB("layer info: %dx%d, pos (x:%d, y:%d, w:%d, h:%d, dpos (x:%d, y:%d, w:%d, h:%d))",
+ layer_info.src_config.size.h, layer_info.src_config.size.v,
+ layer_info.src_config.pos.x, layer_info.src_config.pos.y,
+ layer_info.src_config.pos.w, layer_info.src_config.pos.h,
+ layer_info.dst_pos.x, layer_info.dst_pos.y,
+ layer_info.dst_pos.w, layer_info.dst_pos.h);
eom_output->layer = hal_layer;
return;
err:
-
_e_eom_output_state_set_mode(eom_output, EOM_OUTPUT_MODE_NONE);
eom_output->state = NONE;
EINA_LIST_FOREACH_SAFE(eom_output->pending_buff, l, ll, buff)
{
- EOMDB("delete pending tbm_buff:%p", buff->tbm_surface);
+ if (eom_trace_debug)
+ EOMDB("delete pending tbm_buff:%p", buff->tbm_surface);
eom_output->pending_buff = eina_list_remove_list(eom_output->pending_buff, l);
_e_eom_output_buff_delete(buff);
}
eom_output->wait_buff = NULL;
- EOMDB("delete show tbm_buff:%p", eom_output->show_buff ? eom_output->show_buff->tbm_surface : NULL);
+ if (eom_trace_debug)
+ EOMDB("delete show tbm_buff:%p", eom_output->show_buff ? eom_output->show_buff->tbm_surface : NULL);
_e_eom_output_buff_delete(eom_output->show_buff);
eom_output->show_buff = NULL;
}
{
err = tdm_layer_unset_buffer(eom_output->layer);
if (err != TDM_ERROR_NONE)
- EOMDB("fail unset buffer:%d", err);
+ EOMER("fail unset buffer:%d", err);
err = tdm_layer_commit(eom_output->layer, NULL, eom_output);
if (err != TDM_ERROR_NONE)
- EOMDB ("fail commit on deleting output err:%d", err);
+ EOMER("fail commit on deleting output err:%d", err);
}
_e_eom_output_all_buff_release(eom_output);
else if (best_mode)
mode = best_mode;
- if (mode)
- EOMDB("bestmode : %s, (%dx%d) r(%d), f(%d), t(%d)",
- mode->name, mode->hdisplay, mode->vdisplay,
- mode->vrefresh, mode->flags, mode->type);
+ if (eom_trace_debug)
+ {
+ if (mode)
+ EOMDB("bestmode : %s, (%dx%d) r(%d), f(%d), t(%d)",
+ mode->name, mode->hdisplay, mode->vdisplay,
+ mode->vrefresh, mode->flags, mode->type);
+ }
return mode;
}
{
E_EomOutputPtr eom_output = NULL;
- EOMDB("timer called %s", __FUNCTION__);
+ if (eom_trace_debug)
+ EOMDB("timer called %s", __FUNCTION__);
EINA_SAFETY_ON_NULL_RETURN_VAL(data, ECORE_CALLBACK_CANCEL);
eom_output->phys_width = mmWidth;
eom_output->phys_height = mmHeight;
- EOMDB("Setup new output: %s", eom_output->name);
+ EOMDB("Setup new output: %s (%dx%d)", eom_output->name, eom_output->width, eom_output->height);
/* TODO: check output mode(presentation set) and HDMI type */
{
if (iterator && iterator->resource)
{
- EOMDB("Send MIRROR ON notification to clients");
+ EOMDB("Send output connected notification to client: %p", iterator);
if (iterator->current)
wl_eom_send_output_info(iterator->resource, eom_output->id,
{
if (iterator && iterator->resource)
{
- EOMDB("Send MIRROR OFF notification to client: %p", iterator);
+ EOMDB("Send output disconnected notification to client: %p", iterator);
+
if (iterator->current)
wl_eom_send_output_info(iterator->resource, eom_output->id,
eom_output->type, eom_output->mode,
status = value.u32;
- EOMDB("id (%d), type(%d, %d), status(%d, %d)", eom_output->id, type, tdm_type, status_check, status);
+ EOMDB("outupt id(%d), type(%d, %d), status(%d, %d)", eom_output->id, type, tdm_type, status_check, status);
eom_output->type = (eom_output_type_e)tdm_type;
eom_output->status = status;
}
else if (status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED)
{
- e_comp_override_del();
-
_e_eom_output_disconnected(eom_output);
+
+ e_comp_override_del();
}
}
tdm_error ret = TDM_ERROR_NONE;
unsigned int mmWidth, mmHeight;
int i, count;
+ Eina_List *l;
+ E_EomOutputPtr eom_output = NULL;
ret = tdm_display_get_output_count(dpy, &count);
EINA_SAFETY_ON_FALSE_RETURN_VAL(ret == TDM_ERROR_NONE, EINA_FALSE);
err:
if (g_eom->outputs)
{
- Eina_List *l;
- E_EomOutputPtr output;
-
- EINA_LIST_FOREACH(g_eom->outputs, l, output)
- free(output);
+ EINA_LIST_FOREACH(g_eom->outputs, l, eom_output)
+ free(eom_output);
eina_list_free(g_eom->outputs);
return EINA_TRUE;
err:
-
if (g_eom->bufmgr)
g_eom->bufmgr = NULL;
_e_eom_deinit()
{
Ecore_Event_Handler *h = NULL;
+ Eina_List *l;
+ E_EomOutputPtr output;
if (g_eom == NULL) return;
if (g_eom->handlers)
{
EINA_LIST_FREE(g_eom->handlers, h)
- ecore_event_handler_del(h);
+ ecore_event_handler_del(h);
g_eom->handlers = NULL;
}
if (g_eom->outputs)
{
- Eina_List *l;
- E_EomOutputPtr output;
-
EINA_LIST_FOREACH(g_eom->outputs, l, output)
- free(output);
+ free(output);
eina_list_free(g_eom->outputs);
if (ec)
{
g_eom->angle = ec->e.state.rot.ang.curr;
- EOMDB("top ec rotate angle:%d", g_eom->angle);
+ if (eom_trace_debug)
+ EOMDB("top ec rotate angle:%d", g_eom->angle);
}
}
Eina_List *l = NULL;
Eina_Bool ret;
- EOMDB("=======================> CLENT UNBIND");
+ EOMDB("=======================> CLIENT DESTROY");
EINA_SAFETY_ON_NULL_RETURN(resource);
_e_eom_output_start_mirror(output);
end:
-
/* Notify eom clients which are binded to a concrete output that the
* state and mode of the output has been changed */
EINA_LIST_FOREACH(g_eom->clients, l, iterator)
}
end2:
-
free(client);
}
eom_output = _e_eom_output_get_by_id(output_id);
EINA_SAFETY_ON_NULL_GOTO(eom_output, no_output);
- EOMDB("Set attribute:%d", attribute);
+ EOMDB("Set attribute:%d, client:%p", attribute, eom_client);
if (eom_client->current == EINA_TRUE && eom_output->id == eom_client->output_id)
{
if (eom_output->status == TDM_OUTPUT_CONN_STATUS_DISCONNECTED)
{
- EOMDB("output:%d is disconnected", output_id);
+ if (eom_trace_debug)
+ EOMDB("output:%d is disconnected", output_id);
goto end;
}
ret = _e_eom_output_start_mirror(eom_output);
EINA_SAFETY_ON_FALSE_GOTO(ret == EINA_TRUE, end);
- /* If mirror mode has been ran notify all clients about that */
- EOMDB("client set NONE attribute, send new info to previous current client");
+ /* If mirror mode has been run notify all clients about that */
+ if (eom_trace_debug)
+ EOMDB("client set NONE attribute, send new info to previous current client");
EINA_LIST_FOREACH(g_eom->clients, l, iterator)
{
if (iterator && iterator->output_id == output_id)
}
end:
-
/* If client was not able to set attribute send LOST event to it */
if (eom_error == EOM_ERROR_INVALID_PARAMETER)
{
eom_error);
current_eom_client = _e_eom_client_get_current_by_id(eom_output->id);
- EOMDB("Substitute current client: new:%p, old:%p",eom_client, current_eom_client );
+ EOMDB("Substitute current client: new:%p, old:%p", eom_client, current_eom_client);
/* Send changes to previous current client */
if (eom_client->current == EINA_FALSE && current_eom_client)
/* Get here if EOM does not have output referred by output_id */
no_output:
-
wl_eom_send_output_attribute(eom_client->resource, output_id,
EOM_OUTPUT_ATTRIBUTE_NONE,
EOM_OUTPUT_ATTRIBUTE_STATE_NONE,
wl_eom_send_output_type(eom_client->resource, output_id,
EOM_OUTPUT_ATTRIBUTE_STATE_NONE,
TDM_OUTPUT_CONN_STATUS_DISCONNECTED);
- return;
}
static Eina_Bool
g_eom->comp_object_intercept_hooks = eina_list_append(g_eom->comp_object_intercept_hooks, hook_data);
- EOMDB("_e_eom_redirected_hook have been added");
return EINA_TRUE;
err:
-
if (hook_data)
free(hook_data);
+
return EINA_FALSE;
}
if (!(ec = wl_resource_get_user_data(surface)))
{
- wl_resource_post_error(surface,WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface");
+ wl_resource_post_error(surface, WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface");
return;
}
if (!(ec = wl_resource_get_user_data(surface)))
{
- wl_resource_post_error(surface,WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface");
+ wl_resource_post_error(surface, WL_DISPLAY_ERROR_INVALID_OBJECT, "No Client For Shell Surface");
return;
}
static void
_e_eom_cb_wl_request_get_output_info(struct wl_client *client, struct wl_resource *resource, uint32_t output_id)
{
- EOMDB("output:%d", output_id);
+ EOMDB("get output info:%d", output_id);
if (g_eom->outputs)
{
wl_resource_set_implementation(resource, &_e_eom_wl_implementation, eom, _e_eom_cb_wl_eom_client_destory);
- EOMDB("send - output count : %d", g_eom->output_count);
-
wl_eom_send_output_count(resource, g_eom->output_count);
if (g_eom->outputs)
{
EINA_LIST_FOREACH(g_eom->outputs, l, output)
{
- EOMDB("send - id : %d, type : %d, mode : %d, w : %d, h : %d, w_mm : %d, h_mm : %d, conn : %d",
- output->id, output->type, output->mode, output->width, output->height,
- output->phys_width, output->phys_height, output->status);
+ if (eom_trace_debug)
+ EOMDB("send - id : %d, type : %d, mode : %d, w : %d, h : %d, w_mm : %d, h_mm : %d, conn : %d",
+ output->id, output->type, output->mode, output->width, output->height,
+ output->phys_width, output->phys_height, output->status);
wl_eom_send_output_info(resource, output->id, output->type, output->mode, output->width, output->height,
output->phys_width, output->phys_height, output->connection,
1, 0, 0, 0);
g_eom->clients = eina_list_append(g_eom->clients, new_client);
- EOMDB("=======================> BIND CLENT");
+ EOMDB("=======================> BIND CLIENT");
}
static Eina_Bool
static void
_e_eom_tbm_buffer_release_ext_mod(E_EomOutputPtr eom_output, tbm_surface_h srfc, void * eom_buff)
{
- EOMDB("============> EXT END tbm_buff:%p E_EomBuffer:%p", srfc, eom_buff);
+ if (eom_trace_debug)
+ EOMDB("============> EXT END tbm_buff:%p E_EomBuffer:%p", srfc, eom_buff);
_e_eom_buffer_destroy(eom_buff);
}
* Also I do not know how it affects on performance */
if (ec->map_timer)
{
- EOMDB("delete map_timer");
+ if (eom_trace_debug)
+ EOMDB("delete map_timer");
E_FREE_FUNC(ec->map_timer, ecore_timer_del);
}
E_EomBufferPtr eom_buff = _e_eom_buffer_create(wl_buffer);
EINA_SAFETY_ON_NULL_RETURN_VAL(eom_buff, ECORE_CALLBACK_PASS_ON);
- EOMDB("===============> EXT START tbm_buff:%p", tbm_buffer);
+ if (eom_trace_debug)
+ EOMDB("===============> EXT START tbm_buff:%p", tbm_buffer);
#ifdef EOM_DUMP_PRESENTATION_BUFFERS
char file[256];
tbm_surface_internal_dump_buffer(tbm_buffer, file, i++, 0);
#endif
- if(!_e_eom_output_show(eom_output, tbm_buffer, _e_eom_tbm_buffer_release_ext_mod, eom_buff))
+ if (!_e_eom_output_show(eom_output, tbm_buffer, _e_eom_tbm_buffer_release_ext_mod, eom_buff))
{
EOMDB("===============> EXT ENDERR tbm_buff:%p", tbm_buffer);
EOMDB("_e_eom_add_buff_to_show fail");
if (eom_output->state == WAIT_PRESENTATION)
{
- EOMDB("remove delayed presentation timer");
+ if (eom_trace_debug)
+ EOMDB("remove delayed presentation timer");
if (eom_output->delay)
ecore_timer_del(eom_output->delay);
}
eom_output->state = PRESENTATION;
}
- EOMDB("===============< EXT START");
+ if (eom_trace_debug)
+ EOMDB("===============< EXT START");
+
return ECORE_CALLBACK_PASS_ON;
}
zone = ev->zone;
EINA_SAFETY_ON_NULL_RETURN_VAL(zone, ECORE_CALLBACK_PASS_ON);
- EOMDB("-----------------------------------------------------");
-
- EOMDB("effect END: angles: prev:%d curr:%d next:%d sub:%d",
- zone->rot.prev, zone->rot.curr,
- zone->rot.next, zone->rot.sub);
-
- EOMDB("effect END: rotate angle:%d", eom->angle);
-
- EOMDB("-----------------------------------------------------");
-
+ if (eom_trace_debug)
+ {
+ EOMDB("-----------------------------------------------------");
+ EOMDB("effect END: angles: prev:%d curr:%d next:%d sub:%d",
+ zone->rot.prev, zone->rot.curr,
+ zone->rot.next, zone->rot.sub);
+ EOMDB("effect END: rotate angle:%d", eom->angle);
+ EOMDB("-----------------------------------------------------");
+ }
eom->angle = zone->rot.curr;
if (eom->rotate_timer)
eom->angle = ec->e.state.rot.ang.curr;
eom->rotate_state = ROTATE_DONE;
- EOMDB("-----------------------------------------------------");
- EOMDB("END: ec:%p", ec);
-
- EOMDB("END: angles: prev:%d curr:%d next:%d res:%d",
- ec->e.state.rot.ang.prev, ec->e.state.rot.ang.curr,
- ec->e.state.rot.ang.next, ec->e.state.rot.ang.reserve);
-
- EOMDB("END: rotate angle:%d", eom->angle);
- EOMDB("END: ec:%dx%d", ec->w, ec->h);
-
- EOMDB("-----------------------------------------------------");
+ if (eom_trace_debug)
+ {
+ EOMDB("-----------------------------------------------------");
+ EOMDB("END: ec:%p (%dx%d)", ec, ec->w, ec->h);
+ EOMDB("END: angles: prev:%d curr:%d next:%d res:%d",
+ ec->e.state.rot.ang.prev, ec->e.state.rot.ang.curr,
+ ec->e.state.rot.ang.next, ec->e.state.rot.ang.reserve);
+ EOMDB("END: rotate angle:%d", eom->angle);
+ EOMDB("-----------------------------------------------------");
+ }
}
else if (eom->rotate_state == ROTATE_INIT)
{
return EINA_TRUE;
err:
-
_e_eom_deinit();
+
return EINA_FALSE;
}
eom_output = _e_eom_output_by_ec_child_get(ec);
if (!eom_output)
return EINA_FALSE;
+
return EINA_TRUE;
}
eom_output = _e_eom_output_by_ec_child_get(ec);
if (!eom_output)
return NULL;
+
return eom_output->output;
}