#define CLIENT_QUEUE_SIZE 3
#define VK_CLIENT_QUEUE_SIZE 3
+/* backend name will be optimized */
+#define BACKEND "WL_VK_GL"
+
typedef struct _twe_wl_disp_source twe_wl_disp_source;
typedef struct _twe_wl_surf_source twe_wl_surf_source;
typedef struct _twe_wl_buffer_info twe_wl_buffer_info;
{
twe_del_source *del_source = (twe_del_source *)source;
- TPL_LOG_T("WL_EGL", "gsource(%p) event_fd(%d)",
+ TPL_LOG_T(BACKEND, "gsource(%p) event_fd(%d)",
source, del_source->event_fd);
close(del_source->event_fd);
{
twe_tdm_source *tdm_source = (twe_tdm_source *)source;
- TPL_LOG_T("WL_EGL", "tdm_destroy| tdm_source(%p) tdm_client(%p)",
+ TPL_LOG_T(BACKEND, "tdm_destroy| tdm_source(%p) tdm_client(%p)",
tdm_source, tdm_source->tdm_client);
if (tdm_source->tdm_client) {
tdm_fd,
G_IO_IN);
- TPL_LOG_T("WL_EGL", "TPL_WAIT_VBLANK:DEFAULT_ENABLED");
- TPL_LOG_T("WL_EGL", "tdm_source(%p) tdm_client(%p) tdm_fd(%d)",
+ TPL_LOG_T(BACKEND, "TPL_WAIT_VBLANK:DEFAULT_ENABLED");
+ TPL_LOG_T(BACKEND, "tdm_source(%p) tdm_client(%p) tdm_fd(%d)",
tdm_source, client, tdm_fd);
return tdm_source;
thread->ctx = _twe_ctx;
_twe_ctx->ref_cnt++;
- TPL_LOG_T("WL_EGL", "_twe_ctx(%p) twe_thread(%p)", _twe_ctx, thread);
+ TPL_LOG_T(BACKEND, "_twe_ctx(%p) twe_thread(%p)", _twe_ctx, thread);
return thread;
}
_twe_ctx = NULL;
}
- TPL_LOG_T("WL_EGL", "[THREAD DESTROY] twe_thread(%p)", thread);
+ TPL_LOG_T(BACKEND, "[THREAD DESTROY] twe_thread(%p)", thread);
thread->ctx = NULL;
free(thread);
{
twe_wl_disp_source *disp_source = (twe_wl_disp_source *)source;
- TPL_LOG_T("WL_EGL", "finalize| disp_source(%p)", disp_source);
+ TPL_LOG_T(BACKEND, "finalize| disp_source(%p)", disp_source);
__tpl_object_fini(&disp_source->obj);
wl_proxy_set_queue(wl_tbm, ev_queue);
- TPL_LOG_T("WL_EGL", "wl_tbm_client init| wl_tbm_client(%p)", wl_tbm_client);
+ TPL_LOG_T(BACKEND, "wl_tbm_client init| wl_tbm_client(%p)", wl_tbm_client);
return wl_tbm_client;
}
wl_proxy_set_queue(wl_tbm, NULL);
}
- TPL_LOG_T("WL_EGL", "wl_tbm_client deinit| wl_tbm_client(%p)", wl_tbm_client);
+ TPL_LOG_T(BACKEND, "wl_tbm_client deinit| wl_tbm_client(%p)", wl_tbm_client);
wayland_tbm_client_deinit(wl_tbm_client);
}
wl_proxy_set_queue((struct wl_proxy *)disp_source->tss,
NULL);
- TPL_LOG_T("WL_EGL", "tizen_surface_shm(%p) init.", disp_source->tss);
+ TPL_LOG_T(BACKEND, "tizen_surface_shm(%p) init.", disp_source->tss);
fini:
if (queue)
_twe_display_shm_fini(twe_wl_disp_source *disp_source)
{
if (disp_source->tss) {
- TPL_LOG_T("WL_EGL", "tizen_surface_shm(%p) fini.", disp_source->tss);
+ TPL_LOG_T(BACKEND, "tizen_surface_shm(%p) fini.", disp_source->tss);
tizen_surface_shm_destroy(disp_source->tss);
disp_source->tss = NULL;
}
_twe_display_vk_fini(twe_wl_disp_source *disp_source)
{
if (disp_source->wl_vk_client) {
- TPL_LOG_T("WL_VK", "wl_vk_client(%p) fini.", disp_source->wl_vk_client);
+ TPL_LOG_T(BACKEND, "wl_vk_client(%p) fini.", disp_source->wl_vk_client);
wayland_vulkan_destroy(disp_source->wl_vk_client);
}
}
wl_event_queue_destroy(disp_source->ev_queue);
TPL_OBJECT_UNLOCK(&disp_source->obj);
- TPL_LOG_T("WL_EGL", "[DEL] twe_display(%p) wl_display(%p)",
+ TPL_LOG_T(BACKEND, "[DEL] twe_display(%p) wl_display(%p)",
disp_source, disp_source->disp);
g_source_remove_poll(&disp_source->gsource, &disp_source->gfd);
g_source_add_poll(&source->gsource, &source->gfd);
g_source_attach(&source->gsource, g_main_loop_get_context(ctx->twe_loop));
- TPL_LOG_T("WL_EGL", "add| gsource(%p) ev_queue(%p) wl_display(%p)",
+ TPL_LOG_T(BACKEND, "add| gsource(%p) ev_queue(%p) wl_display(%p)",
source, source->ev_queue, display);
return (twe_display_h)source;
twe_wl_surf_source *surf_source = (twe_wl_surf_source *)private;
if (surf_source) {
- TPL_LOG_T("WL_EGL", "[DESTROY_CB] wl_egl_window(%p) surf_source(%p)",
+ TPL_LOG_T(BACKEND, "[DESTROY_CB] wl_egl_window(%p) surf_source(%p)",
surf_source->wl_egl_window, surf_source);
TPL_OBJECT_LOCK(&surf_source->obj);
surf_source->wl_egl_window->private = NULL;
req_w = wl_egl_window->width;
req_h = wl_egl_window->height;
- TPL_LOG_T("WL_EGL", "[RESIZE_CB] wl_egl_window(%p) (%dx%d) -> (%dx%d)",
+ TPL_LOG_T(BACKEND, "[RESIZE_CB] wl_egl_window(%p) (%dx%d) -> (%dx%d)",
wl_egl_window, cur_w, cur_h, req_w, req_h);
if (tbm_surface_queue_reset(source->tbm_queue, req_w, req_h, format)
int rotation = wl_egl_window->rotation;
twe_wl_surf_source *source = (twe_wl_surf_source *)private;
- TPL_LOG_T("WL_EGL", "[ROTATE_CB] wl_egl_window(%p) (%d) -> (%d)",
+ TPL_LOG_T(BACKEND, "[ROTATE_CB] wl_egl_window(%p) (%d) -> (%d)",
wl_egl_window, source->rotation, rotation);
source->rotation = rotation;
twe_wl_disp_source *disp_source = surf_source->disp_source;
int ret;
- TPL_LOG_T("WL_EGL", "[FLUSH_CB] surf_source(%p)", surf_source);
+ TPL_LOG_T(BACKEND, "[FLUSH_CB] surf_source(%p)", surf_source);
/*First distach pending queue for TPL
- dispatch buffer-release
twe_wl_disp_source *disp_source = surf_source->disp_source;
int ret;
- TPL_LOG_T("WL_EGL", "[FREE_FLUSH_CB] surf_source(%p)", surf_source);
+ TPL_LOG_T(BACKEND, "[FREE_FLUSH_CB] surf_source(%p)", surf_source);
/* First distach panding queue for TPL
- dispatch buffer-release
twe_wl_surf_source *surf_source = buf_info->surf_source;
twe_wl_disp_source *disp_source = surf_source->disp_source;
- TPL_LOG_T("WL_EGL", "[FREE] twe_buffer(%p) wl_buffer(%p)",
+ TPL_LOG_T(BACKEND, "[FREE] twe_buffer(%p) wl_buffer(%p)",
buf_info, buf_info->wl_buffer);
wl_display_flush(disp_source->disp);
TPL_OBJECT_UNLOCK(&surf_source->obj);
}
- TPL_LOG_T("WL_EGL", "[REL] wl_buffer(%p) tbm_surface(%p) bo(%d)",
+ TPL_LOG_T(BACKEND, "[REL] wl_buffer(%p) tbm_surface(%p) bo(%d)",
buf_info->wl_buffer, tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
tbm_surface_internal_unref(tbm_surface);
TPL_OBJECT_UNLOCK(&surf_source->obj);
}
- TPL_LOG_T("WL_EGL",
+ TPL_LOG_T(BACKEND,
"[REUSE_BUF] buf_info(%p) tbm_surface(%p) bo(%d) (%dx%d) transform(%d)",
buf_info, tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)),
TPL_OBJECT_UNLOCK(&surf_source->obj);
}
- TPL_LOG_T("WL_EGL",
+ TPL_LOG_T(BACKEND,
"[NEW_BUF] buf_info(%p) tbm_surface(%p) bo(%d) (%dx%d) transform(%d)",
buf_info, tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)),
return;
}
- TPL_LOG_T("WL_EGL",
+ TPL_LOG_T(BACKEND,
"[CANCEL_BUFFER] Stop tracking of canceled tbm_surface(%p)",
tbm_surface);
__cb_tbm_queue_reset_callback(tbm_surface_queue_h tbm_queue,
void *data)
{
- TPL_LOG_T("WL_EGL", "tbm_queue(%p) has been reset!", tbm_queue);
+ TPL_LOG_T(BACKEND, "tbm_queue(%p) has been reset!", tbm_queue);
}
static void
buf_info->sync_timestamp++;
- TPL_LOG_T("WL_VK", "[COMMIT] wl_buffer(%p) tbm_surface(%p) bo(%d)",
+ TPL_LOG_T(BACKEND, "[COMMIT] wl_buffer(%p) tbm_surface(%p) bo(%d)",
buf_info->wl_buffer, tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
buf_info->need_to_commit = TPL_FALSE;
- TPL_LOG_T("WL_EGL", "[COMMIT] wl_buffer(%p) tbm_surface(%p) bo(%d)",
+ TPL_LOG_T(BACKEND, "[COMMIT] wl_buffer(%p) tbm_surface(%p) bo(%d)",
buf_info->wl_buffer, tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
}
if (!disp_source->is_vulkan_dpy && !surf_source->vblank_done) {
- TPL_LOG_T("WL_EGL", "[ACQ_skip] It will be acquired next vblank.");
+ TPL_LOG_T(BACKEND, "[ACQ_skip] It will be acquired next vblank.");
TPL_OBJECT_UNLOCK(&surf_source->obj);
return;
}
}
if (!disp_source->is_vulkan_dpy) { /* wayland_egl */
- TPL_LOG_T("WL_EGL", "[ACQ] tbm_surface(%p) bo(%d)",
+ TPL_LOG_T(BACKEND, "[ACQ] tbm_surface(%p) bo(%d)",
tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)));
case TPL_DISPLAY_PRESENT_MODE_MAILBOX:
if (surf_source->draw_done_buffer) {
g_mutex_lock(&surf_source->free_queue_mutex);
- TPL_LOG_T("WL_VK", "[SKIP] tbm_surface(%p) bo(%d)",
+ TPL_LOG_T(BACKEND, "[SKIP] tbm_surface(%p) bo(%d)",
tbm_surface,
tbm_bo_export(tbm_surface_internal_get_bo(
tbm_surface, 0)));
{
twe_wl_surf_source *surf_source = (twe_wl_surf_source *)source;
- TPL_LOG_T("WL_EGL", "gsource(%p) event_fd(%d)",
+ TPL_LOG_T(BACKEND, "gsource(%p) event_fd(%d)",
source, surf_source->event_fd);
close(surf_source->event_fd);
tizen_surface_shm_flusher_add_listener(surf_source->tss_flusher,
&tss_flusher_listener,
surf_source);
- TPL_LOG_T("WL_EGL",
+ TPL_LOG_T(BACKEND,
"tss_flusher init. surf_source(%p) tss_flusher(%p)",
surf_source, surf_source->tss_flusher);
}
_twe_surface_buffer_flusher_fini(twe_wl_surf_source *surf_source)
{
if (surf_source->tss_flusher) {
- TPL_LOG_T("WL_EGL",
+ TPL_LOG_T(BACKEND,
"tss_flusher fini. surf_source(%p) tss_flusher(%p)",
surf_source, surf_source->tss_flusher);
tizen_surface_shm_flusher_destroy(surf_source->tss_flusher);
tdm_client_vblank_set_enable_fake(vblank, 1);
tdm_client_vblank_set_sync(vblank, 0);
- TPL_LOG_T("WL_EGL", "[VBLANK INIT] vblank(%p)", vblank);
+ TPL_LOG_T(BACKEND, "[VBLANK INIT] vblank(%p)", vblank);
return vblank;
}
}
if (surf_source->vblank) {
- TPL_LOG_T("WL_EGL", "[VBLANK FINI] twe_wl_surf_source(%p) vblank(%p)",
+ TPL_LOG_T(BACKEND, "[VBLANK FINI] twe_wl_surf_source(%p) vblank(%p)",
surf_source, surf_source->vblank);
tdm_client_vblank_destroy(surf_source->vblank);
}
surf_source->rotate_cb = NULL;
if (surf_source->wl_egl_window) {
- TPL_LOG_T("WL_EGL", "twe_surface(%p) wl_egl_window(%p) wl_surface(%p)",
+ TPL_LOG_T(BACKEND, "twe_surface(%p) wl_egl_window(%p) wl_surface(%p)",
surf_source, surf_source->wl_egl_window, surf_source->surf);
surf_source->wl_egl_window->destroy_window_callback = NULL;
surf_source->wl_egl_window->resize_callback = NULL;
g_mutex_init(&source->free_queue_mutex);
g_cond_init(&source->free_queue_cond);
- TPL_LOG_T("WL_EGL",
+ TPL_LOG_T(BACKEND,
"gsource(%p) native_handle(%p) wl_surface(%p) event_fd(%d)",
source, native_handle, source->surf, source->event_fd);
return TPL_ERROR_INVALID_PARAMETER;
}
- TPL_LOG_T("WL_EGL", "twe_surface(%p) will be destroyed in thread",
+ TPL_LOG_T(BACKEND, "twe_surface(%p) will be destroyed in thread",
twe_surface);
surf_del_source = surf_source->surf_del_source;
surf_source->swapchain_properties.present_mode = present_mode;
surf_source->swapchain_properties.buffer_count = buffer_count;
- TPL_LOG_T("WL_VK", "[SWAPCHAIN_CREATE][1/2] twe_surface(%p) tbm_queue(%p)",
+ TPL_LOG_T(BACKEND, "[SWAPCHAIN_CREATE][1/2] twe_surface(%p) tbm_queue(%p)",
twe_surface, surf_source->tbm_queue);
- TPL_LOG_T("WL_VK",
+ TPL_LOG_T(BACKEND,
"[SWAPCHAIN_CREATE][2/2] w(%d) h(%d) f(%d) p(%d) b_cnt(%d)",
width, height, format, present_mode, buffer_count);
return TPL_ERROR_INVALID_PARAMETER;
}
- TPL_LOG_T("WL_VK", "[SWAPCHAIN_DESTROY] twe_surface(%p) tbm_queue(%p)",
+ TPL_LOG_T(BACKEND, "[SWAPCHAIN_DESTROY] twe_surface(%p) tbm_queue(%p)",
twe_surface, surf_source->tbm_queue);
if (surf_source->tbm_queue) {
return;
}
- TPL_LOG_T("WL_EGL", "twe_surface(%p) rotation capability set to [%s]",
+ TPL_LOG_T(BACKEND, "twe_surface(%p) rotation capability set to [%s]",
source, (set ? "TRUE" : "FALSE"));
source->rotation_capability = set;