void (*set_window_serial_callback)(struct wl_egl_window *, void *, unsigned int);
int (*create_render_sync_fd)(struct wl_egl_window *, void *);
int (*create_presentation_sync_fd)(struct wl_egl_window *, void *);
+ int (*merge_sync_fds)(void *, int, int);
};
static struct tizen_private* tizen_private_create()
private->set_frontbuffer_callback = NULL;
private->create_render_sync_fd = NULL;
private->create_presentation_sync_fd = NULL;
+ private->merge_sync_fds = NULL;
}
return private;
return -1;
}
+
+int
+wl_egl_window_tizen_merge_sync_fds(struct wl_egl_window *egl_window,
+ int sync_fd1, int sync_fd2)
+{
+ struct tizen_private *private = NULL;
+
+ if (egl_window == NULL) {
+ WL_EGL_ERR("egl_window is NULL");
+ return -1;
+ }
+
+ private = egl_window->driver_private;
+ if (private == NULL) {
+ WL_EGL_ERR("wl_egl_window(%p) dirver_private is NULL", egl_window);
+ return -1;
+ }
+
+ if (private->merge_sync_fds)
+ return private->merge_sync_fds(egl_window->driver_private, sync_fd1, sync_fd2);
+
+ return -1;
+}
\ No newline at end of file
int
wl_egl_window_tizen_create_presentation_sync_fd(struct wl_egl_window *egl_window);
+/**
+ * Get a new fence fd with fence1 and fence2 merged
+ *
+ * It returns a new fence fd waiting for both fences to be signaled.
+ * If user succeed in obtaining a new merged fence using this API,
+ * the two fence fds passed must be closed by the user.
+ *
+ * Multiple calls to this API allow to merge multiple fences.
+ *
+ * The two fence fds caller want to merge should be closed
+ * if caller is not going to use them after
+ * the new merged fd is created.
+ *
+ * @param egl_window handle to wl_egl_window
+ * @param sync_fd1 first fd to merge with second fd
+ * @param sync_fd2 seconde fd to merge with first fd
+ * @return merged fd on success, -1 on failure.
+ */
+int
+wl_egl_window_tizen_merge_sync_fds(struct wl_egl_window *egl_window,
+ int sync_fd1, int sync_fd2);
+
#ifdef __cplusplus
}
#endif