wl_egl_buffer = wl_egl_surface->buffers[idx];
if (wl_egl_buffer) {
- TPL_DEBUG("[idx:%d] wl_egl_buffer(%p) tbm_surface(%p) status(%s)",
- idx, wl_egl_buffer,
- wl_egl_buffer->tbm_surface,
- status_to_string[wl_egl_buffer->status]);
wl_egl_surface->buffers[idx] = NULL;
wl_egl_surface->buffer_cnt--;
} else {
tpl_gmutex_lock(&wl_egl_buffer->mutex);
+ TPL_DEBUG("[idx:%d] wl_egl_buffer(%p) tbm_surface(%p) status(%s)",
+ idx, wl_egl_buffer,
+ wl_egl_buffer->tbm_surface,
+ status_to_string[wl_egl_buffer->status]);
+
/* ACQUIRED, WAITING_SIGNALED, WAITING_VBLANK, COMMITTED */
/* It has been acquired but has not yet been released, so this
* buffer must be released. */
TRACE_MARK("[ENQ] BO_NAME:%d", bo_name);
- TPL_LOG_T("WL_EGL",
- "[ENQ] wl_egl_surface(%p) tbm_surface(%p) bo(%d) fence(%d)",
- wl_egl_surface, tbm_surface, bo_name, acquire_fence);
-
wl_egl_buffer = _get_wl_egl_buffer(tbm_surface);
+
tpl_gmutex_lock(&wl_egl_buffer->mutex);
/* If there are received region information, save it to wl_egl_buffer */
close(wl_egl_buffer->acquire_fence_fd);
wl_egl_buffer->acquire_fence_fd = acquire_fence;
- wl_egl_buffer->status = ENQUEUED;
tpl_gmutex_lock(&wl_egl_surface->presentation_sync.mutex);
if (wl_egl_surface->presentation_sync.fd != -1) {
}
tpl_gmutex_unlock(&wl_egl_surface->commit_sync.mutex);
+ wl_egl_buffer->status = ENQUEUED;
+ TPL_LOG_T("WL_EGL",
+ "[ENQ] wl_egl_buffer(%p) tbm_surface(%p) bo(%d) fence(%d)",
+ wl_egl_buffer, tbm_surface, bo_name, acquire_fence);
+
tpl_gmutex_unlock(&wl_egl_buffer->mutex);
tsq_err = tbm_surface_queue_enqueue(wl_egl_surface->tbm_queue,
wl_egl_buffer->status = ACQUIRED;
+ TPL_LOG_T("WL_EGL", "[ACQ] wl_egl_buffer(%p) tbm_surface(%p) bo(%d)",
+ wl_egl_buffer, tbm_surface,
+ _get_tbm_surface_bo_name(tbm_surface));
+
if (wl_egl_buffer->wl_buffer == NULL) {
tpl_wl_egl_display_t *wl_egl_display = wl_egl_surface->wl_egl_display;
wl_egl_buffer->wl_buffer =
wayland_tbm_client_destroy_buffer(wl_egl_display->wl_tbm_client,
(void *)wl_egl_buffer->wl_buffer);
+ if (wl_egl_buffer->waiting_source) {
+ tpl_gsource_destroy(wl_egl_buffer->waiting_source, TPL_FALSE);
+ wl_egl_buffer->waiting_source = NULL;
+ }
+
if (wl_egl_buffer->commit_sync_fd != -1) {
int ret = _write_to_eventfd(wl_egl_buffer->commit_sync_fd);
if (ret == -1)