#include <tizen-surface-client-protocol.h>
#include <wayland-egl-backend.h>
#include <presentation-time-client-protocol.h>
+#include <linux-explicit-synchronization-unstable-v1-client-protocol.h>
#include "tpl_utils.h"
#include "tpl_internal.h"
struct wayland_tbm_client *wl_tbm_client;
struct tizen_surface_shm *tss; /* used for surface buffer_flush */
struct wp_presentation *presentation;
+ struct zwp_linux_explicit_synchronization_v1 *explicit_sync;
struct {
int min_buffer;
int max_buffer;
&tizen_surface_shm_interface,
((version < IMPL_TIZEN_SURFACE_SHM_VERSION) ?
version : IMPL_TIZEN_SURFACE_SHM_VERSION));
- }
-
- if (disp_source->is_vulkan_dpy
- && !strcmp(interface, "wayland_vulkan")) {
+ } else if (disp_source->is_vulkan_dpy
+ && !strcmp(interface, "wayland_vulkan")) {
disp_source->wl_vk_client =
wl_registry_bind(wl_registry, name,
&wayland_vulkan_interface,
version);
- }
-
- if (!strcmp(interface, wp_presentation_interface.name)) {
- disp_source->presentation =
- wl_registry_bind(wl_registry,
- name, &wp_presentation_interface, 1);
+ } else if (!strcmp(interface, wp_presentation_interface.name)) {
+ disp_source->presentation =
+ wl_registry_bind(wl_registry,
+ name, &wp_presentation_interface, 1);
TPL_DEBUG("bind wp_presentation_interface");
+ } else if (strcmp(interface, "zwp_linux_explicit_synchronization_v1") == 0) {
+ disp_source->explicit_sync =
+ wl_registry_bind(wl_registry, name,
+ &zwp_linux_explicit_synchronization_v1_interface, 1);
+ TPL_DEBUG("bind zwp_linux_explicit_synchronization_v1_interface");
}
}
TPL_LOG_T(BACKEND, "wp_presentation(%p) init.", disp_source->presentation);
}
+ if (disp_source->explicit_sync) {
+ wl_proxy_set_queue((struct wl_proxy *)disp_source->explicit_sync,
+ disp_source->ev_queue);
+ TPL_LOG_T(BACKEND, "zwp_linux_explicit_synchronization_v1(%p) init.",
+ disp_source->explicit_sync);
+ }
+
fini:
if (display_wrapper)
wl_proxy_wrapper_destroy(display_wrapper);
wp_presentation_destroy(disp_source->presentation);
disp_source->presentation = NULL;
}
+
+ if (disp_source->explicit_sync) {
+ TPL_LOG_T(BACKEND, "zwp_linux_explicit_synchronization_v1(%p) fini.",
+ disp_source->explicit_sync);
+ zwp_linux_explicit_synchronization_v1_destroy(disp_source->explicit_sync);
+ disp_source->explicit_sync = NULL;
+ }
}
static void