return -1;
}
+static int
+__cb_merge_sync_fds(void *private, int sync_fd1, int sync_fd2)
+{
+ TPL_ASSERT(private);
+
+ struct tizen_private *tizen_private = (struct tizen_private *)private;
+ twe_wl_surf_source *surf_source = NULL;
+ tbm_fd merged_fd;
+
+ surf_source = (twe_wl_surf_source *)tizen_private->data;
+ if (!surf_source) {
+ TPL_ERR("Invalid parameter. twe_surface(%p)", surf_source);
+ return -1;
+ }
+
+ if (surf_source->render_sync_timeline == -1 &&
+ surf_source->presentation_sync_timeline == -1) {
+ TPL_ERR("There is no timeline for any sync fd in surf_source(%p)", surf_source);
+ return -1;
+ }
+
+ merged_fd = tbm_sync_fence_merge(NULL, sync_fd1, sync_fd2);
+
+ TPL_DEBUG("[FENCE_MERGE] surf_source(%p) fence1(%d) + fence2(%d) = merged(%d)",
+ surf_source, sync_fd1, sync_fd2, merged_fd);
+
+ return merged_fd;
+}
+
static void __cb_tss_flusher_flush_callback(void *data,
struct tizen_surface_shm_flusher *tss_flusher)
__cb_set_window_serial_callback;
private->create_render_sync_fd = (void *)__cb_create_render_sync_fd;
private->create_presentation_sync_fd = (void *)__cb_create_presentation_sync_fd;
+ private->merge_sync_fds = (void *)__cb_merge_sync_fds;
source->latest_transform = private->transform;