wl_egl_display, wl_egl_display->wl_tbm_client);
wayland_tbm_client_deinit(wl_egl_display->wl_tbm_client);
wl_egl_display->wl_tbm_client = NULL;
+ TPL_INFO("[WL_TBM_DEINIT_DONE]",
+ "wl_egl_display(%p)", wl_egl_display);
}
wl_event_queue_destroy(wl_egl_display->ev_queue);
TPL_LOG_D("[D_FINALIZE]", "wl_egl_display(%p) tpl_gsource(%p)",
wl_egl_display, gsource);
+ TPL_INFO("[FINALIZE_BEGIN]", "wl_egl_display(%p) tpl_gsource(%p)",
+ wl_egl_display, gsource);
if (wl_egl_display->wl_initialized)
_thread_wl_display_fini(wl_egl_display);
+ TPL_INFO("[FINALIZE_END]", "wl_egl_display(%p) tpl_gsource(%p)",
+ wl_egl_display, gsource);
wl_egl_display->gsource_finalized = TPL_TRUE;
wl_egl_display = (tpl_wl_egl_display_t *)display->backend.data;
if (wl_egl_display) {
- TPL_INFO("[DISPLAY_FINI]",
+ TPL_INFO("[DISPLAY_FINI_BEGIN]",
"wl_egl_display(%p) tpl_gthread(%p) wl_display(%p)",
wl_egl_display,
wl_egl_display->thread,
tpl_gmutex_unlock(&wl_egl_display->tdm.tdm_mutex);
}
+ tpl_gmutex_lock(&wl_egl_display->disp_mutex);
+ TPL_INFO("[DISP_SOURCE_DESTROY_BEGIN]", "wl_egl_display(%p) disp_source(%p)",
+ wl_egl_display, wl_egl_display->disp_source);
if (wl_egl_display->disp_source) {
- tpl_gmutex_lock(&wl_egl_display->disp_mutex);
// Send destroy mesage to thread
tpl_gsource_destroy(wl_egl_display->disp_source, TPL_TRUE);
+
/* This is a protection to prevent problems that arise in unexpected situations
* that g_cond_wait cannot work normally.
* When calling tpl_gsource_destroy() with destroy_in_thread is TPL_TRUE,
* caller should use tpl_gcond_wait() in the loop with checking finalized flag
* */
- while (!wl_egl_display->gsource_finalized) {
+ do {
tpl_gcond_wait(&wl_egl_display->disp_cond, &wl_egl_display->disp_mutex);
- }
+ } while (!wl_egl_display->gsource_finalized);
+
wl_egl_display->disp_source = NULL;
- tpl_gmutex_unlock(&wl_egl_display->disp_mutex);
}
+ TPL_INFO("[DISP_SOURCE_DESTROY_END]", "wl_egl_display(%p)", wl_egl_display);
+ tpl_gmutex_unlock(&wl_egl_display->disp_mutex);
if (wl_egl_display->thread) {
tpl_gthread_destroy(wl_egl_display->thread);
tpl_gmutex_clear(&wl_egl_display->wl_event_mutex);
+ TPL_INFO("[DISPLAY_FINI_END]",
+ "wl_egl_display(%p)", wl_egl_display);
+
free(wl_egl_display);
}