summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
be51392)
Change-Id: I6d3b6c7aa7b5289fb1b91a9c3f9cb563499fabd4
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
typedef enum surf_message {
NONE_MESSAGE = 0,
typedef enum surf_message {
NONE_MESSAGE = 0,
- INIT_SURFACE,
- CREATE_QUEUE,
- DESTROY_QUEUE,
- ACQUIRABLE,
+ INIT_SURFACE = 1,
+ ACQUIRABLE = 2,
+ CREATE_QUEUE = 4,
+ DESTROY_QUEUE = 8,
} surf_message;
struct _tpl_wl_vk_surface {
} surf_message;
struct _tpl_wl_vk_surface {
wl_vk_surface = (tpl_wl_vk_surface_t *)tpl_gsource_get_data(gsource);
tpl_gmutex_lock(&wl_vk_surface->surf_mutex);
wl_vk_surface = (tpl_wl_vk_surface_t *)tpl_gsource_get_data(gsource);
tpl_gmutex_lock(&wl_vk_surface->surf_mutex);
- if (message == INIT_SURFACE) { /* Initialize surface */
+ if (message & INIT_SURFACE) { /* Initialize surface */
TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) initialize message received!",
wl_vk_surface);
_thread_wl_vk_surface_init(wl_vk_surface);
wl_vk_surface->initialized_in_thread = TPL_TRUE;
tpl_gcond_signal(&wl_vk_surface->surf_cond);
TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) initialize message received!",
wl_vk_surface);
_thread_wl_vk_surface_init(wl_vk_surface);
wl_vk_surface->initialized_in_thread = TPL_TRUE;
tpl_gcond_signal(&wl_vk_surface->surf_cond);
- } else if (message == CREATE_QUEUE) { /* Create tbm_surface_queue */
+ }
+
+ if (message & ACQUIRABLE) { /* Acquirable message */
+ TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) acquirable message received!",
+ wl_vk_surface);
+ if (_thread_surface_queue_acquire(wl_vk_surface)
+ != TPL_ERROR_NONE) {
+ TPL_ERR("Failed to acquire from tbm_queue. wl_vk_surface(%p)",
+ wl_vk_surface);
+ }
+ }
+
+ if (message & CREATE_QUEUE) { /* Create tbm_surface_queue */
TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) queue creation message received!",
wl_vk_surface);
if (_thread_swapchain_create_tbm_queue(wl_vk_surface)
TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) queue creation message received!",
wl_vk_surface);
if (_thread_swapchain_create_tbm_queue(wl_vk_surface)
wl_vk_surface);
}
tpl_gcond_signal(&wl_vk_surface->surf_cond);
wl_vk_surface);
}
tpl_gcond_signal(&wl_vk_surface->surf_cond);
- } else if (message == DESTROY_QUEUE) { /* swapchain destroy */
+ }
+
+ if (message & DESTROY_QUEUE) { /* swapchain destroy */
TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) swapchain destroy message received!",
wl_vk_surface);
_thread_swapchain_destroy_tbm_queue(wl_vk_surface);
tpl_gcond_signal(&wl_vk_surface->surf_cond);
TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) swapchain destroy message received!",
wl_vk_surface);
_thread_swapchain_destroy_tbm_queue(wl_vk_surface);
tpl_gcond_signal(&wl_vk_surface->surf_cond);
- } else if (message == ACQUIRABLE) { /* Acquirable message */
- TPL_LOG_D("[MSG_RECEIVED]", "wl_vk_surface(%p) acquirable message received!",
- wl_vk_surface);
- if (_thread_surface_queue_acquire(wl_vk_surface)
- != TPL_ERROR_NONE) {
- TPL_ERR("Failed to acquire from tbm_queue. wl_vk_surface(%p)",
- wl_vk_surface);
- }
}
/* init to NONE_MESSAGE */
}
/* init to NONE_MESSAGE */