/* check condition */
#define TBM_RETURN_IF_FAIL(cond) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
return;\
} \
}
#define TBM_RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
return val;\
} \
}
#define TBM_GOTO_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
goto val;\
} \
}
#define TBM_RETURN_SET_ERR_IF_FAIL(cond, error, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
error = error_type;\
return;\
} \
#define TBM_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
error = error_type;\
return val;\
} \
#define TBM_GOTO_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
error = error_type;\
goto val;\
} \
bufmgr_func = calloc(1, sizeof(struct _tbm_backend_bufmgr_func));
if (!bufmgr_func) {
- TBM_ERR("error: fail to allocate the tbm_backend_bufmgr_func\n");
+ TBM_ERR("error: fail to allocate the tbm_backend_bufmgr_func");
if (error)
*error = TBM_ERROR_OUT_OF_MEMORY;
return NULL;
bufmgr_bo = calloc(1, sizeof(struct _tbm_backend_bo_func));
if (!bufmgr_bo) {
- TBM_ERR("error: fail to allocate the tbm_backend_bo_func\n");
+ TBM_ERR("error: fail to allocate the tbm_backend_bo_func");
if (error)
*error = TBM_ERROR_OUT_OF_MEMORY;
return NULL;
/* check condition */
#define TBM_BO_RETURN_IF_FAIL(cond) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_bufmgr_mutex_unlock();\
return;\
#define TBM_BO_RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_bufmgr_mutex_unlock();\
return val;\
user_data = calloc(1, sizeof(tbm_user_data));
if (!user_data) {
/* LCOV_EXCL_START */
- TBM_ERR("fail to allocate an user_date\n");
+ TBM_ERR("fail to allocate an user_date");
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
return NULL;
/* LCOV_EXCL_STOP */
return 1;
if (bo->lock_cnt < 0) {
- TBM_ERR("error bo:%p LOCK_CNT=%d\n",
+ TBM_ERR("error bo:%p LOCK_CNT=%d",
bo, bo->lock_cnt);
return 0;
}
bo->lock_cnt++;
break;
default:
- TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.\n",
+ TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.",
bo, bo->bufmgr->bo_lock_type);
ret = 0;
break;
}
- TBM_DBG(">> LOCK bo:%p(%d->%d)\n", bo, old, bo->lock_cnt);
+ TBM_DBG(">> LOCK bo:%p(%d->%d)", bo, old, bo->lock_cnt);
return ret;
}
}
break;
default:
- TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.\n",
+ TBM_ERR("error bo:%p bo_lock_type[%d] is wrong.",
bo, bo->bufmgr->bo_lock_type);
break;
}
if (bo->lock_cnt < 0)
bo->lock_cnt = 0;
- TBM_DBG(">> UNLOCK bo:%p(%d->%d)\n", bo, old, bo->lock_cnt);
+ TBM_DBG(">> UNLOCK bo:%p(%d->%d)", bo, old, bo->lock_cnt);
}
static int
_tbm_bo_is_valid(tbm_bo bo)
{
if (!bo) {
- TBM_ERR("error: bo is NULL.\n");
+ TBM_ERR("error: bo is NULL.");
return 0;
}
if (!_tbm_bo_magic_check(bo)) {
- TBM_ERR("error: No valid bo(%p).\n", bo);
+ TBM_ERR("error: No valid bo(%p).", bo);
return 0;
}
bo->ref_cnt++;
- TBM_TRACE_BO("bo(%p) ref_cnt(%d)\n", bo, bo->ref_cnt);
+ TBM_TRACE_BO("bo(%p) ref_cnt(%d)", bo, bo->ref_cnt);
_tbm_bufmgr_mutex_unlock();
TBM_BO_RETURN_IF_FAIL(_tbm_bo_is_valid(bo));
- TBM_TRACE_BO("bo(%p) ref_cnt(%d)\n", bo, bo->ref_cnt - 1);
+ TBM_TRACE_BO("bo(%p) ref_cnt(%d)", bo, bo->ref_cnt - 1);
if (bo->ref_cnt <= 0) {
_tbm_bufmgr_mutex_unlock();
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), (tbm_bo_handle) NULL);
if (!_tbm_bo_lock(bo, device, opt)) {
- TBM_ERR("error: fail to lock bo:%p)\n", bo);
+ TBM_ERR("error: fail to lock bo:%p)", bo);
_tbm_bufmgr_mutex_unlock();
return (tbm_bo_handle) NULL;
}
bo_handle = tbm_bo_data_map(bo->bo_data, device, opt, &error);
if (bo_handle.ptr == NULL) {
/* LCOV_EXCL_START */
- TBM_ERR("error: fail to map bo:%p error:%d\n", bo, error);
+ TBM_ERR("error: fail to map bo:%p error:%d", bo, error);
_tbm_bo_unlock(bo);
_tbm_set_last_result(error);
_tbm_bufmgr_mutex_unlock();
/* increase the map_count */
bo->map_cnt++;
- TBM_TRACE_BO("bo(%p) map_cnt(%d)\n", bo, bo->map_cnt);
+ TBM_TRACE_BO("bo(%p) map_cnt(%d)", bo, bo->map_cnt);
_tbm_bufmgr_mutex_unlock();
error = tbm_bo_data_unmap(bo->bo_data);
if (error != TBM_ERROR_NONE) {
/* LCOV_EXCL_START */
- TBM_ERR("error: bo(%p) map_cnt(%d) error(%d)\n", bo, bo->map_cnt, error);
+ TBM_ERR("error: bo(%p) map_cnt(%d) error(%d)", bo, bo->map_cnt, error);
_tbm_set_last_result(error);
_tbm_bufmgr_mutex_unlock();
return 0;
/* decrease the map_count */
bo->map_cnt--;
- TBM_TRACE_BO("bo(%p) map_cnt(%d)\n", bo, bo->map_cnt);
+ TBM_TRACE_BO("bo(%p) map_cnt(%d)", bo, bo->map_cnt);
_tbm_bo_unlock(bo);
bo_handle = tbm_bo_data_get_handle(bo->bo_data, device, &error);
if (bo_handle.ptr == NULL) {
/* LCOV_EXCL_START */
- TBM_ERR("error: bo(%p) bo_handle(%p) error(%d)\n", bo, bo_handle.ptr, error);
+ TBM_ERR("error: bo(%p) bo_handle(%p) error(%d)", bo, bo_handle.ptr, error);
_tbm_set_last_result(error);
_tbm_bufmgr_mutex_unlock();
return (tbm_bo_handle)NULL;
/* LCOV_EXCL_STOP */
}
- TBM_TRACE_BO("bo(%p) bo_handle(%p)\n", bo, bo_handle.ptr);
+ TBM_TRACE_BO("bo(%p) bo_handle(%p)", bo, bo_handle.ptr);
_tbm_bufmgr_mutex_unlock();
size = tbm_bo_data_get_size(bo->bo_data, &error);
_tbm_set_last_result(error);
- TBM_TRACE_BO("bo(%p) size(%d)\n", bo, size);
+ TBM_TRACE_BO("bo(%p) size(%d)", bo, size);
_tbm_bufmgr_mutex_unlock();
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
if (bo->bufmgr->bo_lock_type == TBM_BUFMGR_BO_LOCK_TYPE_NEVER) {
- TBM_ERR("bo(%p) lock_cnt(%d)\n", bo, bo->lock_cnt);
+ TBM_ERR("bo(%p) lock_cnt(%d)", bo, bo->lock_cnt);
_tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
_tbm_bufmgr_mutex_unlock();
return 0;
}
if (bo->lock_cnt > 0) {
- TBM_TRACE_BO("error: bo(%p) lock_cnt(%d)\n", bo, bo->lock_cnt);
+ TBM_TRACE_BO("error: bo(%p) lock_cnt(%d)", bo, bo->lock_cnt);
_tbm_bufmgr_mutex_unlock();
return 1;
}
- TBM_TRACE_BO("bo(%p) lock_cnt(%d)\n", bo, bo->lock_cnt);
+ TBM_TRACE_BO("bo(%p) lock_cnt(%d)", bo, bo->lock_cnt);
_tbm_bufmgr_mutex_unlock();
return 0;
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo1), 0);
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo2), 0);
- TBM_TRACE_BO("before: bo1(%p) bo2(%p)\n", bo1, bo2);
+ TBM_TRACE_BO("before: bo1(%p) bo2(%p)", bo1, bo2);
size1 = tbm_bo_data_get_size(bo1->bo_data, &error1);
_tbm_set_last_result(error1);
bo1->bo_data = bo2->bo_data;
bo2->bo_data = temp;
- TBM_TRACE_BO("after: bo1(%p) bo2(%p)\n", bo1, bo2);
+ TBM_TRACE_BO("after: bo1(%p) bo2(%p)", bo1, bo2);
_tbm_bufmgr_mutex_unlock();
return 1;
fail:
- TBM_ERR("error: bo1(%p) bo2(%p)\n", bo1, bo2);
+ TBM_ERR("error: bo1(%p) bo2(%p)", bo1, bo2);
_tbm_bufmgr_mutex_unlock();
return 0;
/* check if the data according to the key exist if so, return false. */
data = user_data_lookup(&bo->user_data_list, key);
if (data) {
- TBM_TRACE_BO("warning: user data already exist key(%ld)\n", key);
+ TBM_TRACE_BO("warning: user data already exist key(%ld)", key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
data = user_data_create(key, data_free_func);
if (!data) {
- TBM_ERR("error: bo(%p) key(%lu)\n", bo, key);
+ TBM_ERR("error: bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
}
- TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, data->data);
+ TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, data->data);
LIST_ADD(&data->item_link, &bo->user_data_list);
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
if (LIST_IS_EMPTY(&bo->user_data_list)) {
- TBM_TRACE_BO("bo(%p) key(%lu)\n", bo, key);
+ TBM_TRACE_BO("bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
old_data = user_data_lookup(&bo->user_data_list, key);
if (!old_data) {
- TBM_TRACE_BO("bo(%p) key(%lu)\n", bo, key);
+ TBM_TRACE_BO("bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
}
- TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, old_data->data);
+ TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, old_data->data);
user_data_delete(old_data);
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
if (LIST_IS_EMPTY(&bo->user_data_list)) {
- TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+ TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
old_data = user_data_lookup(&bo->user_data_list, key);
if (!old_data) {
- TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+ TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
old_data->free_func(old_data->data);
old_data->data = data;
- TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, old_data->data);
+ TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, old_data->data);
_tbm_bufmgr_mutex_unlock();
TBM_BO_RETURN_VAL_IF_FAIL(_tbm_bo_is_valid(bo), 0);
if (!data || LIST_IS_EMPTY(&bo->user_data_list)) {
- TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+ TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
old_data = user_data_lookup(&bo->user_data_list, key);
if (!old_data) {
*data = NULL;
- TBM_TRACE_BO("error: bo(%p) key(%lu)\n", bo, key);
+ TBM_TRACE_BO("error: bo(%p) key(%lu)", bo, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_bufmgr_mutex_unlock();
return 0;
*data = old_data->data;
- TBM_TRACE_BO("bo(%p) key(%lu) data(%p)\n", bo, key, old_data->data);
+ TBM_TRACE_BO("bo(%p) key(%lu) data(%p)", bo, key, old_data->data);
_tbm_bufmgr_mutex_unlock();
_tbm_set_last_result(error);
}
- TBM_TRACE_BO("bo(%p)\n", bo);
+ TBM_TRACE_BO("bo(%p)", bo);
_tbm_bufmgr_mutex_unlock();
tbm_user_data *old_data = NULL, *tmp;
LIST_FOR_EACH_ENTRY_SAFE(old_data, tmp, &bo->user_data_list, item_link) {
- TBM_DBG("free user_data\n");
+ TBM_DBG("free user_data");
user_data_delete(old_data);
}
}
while (bo->lock_cnt > 0) {
- TBM_ERR("error lock_cnt:%d\n", bo->lock_cnt);
+ TBM_ERR("error lock_cnt:%d", bo->lock_cnt);
_bo_unlock(bo);
bo->lock_cnt--;
}
/* check condition */
#define TBM_BUFMGR_RETURN_IF_FAIL(cond) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_bufmgr_mutex_unlock();\
return;\
#define TBM_BUFMGR_RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_bufmgr_mutex_unlock();\
return val;\
#define TBM_BUFMGR_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
error = error_type;\
_tbm_bufmgr_mutex_unlock();\
return val;\
if ((bufmgr->bo_cnt >= 500) && ((bufmgr->bo_cnt % 20) == 0) &&
(bufmgr->bo_cnt > last_chk_bo_cnt)) {
- TBM_DBG("============TBM BO CNT DEBUG: bo_cnt=%d\n", bufmgr->bo_cnt);
+ TBM_DBG("============TBM BO CNT DEBUG: bo_cnt=%d", bufmgr->bo_cnt);
str = _tbm_bufmgr_debug_tbm_info_get(bufmgr, &error);
if (str) {
TBM_DBG(" %s", str);
fp = fopen(fn_cmdline, "r");
if (fp == 0) {
- TBM_ERR("cannot file open %s\n", fn_cmdline);
+ TBM_ERR("cannot file open %s", fn_cmdline);
return;
}
if (!fgets(cmdline, 255, fp)) {
- TBM_ERR("fail to get appname for pid(%d)\n", pid);
+ TBM_ERR("fail to get appname for pid(%d)", pid);
fclose(fp);
return;
}
env = getenv("TBM_TRACE");
if (env) {
trace_mask = atoi(env);
- TBM_DBG("TBM_TRACE=%s\n", env);
+ TBM_DBG("TBM_TRACE=%s", env);
} else
trace_mask = 0;
#endif
_tbm_set_last_result(TBM_ERROR_NONE);
if (fd >= 0) {
- TBM_WRN("!!!!!WARNING:: The tbm_bufmgr_init DOSE NOT use argument fd ANYMORE.\n");
- TBM_WRN("!!!!!WARNING:: IT WILL BE CHANGED like tbm_bufmgr_init(int fd) --> tbm_bufmgr_init(void).\n");
+ TBM_WRN("!!!!!WARNING:: The tbm_bufmgr_init DOSE NOT use argument fd ANYMORE.");
+ TBM_WRN("!!!!!WARNING:: IT WILL BE CHANGED like tbm_bufmgr_init(int fd) --> tbm_bufmgr_init(void).");
}
/* initialize buffer manager */
if (gBufMgr) {
gBufMgr->ref_count++;
- TBM_DBG("reuse tbm_bufmgr(%p) ref_count(%d) fd(%d)\n", gBufMgr, gBufMgr->ref_count, gBufMgr->fd);
+ TBM_DBG("reuse tbm_bufmgr(%p) ref_count(%d) fd(%d)", gBufMgr, gBufMgr->ref_count, gBufMgr->fd);
pthread_mutex_unlock(&gLock);
return gBufMgr;
}
- TBM_DBG("bufmgr init\n");
+ TBM_DBG("bufmgr init");
/* allocate bufmgr */
gBufMgr = calloc(1, sizeof(struct _tbm_bufmgr));
if (!gBufMgr) {
- TBM_ERR("error: fail to alloc bufmgr fd(%d)\n", fd);
+ TBM_ERR("error: fail to alloc bufmgr fd(%d)", fd);
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
pthread_mutex_unlock(&gLock);
return NULL;
/* set the display_server flag before loading the backend module */
if (server) {
- TBM_INFO("The tbm_bufmgr(%p) is used by display server. Need to bind the native_display.\n", gBufMgr);
+ TBM_INFO("The tbm_bufmgr(%p) is used by display server. Need to bind the native_display.", gBufMgr);
gBufMgr->display_server = 1;
}
/* load bufmgr priv from env */
gBufMgr->module = tbm_module_load(gBufMgr->fd);
if (!gBufMgr->module) {
- TBM_ERR("error : Fail to load bufmgr backend\n");
+ TBM_ERR("error : Fail to load bufmgr backend");
_tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
free(gBufMgr);
gBufMgr = NULL;
gBufMgr->ref_count = 1;
- TBM_INFO("create tizen bufmgr:%p ref_count:%d\n",
+ TBM_INFO("create tizen bufmgr:%p ref_count:%d",
gBufMgr, gBufMgr->ref_count);
/* setup the bo_lock_type */
else
gBufMgr->bo_lock_type = TBM_BUFMGR_BO_LOCK_TYPE_ALWAYS;
- TBM_DBG("BUFMGR_LOCK_TYPE=%s\n", env ? env : "default:once");
+ TBM_DBG("BUFMGR_LOCK_TYPE=%s", env ? env : "default:once");
/* intialize bo_list */
LIST_INITHEAD(&gBufMgr->bo_list);
_tbm_set_last_result(TBM_ERROR_NONE);
if (!gBufMgr) {
- TBM_ERR("gBufmgr already destroy: bufmgr:%p\n", bufmgr);
+ TBM_ERR("gBufmgr already destroy: bufmgr:%p", bufmgr);
_tbm_bufmgr_mutex_unlock();
pthread_mutex_unlock(&gLock);
return;
bufmgr->ref_count--;
if (bufmgr->ref_count > 0) {
- TBM_DBG("reduce a ref_count(%d) of tbm_bufmgr(%p)\n", bufmgr->ref_count, bufmgr);
+ TBM_DBG("reduce a ref_count(%d) of tbm_bufmgr(%p)", bufmgr->ref_count, bufmgr);
_tbm_bufmgr_mutex_unlock();
pthread_mutex_unlock(&gLock);
return;
tbm_bo bo = NULL, tmp;
LIST_FOR_EACH_ENTRY_SAFE(bo, tmp, &bufmgr->bo_list, item_link) {
- TBM_ERR("Un-freed bo(%p, ref:%d)\n", bo, bo->ref_cnt);
+ TBM_ERR("Un-freed bo(%p, ref:%d)", bo, bo->ref_cnt);
_tbm_bo_free(bo);
}
LIST_DELINIT(&bufmgr->bo_list);
tbm_surface_h surf = NULL, tmp;
LIST_FOR_EACH_ENTRY_SAFE(surf, tmp, &bufmgr->surf_list, item_link) {
- TBM_ERR("Un-freed surf(%p, ref:%d)\n", surf, surf->refcnt);
+ TBM_ERR("Un-freed surf(%p, ref:%d)", surf, surf->refcnt);
tbm_surface_destroy(surf);
}
LIST_DELINIT(&bufmgr->surf_list);
if (bufmgr->fd > 0)
close(bufmgr->fd);
- TBM_INFO("destroy tbm_bufmgr(%p)\n", bufmgr);
+ TBM_INFO("destroy tbm_bufmgr(%p)", bufmgr);
free(bufmgr);
gBufMgr = NULL;
long pid = 0;
if (!TBM_BUFMGR_IS_VALID(bufmgr) || (bufmgr != gBufMgr)) {
- TBM_ERR("invalid bufmgr\n");
+ TBM_ERR("invalid bufmgr");
*error = TBM_ERROR_INVALID_PARAMETER;
return NULL;
}
str = malloc(len);
if (!str) {
- TBM_ERR("Fail to allocate the string.\n");
+ TBM_ERR("Fail to allocate the string.");
*error = TBM_ERROR_OUT_OF_MEMORY;
return NULL;
}
bufmgr_backend = calloc(1, sizeof(struct _tbm_bufmgr_backend));
if (!bufmgr_backend) {
- TBM_ERR("error: fail to allocate the bufmgr_backend\n");
+ TBM_ERR("error: fail to allocate the bufmgr_backend");
return NULL;
}
tbm_module *module = NULL;
if (!bufmgr) {
- TBM_ERR("error: fail to init tbm backend... bufmgr is null\n");
+ TBM_ERR("error: fail to init tbm backend... bufmgr is null");
return 0;
}
if (!backend) {
- TBM_ERR("error: fail to init tbm backend... backend is null\n");
+ TBM_ERR("error: fail to init tbm backend... backend is null");
return 0;
}
const char *value;
if (gBufMgr == NULL) {
- TBM_ERR("error: no gBufMgr.\n");
+ TBM_ERR("error: no gBufMgr.");
return 0;
}
display = wl_display_connect("tbm-drm-auth");
if (!display) {
- TBM_ERR("Failed to connect display\n");
+ TBM_ERR("Failed to connect display");
free(tbm_drm_client);
return 0;
wl_registry = wl_display_get_registry(display);
if (!wl_registry) {
- TBM_ERR("Failed to get registry\n");
+ TBM_ERR("Failed to get registry");
wl_display_disconnect(display);
free(tbm_drm_client);
wl_registry_add_listener(wl_registry, ®istry_listener, tbm_drm_client);
if (wl_display_roundtrip(display) < 0) { //For Gloabl registry
- TBM_ERR("Failed to wl_display_roundtrip for global registry\n");
+ TBM_ERR("Failed to wl_display_roundtrip for global registry");
wl_registry_destroy(wl_registry);
wl_display_disconnect(display);
free(tbm_drm_client);
}
if (!tbm_drm_client->wl_tbm_drm_auth) {
- TBM_ERR("Failed to get wl_tbm_drm_auth interface\n");
+ TBM_ERR("Failed to get wl_tbm_drm_auth interface");
wl_registry_destroy(wl_registry);
wl_display_disconnect(display);
free(tbm_drm_client);
wl_tbm_drm_auth_get_authentication_info(tbm_drm_client->wl_tbm_drm_auth);
if (wl_display_roundtrip(display) < 0) {
- TBM_ERR("Failed to wl_display_roundtrip get auth info\n");
+ TBM_ERR("Failed to wl_display_roundtrip get auth info");
wl_tbm_drm_auth_set_user_data(tbm_drm_client->wl_tbm_drm_auth, NULL);
wl_tbm_drm_auth_destroy(tbm_drm_client->wl_tbm_drm_auth);
wl_registry_destroy(wl_registry);
}
if (tbm_drm_client->auth_fd < 0) {
- TBM_ERR("Failed to get auth info\n");
+ TBM_ERR("Failed to get auth info");
wl_tbm_drm_auth_set_user_data(tbm_drm_client->wl_tbm_drm_auth, NULL);
wl_tbm_drm_auth_destroy(tbm_drm_client->wl_tbm_drm_auth);
wl_registry_destroy(wl_registry);
return;
if (fd < 0 || fd > fd_max) {
- TBM_ERR("%d out of fd range\n", fd);
+ TBM_ERR("%d out of fd range", fd);
return;
}
if (tbm_drm_fd != -1)
- TBM_WRN("already has TBM_DRM_FD: %d\n", tbm_drm_fd);
+ TBM_WRN("already has TBM_DRM_FD: %d", tbm_drm_fd);
tbm_drm_fd = fd;
- TBM_INFO("TBM_DRM_FD: %d\n", tbm_drm_fd);
+ TBM_INFO("TBM_DRM_FD: %d", tbm_drm_fd);
}
void
tbm_drm_helper_unset_fd(void)
{
tbm_drm_fd = -1;
- TBM_INFO("TBM_DRM_FD: %d\n", tbm_drm_fd);
+ TBM_INFO("TBM_DRM_FD: %d", tbm_drm_fd);
}
int
return -1;
}
- TBM_INFO("TBM_DRM_FD: %d\n", tbm_drm_fd);
+ TBM_INFO("TBM_DRM_FD: %d", tbm_drm_fd);
flags = fcntl(tbm_drm_fd, F_GETFD);
if (flags == -1) {
}
if (fcntl(new_fd, F_SETFD, flags|FD_CLOEXEC) == -1) {
- TBM_ERR("failed to set fd\n");
+ TBM_ERR("failed to set fd");
close(new_fd);
return -1;
}
- TBM_INFO("Return TBM_FD: %d\n", new_fd);
+ TBM_INFO("Return TBM_FD: %d", new_fd);
return new_fd;
}
fd = open(tbm_drm_auth_srv->device_name, O_RDWR);
if (fd != -1) {
if (fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC) == -1) {
- TBM_ERR("failed to set fd\n");
+ TBM_ERR("failed to set fd");
goto fini;
}
}
}
if (fd < 0) {
- TBM_ERR("failed to open drm : device_name, %s (%m)\n", tbm_drm_auth_srv->device_name);
+ TBM_ERR("failed to open drm : device_name, %s (%m)", tbm_drm_auth_srv->device_name);
wl_resource_post_error(resource, WL_TBM_DRM_AUTH_ERROR_AUTHENTICATE_FAIL,
"authenicate failed::open_drm");
if (drmGetMagic(fd, &magic) < 0) {
if (errno != EACCES) {
- TBM_ERR("failed to get magic\n");
+ TBM_ERR("failed to get magic");
wl_resource_post_error(resource, WL_TBM_DRM_AUTH_ERROR_AUTHENTICATE_FAIL,
"authenicate failed::get_magic");
}
if (drmAuthMagic(tbm_drm_auth_srv->fd, magic) < 0) {
- TBM_ERR("failed to authenticate magic\n");
+ TBM_ERR("failed to authenticate magic");
wl_resource_post_error(resource, WL_TBM_DRM_AUTH_ERROR_AUTHENTICATE_FAIL,
"authenicate failed::auth_magic");
buf = calloc(1, buf_len * sizeof(char));
if (!buf) {
- TBM_ERR("creating buffer failed\n");
+ TBM_ERR("creating buffer failed");
goto failed;
}
grp = calloc(1, sizeof(struct group));
if (!grp) {
- TBM_ERR("creating group failed\n");
+ TBM_ERR("creating group failed");
goto failed;
}
ret = getgrnam_r(name, grp, buf, buf_len, &grp_res);
if (ret < 0) {
- TBM_ERR("getgrnam_r failed errno:%d(%m)\n", ret);
+ TBM_ERR("getgrnam_r failed errno:%d(%m)", ret);
goto failed;
}
if (grp_res == NULL) {
- TBM_ERR("finding name:%s group failed\n", name);
+ TBM_ERR("finding name:%s group failed", name);
goto failed;
}
dir = getenv("XDG_RUNTIME_DIR");
if (!dir) {
- TBM_WRN("getting XDG_RUNTIME_DIR failed\n");
+ TBM_WRN("getting XDG_RUNTIME_DIR failed");
return;
}
ret = chmod(socket_path, 509);
if (ret < 0) {
- TBM_WRN("changing modes of socket file failed:%s (%m)\n", socket_path);
+ TBM_WRN("changing modes of socket file failed:%s (%m)", socket_path);
return;
}
ret = _tbm_getgrnam_r("root");
if (ret < 0) {
- TBM_WRN("getting uid failed\n");
+ TBM_WRN("getting uid failed");
return;
}
uid = ret;
ret = _tbm_getgrnam_r("display");
if (ret < 0) {
- TBM_WRN("getting gid failed\n");
+ TBM_WRN("getting gid failed");
return;
}
gid = ret;
ret = chown(socket_path, uid, gid);
if (ret < 0) {
- TBM_WRN("changing owner of socket file failed:%s (%m)\n", socket_path);
+ TBM_WRN("changing owner of socket file failed:%s (%m)", socket_path);
return;
}
}
return -1;
}
- TBM_INFO("TBM DRM MASTER FD: %d\n", fd);
+ TBM_INFO("TBM DRM MASTER FD: %d", fd);
flags = fcntl(fd, F_GETFD);
if (flags == -1) {
}
if (fcntl(new_fd, F_SETFD, flags|FD_CLOEXEC) == -1) {
- TBM_ERR("failed to set fd\n");
+ TBM_ERR("failed to set fd");
close(new_fd);
return -1;
}
- TBM_INFO("Return MASTER_FD: %d\n", new_fd);
+ TBM_INFO("Return MASTER_FD: %d", new_fd);
return new_fd;
}
return;
if (fd < 0 || fd > fd_max) {
- TBM_ERR("%d out of fd range\n", fd);
+ TBM_ERR("%d out of fd range", fd);
return;
}
if (tbm_drm_master_fd != -1)
- TBM_WRN("already has TBM DRM MASTER FD: %d\n", tbm_drm_master_fd);
+ TBM_WRN("already has TBM DRM MASTER FD: %d", tbm_drm_master_fd);
tbm_drm_master_fd = fd;
- TBM_INFO("TBM DRM MASTER FD: %d\n", tbm_drm_master_fd);
+ TBM_INFO("TBM DRM MASTER FD: %d", tbm_drm_master_fd);
}
void
tbm_drm_helper_unset_tbm_master_fd(void)
{
tbm_drm_master_fd = -1;
- TBM_INFO("TBM DRM MASTER FD: %d\n", tbm_drm_master_fd);
+ TBM_INFO("TBM DRM MASTER FD: %d", tbm_drm_master_fd);
}
int
if (!LIST_IS_EMPTY(&g_dummy_display_list)) {
LIST_FOR_EACH_ENTRY(tmp_dpy, &g_dummy_display_list, link) {
if (tmp_dpy == dummy_dpy) {
- TBM_INFO("tbm_dummy_display(%p)\n", dummy_dpy);
+ TBM_INFO("tbm_dummy_display(%p)", dummy_dpy);
return 1;
}
}
dpy = calloc(1, sizeof(struct _tbm_dummy_display));
if (!dpy) {
/* LCOV_EXCL_START */
- TBM_ERR("fail to allocate struct _tbm_dummy_display.\n");
+ TBM_ERR("fail to allocate struct _tbm_dummy_display.");
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
_tbm_dummy_display_mutex_unlock();
return NULL;
log_fl = fopen(fd_name, "a");
if (!log_fl) {
- TBM_ERR("failed: open file(%s)\n", fd_name);
+ TBM_ERR("failed: open file(%s)", fd_name);
return;
}
fflush(stdout);
stdout_fd = dup(STDOUT_FILENO);
if (stdout_fd < 0) {
- TBM_ERR("dup failed: %m\n");
+ TBM_ERR("dup failed: %m");
fclose(log_fl);
return;
}
backend_module_major = GET_ABI_MAJOR(data->abiversion);
backend_module_minor = GET_ABI_MINOR(data->abiversion);
- TBM_DBG("TBM module %s: vendor=\"%s\" ABI=%d,%d\n",
+ TBM_DBG("TBM module %s: vendor=\"%s\" ABI=%d,%d",
data->modname ? data->modname : "UNKNOWN!",
data->vendor ? data->vendor : "UNKNOWN!", backend_module_major, backend_module_minor);
tbm_backend_major = GET_ABI_MAJOR(TBM_ABI_VERSION);
tbm_backend_minor = GET_ABI_MINOR(TBM_ABI_VERSION);
- TBM_DBG("TBM ABI version %d.%d\n",
+ TBM_DBG("TBM ABI version %d.%d",
tbm_backend_major, tbm_backend_minor);
if (backend_module_major != tbm_backend_major) {
- TBM_ERR("TBM module ABI major ver(%d) doesn't match the TBM's ver(%d)\n",
+ TBM_ERR("TBM module ABI major ver(%d) doesn't match the TBM's ver(%d)",
backend_module_major, tbm_backend_major);
return 0;
} else if (backend_module_minor > tbm_backend_minor) {
- TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)\n",
+ TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)",
backend_module_minor, tbm_backend_minor);
return 0;
}
module_data = dlopen(path, RTLD_LAZY);
if (!module_data) {
- TBM_ERR("failed to load module: %s(%s)\n", dlerror(), file);
+ TBM_ERR("failed to load module: %s(%s)", dlerror(), file);
return 0;
}
backend_module_data = dlsym(module_data, "tbm_backend_module_data");
if (!backend_module_data) {
- TBM_ERR("Error: module does not have data object.\n");
+ TBM_ERR("Error: module does not have data object.");
goto err;
}
tbm_backend_major = GET_ABI_MAJOR(TBM_BACKEND_ABI_LATEST_VERSION);
tbm_backend_minor = GET_ABI_MINOR(TBM_BACKEND_ABI_LATEST_VERSION);
- TBM_INFO("TBM Backend ABI version %d.%d\n", tbm_backend_major, tbm_backend_minor);
+ TBM_INFO("TBM Backend ABI version %d.%d", tbm_backend_major, tbm_backend_minor);
backend_module_major = GET_ABI_MAJOR(backend_module_data->abi_version);
backend_module_minor = GET_ABI_MINOR(backend_module_data->abi_version);
- TBM_INFO("TBM module %s: vendor=\"%s\" Backend ABI version=%d.%d\n",
+ TBM_INFO("TBM module %s: vendor=\"%s\" Backend ABI version=%d.%d",
backend_module_data->name ? backend_module_data->name : "UNKNOWN!",
backend_module_data->vendor ? backend_module_data->vendor : "UNKNOWN!",
backend_module_major, backend_module_minor);
if (backend_module_major > tbm_backend_major) {
- TBM_ERR("TBM module ABI major ver(%d) is newer than the TBM's ver(%d)\n",
+ TBM_ERR("TBM module ABI major ver(%d) is newer than the TBM's ver(%d)",
backend_module_major, tbm_backend_major);
goto err;
} else if (backend_module_minor > tbm_backend_minor) {
- TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)\n",
+ TBM_ERR("TBM module ABI minor ver(%d) is newer than the TBM's ver(%d)",
backend_module_minor, tbm_backend_minor);
goto err;
}
if (!backend_module_data->init) {
- TBM_ERR("Error: module does not supply init symbol.\n");
+ TBM_ERR("Error: module does not supply init symbol.");
goto err;
}
if (!backend_module_data->deinit) {
- TBM_ERR("Error: module does not supply deinit symbol.\n");
+ TBM_ERR("Error: module does not supply deinit symbol.");
goto err;
}
bufmgr_data = backend_module_data->init((tbm_bufmgr)module, &error);
if (!bufmgr_data) {
- TBM_ERR("Fail to init module(%s)\n", file);
+ TBM_ERR("Fail to init module(%s)", file);
goto err;
}
module->backend_module_data = backend_module_data;
module->bufmgr_data = bufmgr_data;
- TBM_INFO("Success to load module(%s)\n", file);
+ TBM_INFO("Success to load module(%s)", file);
return 1;
module_data = dlopen(path, RTLD_LAZY);
if (!module_data) {
- TBM_ERR("failed to load module: %s(%s)\n", dlerror(), file);
+ TBM_ERR("failed to load module: %s(%s)", dlerror(), file);
return 0;
}
initdata = dlsym(module_data, "tbmModuleData");
if (!initdata) {
- TBM_ERR("Error: module does not have data object.\n");
+ TBM_ERR("Error: module does not have data object.");
goto err;
}
vers = initdata->vers;
if (!vers) {
- TBM_ERR("Error: module does not supply version information.\n");
+ TBM_ERR("Error: module does not supply version information.");
goto err;
}
init = initdata->init;
if (!init) {
- TBM_ERR("Error: module does not supply init symbol.\n");
+ TBM_ERR("Error: module does not supply init symbol.");
goto err;
}
if (!_check_version(vers)) {
- TBM_ERR("Fail to check version.\n");
+ TBM_ERR("Fail to check version.");
goto err;
}
if (!init((tbm_bufmgr)module, fd)) {
- TBM_ERR("Fail to init module(%s)\n", file);
+ TBM_ERR("Fail to init module(%s)", file);
goto err;
}
if (!module->backend || !module->backend->priv) {
- TBM_ERR("Error: module(%s) wrong operation. Check backend or backend's priv.\n", file);
+ TBM_ERR("Error: module(%s) wrong operation. Check backend or backend's priv.", file);
goto err;
}
module->module_data = module_data;
- TBM_DBG("Success to load module(%s)\n", file);
+ TBM_DBG("Success to load module(%s)", file);
return 1;
/* load backend_module from configured path */
n = scandir(BUFMGR_MODULE_DIR, &namelist, 0, alphasort);
if (n < 0) {
- TBM_ERR("no files : %s\n", BUFMGR_MODULE_DIR);
+ TBM_ERR("no files : %s", BUFMGR_MODULE_DIR);
tbm_module_unload(module);
return NULL;
}
if (hal_tbm_backend_has_drm_device(module->hal_backend, &ret)) {
int fd = tbm_drm_helper_get_fd(); // this must be the auth drm_fd.(master drm_fd);
if (fd < 0) {
- TBM_ERR("error: module(%p) native_display(%p)\n", module, native_display);
+ TBM_ERR("error: module(%p) native_display(%p)", module, native_display);
return TBM_ERROR_INVALID_OPERATION;
}
} else {
// make the wayland server socket for sending the authenticated drm_fd to wayland clients.
if (!tbm_drm_helper_wl_auth_server_init(native_display, fd, NULL, 0)) {
- TBM_ERR("error: tbm_drm_helper_wl_auth_server_init failed\n");
+ TBM_ERR("error: tbm_drm_helper_wl_auth_server_init failed");
close(fd);
return TBM_ERROR_INVALID_OPERATION;
}
int
tbm_surface_query_formats(uint32_t **formats, uint32_t *num)
{
- TBM_TRACE_SURFACE("\n");
+ TBM_TRACE_SURFACE(" ");
if (!tbm_surface_internal_query_supported_formats(formats, num))
return tbm_get_last_error();
tbm_surface_h
tbm_surface_create(int width, int height, tbm_format format)
{
- TBM_TRACE_SURFACE("width(%d) height(%d)\n", width, height);
+ TBM_TRACE_SURFACE("width(%d) height(%d)", width, height);
_tbm_set_last_result(TBM_ERROR_NONE);
int
tbm_surface_destroy(tbm_surface_h surface)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
int
tbm_surface_map(tbm_surface_h surface, int opt, tbm_surface_info_s *info)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
TBM_RETURN_VAL_IF_FAIL(info != NULL, TBM_SURFACE_ERROR_INVALID_PARAMETER);
int
tbm_surface_unmap(tbm_surface_h surface)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
int
tbm_surface_get_info(tbm_surface_h surface, tbm_surface_info_s *info)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
TBM_RETURN_VAL_IF_FAIL(surface, TBM_SURFACE_ERROR_INVALID_PARAMETER);
TBM_RETURN_VAL_IF_FAIL(info != NULL, TBM_SURFACE_ERROR_INVALID_PARAMETER);
int
tbm_surface_get_width(tbm_surface_h surface)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
int width = 0;
int
tbm_surface_get_height(tbm_surface_h surface)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
int height = 0;
tbm_format
tbm_surface_get_format(tbm_surface_h surface)
{
- TBM_TRACE_SURFACE("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE("tbm_surface(%p)", surface);
_tbm_set_last_result(TBM_ERROR_NONE);
/* check condition */
#define TBM_SURFACE_RETURN_IF_FAIL(cond) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_surface_mutex_unlock();\
return;\
#define TBM_SURFACE_RETURN_ERR_IF_FAIL(cond, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(error_type);\
_tbm_surface_mutex_unlock();\
return;\
#define TBM_SURFACE_RETURN_SET_ERR_IF_FAIL(cond, error, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
error = error_type;\
_tbm_set_last_result(error_type);\
_tbm_surface_mutex_unlock();\
#define TBM_SURFACE_RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_surface_mutex_unlock();\
return val;\
#define TBM_SURFACE_RETURN_VAL_ERR_IF_FAIL(cond, val, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(error_type);\
_tbm_surface_mutex_unlock();\
return val;\
#define TBM_SURFACE_RETURN_VAL_SET_ERR_IF_FAIL(cond, val, error, error_type) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
if (error)\
*error = error_type;\
_tbm_set_last_result(error_type);\
{
if (!surface) {
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
- TBM_ERR("error: No valid tbm_surface is NULL\n");
+ TBM_ERR("error: No valid tbm_surface is NULL");
return 0;
}
if (!_tbm_surface_internal_magic_check(surface)) {
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
- TBM_ERR("error: No valid tbm_surface(%p)\n", surface);
+ TBM_ERR("error: No valid tbm_surface(%p)", surface);
return 0;
}
LIST_FOR_EACH_ENTRY_SAFE(func_info, func_next, &surface->destroy_funcs, item_link) {
func_info->destroy_func(surface, func_info->user_data);
}
- TBM_DBG("free destroy_funcs %p\n", surface);
+ TBM_DBG("free destroy_funcs %p", surface);
LIST_FOR_EACH_ENTRY_SAFE(func_info, func_next, &surface->destroy_funcs, item_link) {
LIST_DEL(&func_info->item_link);
free(func_info);
/* destory the user_data_list */
if (!LIST_IS_EMPTY(&surface->user_data_list)) {
LIST_FOR_EACH_ENTRY_SAFE(old_data, tmp, &surface->user_data_list, item_link) {
- TBM_DBG("free user_data\n");
+ TBM_DBG("free user_data");
user_data_delete(old_data);
}
}
if (!g_surface_bufmgr) {
_init_surface_bufmgr();
if (!g_surface_bufmgr) {
- TBM_ERR("fail bufmgr initialization\n");
+ TBM_ERR("fail bufmgr initialization");
_tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
goto fail;
}
goto fail;
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_bufmgr(%p) format num(%u)\n", g_surface_bufmgr, *num);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_bufmgr(%p) format num(%u)", g_surface_bufmgr, *num);
if (bufmgr_initialized) {
LIST_DELINIT(&g_surface_bufmgr->surf_list);
}
_tbm_surface_mutex_unlock();
- TBM_ERR("error: tbm_bufmgr(%p)\n", g_surface_bufmgr);
+ TBM_ERR("error: tbm_bufmgr(%p)", g_surface_bufmgr);
return 0;
/* LCOV_EXCL_STOP */
num_planes = _tbm_surface_internal_get_num_planes(format);
if (!num_planes) {
- TBM_ERR("error: tbm_error(%s)\n", tbm_error_str(tbm_get_last_error()));
+ TBM_ERR("error: tbm_error(%s)", tbm_error_str(tbm_get_last_error()));
_tbm_surface_mutex_unlock();
return 0;
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) num_planes(%d)\n", _tbm_surface_internal_format_to_str(format), num_planes);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) num_planes(%d)", _tbm_surface_internal_format_to_str(format), num_planes);
_tbm_surface_mutex_unlock();
bpp = _tbm_surface_internal_get_bpp(format);
if (!bpp) {
- TBM_ERR("error: tbm_error(%s)\n", tbm_error_str(tbm_get_last_error()));
+ TBM_ERR("error: tbm_error(%s)", tbm_error_str(tbm_get_last_error()));
_tbm_surface_mutex_unlock();
return 0;
}
_tbm_surface_mutex_unlock();
- TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) bpp(%d)\n", _tbm_surface_internal_format_to_str(format), bpp);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_format(%s) bpp(%d)", _tbm_surface_internal_format_to_str(format), bpp);
return bpp;
}
if (!g_surface_bufmgr) {
_init_surface_bufmgr();
if (!g_surface_bufmgr) {
- TBM_ERR("fail bufmgr initialization\n");
+ TBM_ERR("fail bufmgr initialization");
error = TBM_ERROR_INVALID_OPERATION;
goto check_valid_fail;
}
bufmgr = g_surface_bufmgr;
if (!TBM_BUFMGR_IS_VALID(bufmgr)) {
- TBM_ERR("The bufmgr is invalid\n");
+ TBM_ERR("The bufmgr is invalid");
error = TBM_ERROR_INVALID_PARAMETER;
goto check_valid_fail;
}
goto surface_alloc_fail;
}
- TBM_TRACE_SURFACE_INTERNAL("width(%d) height(%d) format(%s) flags(%d) tbm_surface(%p)\n",
+ TBM_TRACE_SURFACE_INTERNAL("width(%d) height(%d) format(%s) flags(%d) tbm_surface(%p)",
width, height, _tbm_surface_internal_format_to_str(format), flags, surf);
LIST_INITHEAD(&surf->user_data_list);
_deinit_surface_bufmgr();
}
- TBM_ERR("error: width(%d) height(%d) format(%s) flags(%d)\n",
+ TBM_ERR("error: width(%d) height(%d) format(%s) flags(%d)",
width, height, _tbm_surface_internal_format_to_str(format), flags);
_tbm_set_last_result(error);
if (!g_surface_bufmgr) {
_init_surface_bufmgr();
if (!g_surface_bufmgr) {
- TBM_ERR("fail bufmgr initialization\n");
+ TBM_ERR("fail bufmgr initialization");
_tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
goto check_valid_fail;
}
bufmgr = g_surface_bufmgr;
if (!TBM_BUFMGR_IS_VALID(bufmgr)) {
- TBM_ERR("fail to validate the Bufmgr.\n");
+ TBM_ERR("fail to validate the Bufmgr.");
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
goto check_valid_fail;
}
surf = calloc(1, sizeof(struct _tbm_surface));
if (!surf) {
/* LCOV_EXCL_START */
- TBM_ERR("fail to allocate struct _tbm_surface.\n");
+ TBM_ERR("fail to allocate struct _tbm_surface.");
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
goto alloc_surf_fail;
/* LCOV_EXCL_STOP */
else {
surf->info.bpp = _tbm_surface_internal_get_bpp(info->format);
if (!surf->info.bpp) {
- TBM_ERR("fail to get bpp. error(%s)\n", tbm_error_str(tbm_get_last_error()));
+ TBM_ERR("fail to get bpp. error(%s)", tbm_error_str(tbm_get_last_error()));
goto bpp_fail;
}
}
int32_t bo_idx = 0;
if (!_tbm_surface_internal_query_plane_data(surf, i, &size, &offset, &stride, &bo_idx)) {
- TBM_ERR("fail to get plane_data. error(%s)\n", tbm_error_str(tbm_get_last_error()));
+ TBM_ERR("fail to get plane_data. error(%s)", tbm_error_str(tbm_get_last_error()));
goto plane_data_fail;
}
surf->info.planes[i].size = size;
surf->num_bos = num;
for (i = 0; i < num; i++) {
if (bos[i] == NULL) {
- TBM_ERR("bos[%d] is null.\n", i);
+ TBM_ERR("bos[%d] is null.", i);
_tbm_set_last_result(TBM_ERROR_INVALID_OPERATION);
goto check_bo_fail;
}
_tbm_bo_set_surface(bos[i], surf);
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u) height(%u) format(%s) bo_num(%d)\n", surf,
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u) height(%u) format(%s) bo_num(%d)", surf,
info->width, info->height, _tbm_surface_internal_format_to_str(info->format), num);
LIST_INITHEAD(&surf->user_data_list);
}
_tbm_surface_mutex_unlock();
- TBM_ERR("error: width(%u) height(%u) format(%s) bo_num(%d)\n",
+ TBM_ERR("error: width(%u) height(%u) format(%s) bo_num(%d)",
info->width, info->height,
_tbm_surface_internal_format_to_str(info->format), num);
/* LCOV_EXCL_STOP */
surface->refcnt--;
if (surface->refcnt > 0) {
- TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)\n", surface->refcnt, surface);
+ TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)", surface->refcnt, surface);
_tbm_surface_mutex_unlock();
return;
}
- TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)\n", surface, surface->refcnt);
+ TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)", surface, surface->refcnt);
if (surface->refcnt == 0)
_tbm_surface_internal_destroy(surface);
surface->refcnt++;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) refcnt(%d)\n", surface, surface->refcnt);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) refcnt(%d)", surface, surface->refcnt);
_tbm_surface_mutex_unlock();
}
surface->refcnt--;
if (surface->refcnt > 0) {
- TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)\n", surface->refcnt, surface);
+ TBM_TRACE_SURFACE_INTERNAL("reduce a refcnt(%d) of tbm_surface(%p)", surface->refcnt, surface);
_tbm_surface_mutex_unlock();
return;
}
- TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)\n", surface, surface->refcnt);
+ TBM_TRACE_SURFACE_INTERNAL("destroy tbm_surface(%p) refcnt(%d)", surface, surface->refcnt);
if (surface->refcnt == 0)
_tbm_surface_internal_destroy(surface);
if (!num)
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) num_bos(%d)\n", surface, num);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) num_bos(%d)", surface, num);
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
bo = surf->bos[bo_idx];
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) bo_idx(%d) tbm_bo(%p)\n", surface, bo_idx, bo);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) bo_idx(%d) tbm_bo(%p)", surface, bo_idx, bo);
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
size = surf->info.size;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) size(%u)\n", surface, size);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) size(%u)", surface, size);
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
if (plane_idx >= surf->info.num_planes) {
- TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) plane_idx(%d)\n", surface, plane_idx);
+ TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) plane_idx(%d)", surface, plane_idx);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_surface_mutex_unlock();
return 0;
if (pitch)
*pitch = surf->info.planes[plane_idx].stride;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) size(%u) offset(%u) pitch(%u)\n", surface, plane_idx,
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) size(%u) offset(%u) pitch(%u)", surface, plane_idx,
surf->info.planes[plane_idx].size, surf->info.planes[plane_idx].offset,
surf->info.planes[plane_idx].stride);
tbm_bo_unmap(bos[j]);
_tbm_set_last_result(error);
- TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+ TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)", surface, opt, map);
return 0;
}
}
for (i = 0; i < num_bos; i++) {
bo_handles[i] = tbm_bo_get_handle(bos[i], TBM_DEVICE_CPU);
if (bo_handles[i].ptr == NULL) {
- TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+ TBM_ERR("error: tbm_surface(%p) opt(%d) map(%d)", surface, opt, map);
_tbm_surface_mutex_unlock();
return 0;
}
info->planes[i].ptr = bo_handles[planes_bo_idx[i]].ptr + info->planes[i].offset;
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) opt(%d) map(%d)\n", surface, opt, map);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) opt(%d) map(%d)", surface, opt, map);
_tbm_surface_mutex_unlock();
for (i = 0; i < surf->num_bos; i++)
tbm_bo_unmap(surf->bos[i]);
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p)\n", surface);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p)", surface);
_tbm_surface_mutex_unlock();
}
surf = (struct _tbm_surface *)surface;
width = surf->info.width;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u)\n", surface, width);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) width(%u)", surface, width);
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
height = surf->info.height;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) height(%u)\n", surface, height);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) height(%u)", surface, height);
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
format = surf->info.format;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) format(%s)\n", surface, _tbm_surface_internal_format_to_str(format));
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) format(%s)", surface, _tbm_surface_internal_format_to_str(format));
_tbm_surface_mutex_unlock();
surf = (struct _tbm_surface *)surface;
bo_idx = surf->planes_bo_idx[plane_idx];
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) bo_idx(%d)\n", surface, plane_idx, bo_idx);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) plane_idx(%d) bo_idx(%d)", surface, plane_idx, bo_idx);
_tbm_surface_mutex_unlock();
/* check if the data according to the key exist if so, return false. */
data = user_data_lookup(&surface->user_data_list, key);
if (data) {
- TBM_TRACE_SURFACE_INTERNAL("warning: user data already exist tbm_surface(%p) key(%lu)\n", surface, key);
+ TBM_TRACE_SURFACE_INTERNAL("warning: user data already exist tbm_surface(%p) key(%lu)", surface, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_surface_mutex_unlock();
return 0;
data = user_data_create(key, data_free_func);
if (!data) {
- TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+ TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
_tbm_surface_mutex_unlock();
return 0;
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, data);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, data);
LIST_ADD(&data->item_link, &surface->user_data_list);
old_data = user_data_lookup(&surface->user_data_list, key);
if (!old_data) {
- TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+ TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_surface_mutex_unlock();
return 0;
old_data->data = data;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, old_data->data);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, old_data->data);
_tbm_surface_mutex_unlock();
TBM_SURFACE_RETURN_VAL_IF_FAIL(_tbm_surface_internal_is_valid(surface), 0);
if (!data) {
- TBM_ERR("error: tbm_surface(%p) key(%lu)\n", surface, key);
+ TBM_ERR("error: tbm_surface(%p) key(%lu)", surface, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_surface_mutex_unlock();
return 0;
old_data = user_data_lookup(&surface->user_data_list, key);
if (!old_data) {
- TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+ TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_surface_mutex_unlock();
return 0;
*data = old_data->data;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, old_data->data);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, old_data->data);
_tbm_surface_mutex_unlock();
old_data = user_data_lookup(&surface->user_data_list, key);
if (!old_data) {
- TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)\n", surface, key);
+ TBM_TRACE_SURFACE_INTERNAL("error: tbm_surface(%p) key(%lu)", surface, key);
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);
_tbm_surface_mutex_unlock();
return 0;
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)\n", surface, key, old_data->data);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%lu) data(%p)", surface, key, old_data->data);
user_data_delete(old_data);
} else {
debug_data = _tbm_surface_internal_debug_data_create(key, value);
if (!debug_data) {
- TBM_ERR("error: tbm_surface(%p) key(%s) value(%s)\n", surface, key, value);
+ TBM_ERR("error: tbm_surface(%p) key(%s) value(%s)", surface, key, value);
_tbm_surface_mutex_unlock();
return 0;
}
LIST_ADDTAIL(&debug_data->item_link, &bufmgr->debug_key_list);
}
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%s) value(%s)\n", surface, key, value);
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) key(%s) value(%s)", surface, key, value);
_tbm_surface_mutex_unlock();
unsigned int *blocks;
if (_tbm_surface_check_file_is_symbolic_link(file))
- TBM_ERR("%s is symbolic link\n", file);
+ TBM_ERR("%s is symbolic link", file);
fp = fopen(file, "w+");
TBM_RETURN_IF_FAIL(fp != NULL);
int depth = 8, y;
if (_tbm_surface_check_file_is_symbolic_link(file))
- TBM_ERR("%s is symbolic link\n", file);
+ TBM_ERR("%s is symbolic link", file);
fp = fopen(file, "wb");
TBM_RETURN_IF_FAIL(fp != NULL);
png_structp pPngStruct = png_create_write_struct(PNG_LIBPNG_VER_STRING,
NULL, NULL, NULL);
if (!pPngStruct) {
- TBM_ERR("fail to create a png write structure.\n");
+ TBM_ERR("fail to create a png write structure.");
fclose(fp);
return;
}
png_infop pPngInfo = png_create_info_struct(pPngStruct);
if (!pPngInfo) {
- TBM_ERR("fail to create a png info structure.\n");
+ TBM_ERR("fail to create a png info structure.");
png_destroy_write_struct(&pPngStruct, NULL);
fclose(fp);
return;
if (setjmp(png_jmpbuf(pPngStruct))) {
/* if png has problem of writing the file, we get here */
- TBM_ERR("fail to write png file.\n");
+ TBM_ERR("fail to write png file.");
png_destroy_write_struct(&pPngStruct, &pPngInfo);
fclose(fp);
return;
row_pointers = png_malloc(pPngStruct, height * sizeof(png_byte *));
if (!row_pointers) {
- TBM_ERR("fail to allocate the png row_pointers.\n");
+ TBM_ERR("fail to allocate the png row_pointers.");
png_destroy_write_struct(&pPngStruct, &pPngInfo);
fclose(fp);
return;
row = png_malloc(pPngStruct, sizeof(png_byte) * width * pixel_size);
if (!row) {
- TBM_ERR("fail to allocate the png row.\n");
+ TBM_ERR("fail to allocate the png row.");
for (x = 0; x < y; x++)
png_free(pPngStruct, row_pointers[x]);
png_free(pPngStruct, row_pointers);
/* check running */
if (g_dump_info) {
- TBM_WRN("waring already running the tbm_surface_internal_dump.\n");
+ TBM_WRN("waring already running the tbm_surface_internal_dump.");
return;
}
/* get buffer size */
tbm_surface = tbm_surface_create(w, h, TBM_FORMAT_ARGB8888);
if (tbm_surface == NULL) {
- TBM_ERR("tbm_surface_create fail\n");
+ TBM_ERR("tbm_surface_create fail");
free(g_dump_info);
g_dump_info = NULL;
return;
}
if (TBM_SURFACE_ERROR_NONE != tbm_surface_get_info(tbm_surface, &info)) {
- TBM_ERR("tbm_surface_get_info fail\n");
+ TBM_ERR("tbm_surface_get_info fail");
tbm_surface_destroy(tbm_surface);
free(g_dump_info);
g_dump_info = NULL;
bo = tbm_bo_alloc(g_surface_bufmgr, buffer_size, TBM_BO_DEFAULT);
if (bo == NULL) {
- TBM_ERR("fail to allocate the tbm_bo[%d]\n", i);
+ TBM_ERR("fail to allocate the tbm_bo[%d]", i);
free(buf_info);
goto fail;
}
scale_factor = 0.0;
- TBM_INFO("Dump Start.. path:%s, count:%d\n", g_dump_info->path, count);
+ TBM_INFO("Dump Start.. path:%s, count:%d", g_dump_info->path, count);
return;
}
}
- TBM_ERR("Dump Start fail.. path:%s\n", g_dump_info->path);
+ TBM_ERR("Dump Start fail.. path:%s", g_dump_info->path);
free(g_dump_info);
g_dump_info = NULL;
}
snprintf(file, sizeof(file), "%s/%s", g_dump_info->path, buf_info->name);
- TBM_INFO("Dump File.. %s generated.\n", file);
+ TBM_INFO("Dump File.. %s generated.", file);
if (buf_info->dirty) {
void *ptr1 = NULL, *ptr2 = NULL;
free(g_dump_info);
g_dump_info = NULL;
- TBM_INFO("Dump End..\n");
+ TBM_INFO("Dump End..");
}
static pixman_format_code_t
if ((info.format != TBM_FORMAT_ARGB8888) && (info.format != TBM_FORMAT_XRGB8888) &&
(info.format != TBM_FORMAT_ABGR8888) && (info.format != TBM_FORMAT_XBGR8888)) {
- TBM_WRN("Dump with scale skip. unsupported format(%s)\n",
+ TBM_WRN("Dump with scale skip. unsupported format(%s)",
_tbm_surface_internal_format_to_str(info.format));
tbm_surface_unmap(surface);
return;
buf_info->info.format = info.format;
buf_info->info.bpp = _tbm_surface_internal_get_bpp(buf_info->info.format);
if (!buf_info->info.bpp) {
- TBM_ERR("fail to get bpp. error(%s)\n", tbm_error_str(tbm_get_last_error()));
+ TBM_ERR("fail to get bpp. error(%s)", tbm_error_str(tbm_get_last_error()));
tbm_surface_unmap(surface);
return;
}
buf_info->info.size = buf_info->info.width * buf_info->info.height * bpp;
if (buf_info->info.size > buf_info->size) {
- TBM_WRN("Dump with scale skip. surface over created buffer size(%u, %d)\n",
+ TBM_WRN("Dump with scale skip. surface over created buffer size(%u, %d)",
buf_info->info.size, buf_info->size);
tbm_surface_unmap(surface);
return;
}
} else {
if (info.size > buf_info->size) {
- TBM_WRN("Dump skip. surface over created buffer size(%u, %d)\n",
+ TBM_WRN("Dump skip. surface over created buffer size(%u, %d)",
info.size, buf_info->size);
tbm_surface_unmap(surface);
return;
g_dump_info->link = next_link;
- TBM_INFO("Dump %s \n", buf_info->name);
+ TBM_INFO("Dump %s ", buf_info->name);
}
void tbm_surface_internal_dump_shm_buffer(void *ptr, int w, int h, int stride,
size = stride * h;
if (size > buf_info->size) {
- TBM_WRN("Dump skip. shm buffer over created buffer size(%d, %d)\n",
+ TBM_WRN("Dump skip. shm buffer over created buffer size(%d, %d)",
size, buf_info->size);
return;
}
g_dump_info->link = next_link;
- TBM_INFO("Dump %s \n", buf_info->name);
+ TBM_INFO("Dump %s ", buf_info->name);
}
int
tbm_surface_unmap(surface);
- TBM_TRACE_SURFACE_INTERNAL("Capture %s \n", file);
+ TBM_TRACE_SURFACE_INTERNAL("Capture %s ", file);
return 1;
}
_tbm_surface_internal_dump_file_png(file, ptr, w, h, stride, 0);
- TBM_TRACE_SURFACE_INTERNAL("Capture %s \n", file);
+ TBM_TRACE_SURFACE_INTERNAL("Capture %s ", file);
return 1;
}
surf->damage.width = width;
surf->damage.height = height;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)\n",
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)",
surface, x, y, width, height);
_tbm_surface_mutex_unlock();
if (width) *width = surf->damage.width;
if (height) *height = surf->damage.height;
- TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)\n",
+ TBM_TRACE_SURFACE_INTERNAL("tbm_surface(%p) x(%d) y(%d) width(%d) height(%d)",
surface, surf->damage.x, surf->damage.y, surf->damage.width, surf->damage.height);
_tbm_surface_mutex_unlock();
/* check condition */
#define TBM_SURF_QUEUE_RETURN_IF_FAIL(cond) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_surf_queue_mutex_unlock();\
return;\
#define TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(cond, val) {\
if (!(cond)) {\
- TBM_ERR("'%s' failed.\n", #cond);\
+ TBM_ERR("'%s' failed.", #cond);\
_tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER);\
_tbm_surf_queue_mutex_unlock();\
return val;\
_tbm_surface_queue_is_valid(tbm_surface_queue_h surface_queue)
{
if (!surface_queue) {
- TBM_ERR("error: surface_queue is NULL.\n");
+ TBM_ERR("error: surface_queue is NULL.");
return 0;
}
if (!_tbm_surface_queue_magic_check(surface_queue)) {
- TBM_ERR("error: Invalid tbm_surface_queue(%p)\n", surface_queue);
+ TBM_ERR("error: Invalid tbm_surface_queue(%p)", surface_queue);
return 0;
}
}
}
- TBM_ERR("fail to get the queue_node.\n");
+ TBM_ERR("fail to get the queue_node.");
return NULL;
}
}
}
- TBM_ERR("Cannot find notifiy\n");
+ TBM_ERR("Cannot find notifiy");
}
static void
}
}
- TBM_ERR("Cannot find notifiy\n");
+ TBM_ERR("Cannot find notifiy");
}
static void
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_add(&surface_queue->destory_noti, destroy_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_remove(&surface_queue->destory_noti, destroy_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_add(&surface_queue->dequeuable_noti, dequeuable_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_remove(&surface_queue->dequeuable_noti, dequeuable_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_add(&surface_queue->dequeue_noti, dequeue_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_remove(&surface_queue->dequeue_noti, dequeue_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_add(&surface_queue->can_dequeue_noti, can_dequeue_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_remove(&surface_queue->can_dequeue_noti, can_dequeue_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_add(&surface_queue->acquirable_noti, acquirable_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_remove(&surface_queue->acquirable_noti, acquirable_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_trace_add(&surface_queue->trace_noti, trace_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_trace_remove(&surface_queue->trace_noti, trace_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (surface_queue->alloc_cb2) {
TBM_ERR("must use either alloc_cb or alloc_cb2");
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (surface_queue->alloc_cb) {
TBM_ERR("must use either alloc_cb or alloc_cb2");
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
width = surface_queue->width;
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
height = surface_queue->height;
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
format = surface_queue->format;
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue), 0);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
queue_size = surface_queue->queue_size;
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_add(&surface_queue->reset_noti, reset_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_notify_remove(&surface_queue->reset_noti, reset_cb, data);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
node = _queue_get_node(surface_queue, 0, surface, &queue_type);
if (node == NULL || queue_type != NODE_LIST) {
- TBM_ERR("tbm_surface_queue_enqueue::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+ TBM_ERR("tbm_surface_queue_enqueue::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
node, queue_type);
pthread_mutex_unlock(&surface_queue->lock);
_tbm_surface_queue_enqueue(surface_queue, node, 1);
if (!_queue_get_node(surface_queue, DIRTY_QUEUE, surface, NULL)) {
- TBM_ERR("enqueue surface(%p) but surface isn't present in the dirty_queue\n", surface);
+ TBM_ERR("enqueue surface(%p) but surface isn't present in the dirty_queue", surface);
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SEQUENCE);
pthread_mutex_unlock(&surface_queue->lock);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
node = _queue_get_node(surface_queue, 0, surface, &queue_type);
if (node == NULL || queue_type != NODE_LIST) {
- TBM_ERR("tbm_surface_queue_cancel_dequeue::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+ TBM_ERR("tbm_surface_queue_cancel_dequeue::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
node, queue_type);
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE);
pthread_mutex_unlock(&surface_queue->lock);
}
if (node->delete_pending) {
- TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+ TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
_queue_delete_node(surface_queue, node);
}
if (surface_queue->queue_size < surface_queue->num_attached) {
- TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+ TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
if (surface_queue->impl && surface_queue->impl->need_detach)
surface_queue->impl->need_detach(surface_queue, node);
_tbm_surface_queue_release(surface_queue, node, 1);
if (_queue_is_empty(&surface_queue->free_queue)) {
- TBM_ERR("surface_queue->free_queue is empty.\n");
+ TBM_ERR("surface_queue->free_queue is empty.");
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE);
pthread_mutex_unlock(&surface_queue->lock);
node = _tbm_surface_queue_dequeue(surface_queue);
if (node == NULL || node->surface == NULL) {
- TBM_ERR("_queue_node_pop_front failed\n");
+ TBM_ERR("_queue_node_pop_front failed");
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_EMPTY);
pthread_mutex_unlock(&surface_queue->lock);
node->type = QUEUE_NODE_TYPE_DEQUEUE;
*surface = node->surface;
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, *surface);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, *surface);
pthread_mutex_unlock(&surface_queue->lock);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (_queue_is_empty(&surface_queue->free_queue)) {
if (surface_queue->impl && surface_queue->impl->need_attach)
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (_queue_is_empty(&surface_queue->free_queue)) {
if (surface_queue->impl && surface_queue->impl->need_attach)
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
node = _queue_get_node(surface_queue, 0, surface, &queue_type);
if (node == NULL || queue_type != NODE_LIST) {
- TBM_ERR("tbm_surface_queue_release::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+ TBM_ERR("tbm_surface_queue_release::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
node, queue_type);
pthread_mutex_unlock(&surface_queue->lock);
}
if (node->delete_pending) {
- TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+ TBM_TRACE_SURFACE_QUEUE("delete pending tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
_queue_delete_node(surface_queue, node);
}
if (surface_queue->queue_size < surface_queue->num_attached) {
- TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+ TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
if (surface_queue->impl && surface_queue->impl->need_detach)
surface_queue->impl->need_detach(surface_queue, node);
_tbm_surface_queue_release(surface_queue, node, 1);
if (!_queue_get_node(surface_queue, FREE_QUEUE, surface, NULL)) {
- TBM_ERR("release surface(%p) but surface isn't present in the free_queue\n", surface);
+ TBM_ERR("release surface(%p) but surface isn't present in the free_queue", surface);
_tbm_set_last_result(TBM_SURFACE_ERROR_INVALID_OPERATION);
pthread_mutex_unlock(&surface_queue->lock);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, surface);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, surface);
node = _queue_get_node(surface_queue, 0, surface, &queue_type);
if (node == NULL || queue_type != NODE_LIST) {
- TBM_ERR("tbm_surface_queue_cancel_acquire::Surface is existed in free_queue or dirty_queue node:%p, type:%d\n",
+ TBM_ERR("tbm_surface_queue_cancel_acquire::Surface is existed in free_queue or dirty_queue node:%p, type:%d",
node, queue_type);
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST);
pthread_mutex_unlock(&surface_queue->lock);
_tbm_surface_queue_enqueue(surface_queue, node, 1);
if (_queue_is_empty(&surface_queue->dirty_queue)) {
- TBM_ERR("enqueue surface but queue is empty node:%p\n", node);
+ TBM_ERR("enqueue surface but queue is empty node:%p", node);
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE);
pthread_mutex_unlock(&surface_queue->lock);
node = _tbm_surface_queue_acquire(surface_queue);
if (node == NULL || node->surface == NULL) {
- TBM_ERR("_queue_node_pop_front failed\n");
+ TBM_ERR("_queue_node_pop_front failed");
_tbm_set_last_result(TBM_SURFACE_QUEUE_ERROR_EMPTY);
pthread_mutex_unlock(&surface_queue->lock);
if (surface_queue->acquire_sync_count > 0) surface_queue->acquire_sync_count--;
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)\n", surface_queue, *surface);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) tbm_surface(%p)", surface_queue, *surface);
pthread_mutex_unlock(&surface_queue->lock);
pthread_mutex_lock(&surface_queue->lock);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (!_queue_is_empty(&surface_queue->dirty_queue)) {
pthread_mutex_unlock(&surface_queue->lock);
TBM_SURF_QUEUE_RETURN_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue));
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
surface_queue->magic = 0;
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue),
TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (width == surface_queue->width && height == surface_queue->height &&
format == surface_queue->format) {
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(queue_size > 0,
TBM_ERROR_INVALID_PARAMETER);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if ((surface_queue->queue_size == queue_size) && !flush) {
_tbm_surf_queue_mutex_unlock();
int need_del = surface_queue->queue_size - queue_size;
LIST_FOR_EACH_ENTRY_SAFE(node, tmp, &surface_queue->free_queue.head, item_link) {
- TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)\n", surface_queue, node->surface);
+ TBM_TRACE_SURFACE_QUEUE("deatch tbm_surface_queue(%p) surface(%p)", surface_queue, node->surface);
if (surface_queue->impl && surface_queue->impl->need_detach)
surface_queue->impl->need_detach(surface_queue, node);
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue),
TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (surface_queue->num_attached == 0) {
_tbm_surf_queue_mutex_unlock();
TBM_SURF_QUEUE_RETURN_VAL_IF_FAIL(_tbm_surface_queue_is_valid(surface_queue),
TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE);
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
if (surface_queue->num_attached == 0) {
_tbm_surf_queue_mutex_unlock();
tbm_surface_queue_h surface_queue = (tbm_surface_queue_h) calloc(1,
sizeof(struct _tbm_surface_queue));
if (!surface_queue) {
- TBM_ERR("cannot allocate the surface_queue.\n");
+ TBM_ERR("cannot allocate the surface_queue.");
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
_tbm_surf_queue_mutex_unlock();
return NULL;
}
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
_tbm_surface_queue_init(surface_queue,
queue_size,
tbm_surface_queue_h surface_queue = (tbm_surface_queue_h) calloc(1,
sizeof(struct _tbm_surface_queue));
if (surface_queue == NULL) {
- TBM_ERR("cannot allocate the surface_queue.\n");
+ TBM_ERR("cannot allocate the surface_queue.");
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
_tbm_surf_queue_mutex_unlock();
return NULL;
}
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)\n", surface_queue);
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p)", surface_queue);
tbm_queue_sequence *data = (tbm_queue_sequence *) calloc(1,
sizeof(tbm_queue_sequence));
if (data == NULL) {
- TBM_ERR("cannot allocate the tbm_queue_sequence.\n");
+ TBM_ERR("cannot allocate the tbm_queue_sequence.");
_tbm_set_last_result(TBM_ERROR_OUT_OF_MEMORY);
free(surface_queue);
_tbm_surf_queue_mutex_unlock();
else
surface_queue->enqueue_sync_count = dequeue_num + sync_count;
- TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) enqueue_sync_count:(%d) acquire_sync_count:(%d)\n",
+ TBM_TRACE_SURFACE_QUEUE("tbm_surface_queue(%p) enqueue_sync_count:(%d) acquire_sync_count:(%d)",
surface_queue, surface_queue->enqueue_sync_count, surface_queue->acquire_sync_count);
pthread_mutex_unlock(&surface_queue->lock);
char buf[ERRNO_BUF_SIZE];
if (strerror_r(errnum, buf, ERRNO_BUF_SIZE) == 0) {
- TBM_ERR("errno : %d(%s)\n", errnum, buf);
+ TBM_ERR("errno : %d(%s)", errnum, buf);
return;
} else {
- TBM_ERR("errno : %d()\n", errnum);
+ TBM_ERR("errno : %d()", errnum);
return;
}
}