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) {
+ wl_egl_buffer->presentation_sync_fd = wl_egl_surface->presentation_sync.fd;
+ wl_egl_surface->presentation_sync.fd = -1;
+ }
+ tpl_gmutex_unlock(&wl_egl_surface->presentation_sync.mutex);
+
+ tpl_gmutex_lock(&wl_egl_surface->commit_sync.mutex);
+ if (wl_egl_surface->commit_sync.fd != -1) {
+ wl_egl_buffer->commit_sync_fd = wl_egl_surface->commit_sync.fd;
+ wl_egl_surface->commit_sync.fd = -1;
+ TRACE_ASYNC_BEGIN(wl_egl_buffer->commit_sync_fd, "[COMMIT_SYNC] bo(%d)",
+ _get_tbm_surface_bo_name(tbm_surface));
+ }
+ tpl_gmutex_unlock(&wl_egl_surface->commit_sync.mutex);
+
tpl_gmutex_unlock(&wl_egl_buffer->mutex);
tsq_err = tbm_surface_queue_enqueue(wl_egl_surface->tbm_queue,
TRACE_ASYNC_END(wl_egl_buffer->presentation_sync_fd,
"[PRESENTATION_SYNC] bo(%d)",
_get_tbm_surface_bo_name(tbm_surface));
-
+ TPL_DEBUG("[PRESENTATION_SYNC_FD_CLOSE] wl_egl_buffer(%p) presentation_sync_fd(%d)",
+ wl_egl_buffer, wl_egl_buffer->presentation_sync_fd);
close(wl_egl_buffer->presentation_sync_fd);
wl_egl_buffer->presentation_sync_fd = -1;
}