/* for waiting draw done */
tpl_bool_t use_sync_fence;
+ /* to use zwp_linux_surface_synchronization */
+ tpl_bool_t use_surface_sync;
+
int post_interval;
struct {
tbm_surface_h tbm_surface;
int sync_fd;
} sync_info;
+
+ struct zwp_linux_surface_synchronization_v1 *surface_sync;
+
};
struct _twe_wl_buffer_info {
surf_source->vblank = NULL;
}
+ if (surf_source->surface_sync) {
+ TPL_LOG_T(BACKEND,
+ "[SURFACE_SYNC FINI] twe_wl_surf_source(%p) surface_sync(%p)",
+ surf_source, surf_source->surface_sync);
+ zwp_linux_surface_synchronization_v1_destroy(surf_source->surface_sync);
+ surf_source->surface_sync = NULL;
+ }
+
surf_source->cb_data = NULL;
surf_source->rotate_cb = NULL;
source->rotate_cb = NULL;
source->format = format;
source->use_sync_fence = TPL_FALSE;
+ source->use_surface_sync = TPL_FALSE;
/* for vulkan swapchain */
source->vblank_waiting_buffers = NULL;
_twe_surface_buffer_flusher_init(source);
+ if (disp_source->explicit_sync) {
+ source->surface_sync =
+ zwp_linux_explicit_synchronization_v1_get_synchronization(
+ disp_source->explicit_sync, source->surf);
+ if (!source->surface_sync) {
+ TPL_WARN("Failed to create surf_sync. | surf_source(%p)", source);
+ } else {
+ source->use_surface_sync = TPL_TRUE;
+ }
+ }
+
source->surf_del_source = _twe_del_source_init(ctx, source);
if (source->surf_del_source) {
source->surf_del_source->destroy_target_source_func