AS_IF([test "${with_wayland}" = "yes" || test "${with_wayland}" = "1"],
[PKG_CHECK_MODULES([TPL_WL],
[libtdm-client wayland-tbm-client wayland-tbm-server
- tizen-surface-client glib-2.0 wayland-egl presentation-time-client wayland-egl-backend
- linux-explicit-synchronization-unstable-v1-client])
+ glib-2.0 wayland-egl wayland-egl-backend])
TPL_CFLAGS+="$TPL_WL_CFLAGS"
TPL_CFLAGS+=" -DTPL_WINSYS_WL=1 "
- TPL_LIBS+="$TPL_WL_LIBS"],
+ TPL_LIBS+="$TPL_WL_LIBS "],
[])
AM_CONDITIONAL([WITH_WAYLAND], [test "${with_wayland}" = "yes" || test "${with_wayland}" = "1"])
AM_CONDITIONAL([ENABLE_TTRACE], [test "${enable_ttrace}" = "yes" || test "${enable_ttrace}" = "1"])
+AC_ARG_ENABLE([tizen-feature],
+ [AS_HELP_STRING([--enable-tizen-feature=yes|no],[Enable tizen specific feature. @<:@default=enabled@:>@])],
+ [],
+ [])
+
+AS_IF([test "${enable_tizen_feature}" = "yes" || test "${enable_tizen_feature}" = "1"],
+ [PKG_CHECK_MODULES([TIZEN_FEATURE],
+ [tizen-surface-client presentation-time-client
+ linux-explicit-synchronization-unstable-v1-client])
+ TPL_CFLAGS+="$TIZEN_FEATURE_CFLAGS"
+ TPL_CFLAGS+=" -DTIZEN_FEATURE_ENABLE=1 "
+ TPL_LIBS+="$TIZEN_FEATURE_LIBS"],
+ [TPL_CFLAGS+=" -DTIZEN_FEATURE_ENABLE=0 "])
+
+AM_CONDITIONAL([ENABLE_TIZEN_FEATURE], [test "${enable_tizen_feature}" = "yes" || test "${enable_tizen_feature}" = "1"])
+
+
AC_ARG_WITH([utest],
[AS_HELP_STRING([--with-utest=yes|no],[Build tpl unit test. @<:@default=disabled@:>@])],
[],
%define ENABLE_OBJECT_HASH_CHECK 1
%define ENABLE_WORKER_TEST_ONLY 0
%define ENABLE_DEFAULT_WL_THREAD 0
+%define ENABLE_TIZEN_FEATURE 1
#TPL INSTALL OPTION
%define ENABLE_TPL_TEST 0
BuildRequires: cmake
BuildRequires: pkg-config
BuildRequires: pkgconfig(libtbm)
-BuildRequires: pkgconfig(dlog)
%if "%{TPL_WINSYS}" == "DRI2" || "%{TPL_WINSYS}" == "DRI3"
BuildRequires: pkgconfig(libdri2)
BuildRequires: pkgconfig(wayland-egl-backend)
BuildRequires: pkgconfig(wayland-tbm-client)
BuildRequires: pkgconfig(wayland-tbm-server)
+BuildRequires: pkgconfig(glib-2.0)
+%if "%{ENABLE_TIZEN_FEATURE}" == "1"
BuildRequires: pkgconfig(tizen-surface-client)
BuildRequires: pkgconfig(presentation-time-client)
BuildRequires: pkgconfig(linux-explicit-synchronization-unstable-v1-client)
-BuildRequires: pkgconfig(glib-2.0)
+%endif
+
%endif
%if "%{ENABLE_TTRACE}" == "1"
BuildRequires: pkgconfig(ttrace)
%endif
+%if "%{ENABLE_DLOG}" == "1"
+BuildRequires: pkgconfig(dlog)
+%endif
+
%global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
%description
--enable-dlog-default=%{ENABLE_DEFAULT_LOG} \
--enable-dump=%{ENABLE_DEFAULT_DUMP} \
--enable-object-hash-check=%{ENABLE_OBJECT_HASH_CHECK} \
- --enable-ttrace=%{ENABLE_TTRACE}
+ --enable-ttrace=%{ENABLE_TTRACE} \
+ --enable-tizen-feature=%{ENABLE_TIZEN_FEATURE}
make %{?_smp_mflags}
#include <wayland-tbm-client.h>
#include <wayland-tbm-server.h>
#include <tdm_client.h>
+
+#ifndef TIZEN_FEATURE_ENABLE
+#define TIZEN_FEATURE_ENABLE 1
+#endif
+
+#if TIZEN_FEATURE_ENABLE
#include <tizen-surface-client-protocol.h>
+#endif
typedef struct _tpl_wayland_egl_display tpl_wayland_egl_display_t;
typedef struct _tpl_wayland_egl_surface tpl_wayland_egl_surface_t;
tdm_client *tdm_client;
struct wl_display *wl_dpy;
struct wl_event_queue *wl_tbm_event_queue;
+#if TIZEN_FEATURE_ENABLE
struct tizen_surface_shm *tizen_surface_shm; /* used for surface buffer_flush */
+#endif
pthread_mutex_t wl_event_mutex;
pthread_mutex_t tdm_mutex;
};
int latest_transform;
tpl_list_t *attached_buffers; /* list for tracking [ACQ]~[REL] buffers */
tpl_list_t *dequeued_buffers; /* list for tracking [DEQ]~[ENQ] buffers */
+#if TIZEN_FEATURE_ENABLE
struct tizen_surface_shm_flusher *tizen_surface_shm_flusher; /* wl_proxy for buffer flush */
+#endif
};
struct _tpl_wayland_egl_buffer {
static int tpl_wayland_egl_buffer_key;
#define KEY_tpl_wayland_egl_buffer (unsigned long)(&tpl_wayland_egl_buffer_key)
+#if TIZEN_FEATURE_ENABLE
static void
__tpl_wayland_egl_display_buffer_flusher_init(
tpl_wayland_egl_display_t *wayland_egl_display);
__tpl_wayland_egl_surface_buffer_flusher_init(tpl_surface_t *surface);
static void
__tpl_wayland_egl_surface_buffer_flusher_fini(tpl_surface_t *surface);
+#endif
static void
__tpl_wayland_egl_buffer_free(tpl_wayland_egl_buffer_t *wayland_egl_buffer);
}
wayland_egl_display->wl_dpy = wl_dpy;
+#if TIZEN_FEATURE_ENABLE
__tpl_wayland_egl_display_buffer_flusher_init(wayland_egl_display);
+#endif
} else {
TPL_ERR("Invalid native handle for display.");
wayland_egl_display, wayland_egl_display->wl_tbm_client);
lock_res = pthread_mutex_lock(&wayland_egl_display->wl_event_mutex);
-
+#if TIZEN_FEATURE_ENABLE
__tpl_wayland_egl_display_buffer_flusher_fini(wayland_egl_display);
-
+#endif
tdm_lock_res = pthread_mutex_lock(&wayland_egl_display->tdm_mutex);
if (wayland_egl_display->tdm_client)
tdm_client_destroy(wayland_egl_display->tdm_client);
}
if (tdm_lock_res == 0) pthread_mutex_unlock(&wayland_egl_display->tdm_mutex);
}
-
+#if TIZEN_FEATURE_ENABLE
__tpl_wayland_egl_surface_buffer_flusher_init(surface);
-
+#endif
TPL_LOG_B("WL_EGL",
"[INIT] tpl_surface_t(%p) tpl_wayland_egl_surface_t(%p) tbm_queue(%p)",
surface, wayland_egl_surface,
wl_egl_window->driver_private = NULL;
wl_egl_window->resize_callback = NULL;
wl_egl_window->destroy_window_callback = NULL;
-
+#if TIZEN_FEATURE_ENABLE
__tpl_wayland_egl_surface_buffer_flusher_fini(surface);
-
+#endif
if (wayland_egl_surface->tdm_vblank) {
int tdm_lock_res = pthread_mutex_lock(&wayland_egl_display->tdm_mutex);
TPL_LOG_B("WL_EGL",
#define IMPL_TIZEN_SURFACE_SHM_VERSION 2
+#if TIZEN_FEATURE_ENABLE
void
__cb_resistry_global_callback(void *data, struct wl_registry *wl_registry,
uint32_t name, const char *interface,
wayland_egl_surface->tizen_surface_shm_flusher = NULL;
}
}
+#endif
#include "wayland-egl-tizen/wayland-egl-tizen.h"
#include "wayland-egl-tizen/wayland-egl-tizen-priv.h"
+#ifndef TIZEN_FEATURE_ENABLE
+#define TIZEN_FEATURE_ENABLE 1
+#endif
+
+#if TIZEN_FEATURE_ENABLE
#include <tizen-surface-client-protocol.h>
#include <presentation-time-client-protocol.h>
#include <linux-explicit-synchronization-unstable-v1-client-protocol.h>
+#endif
#include "tpl_utils_gthread.h"
tpl_bool_t use_wait_vblank;
tpl_bool_t use_explicit_sync;
+ tpl_bool_t use_tss;
tpl_bool_t prepared;
struct {
tpl_list_t *surface_vblanks;
} tdm;
+#if TIZEN_FEATURE_ENABLE
struct tizen_surface_shm *tss; /* used for surface buffer_flush */
struct wp_presentation *presentation; /* for presentation feedback */
struct zwp_linux_explicit_synchronization_v1 *explicit_sync; /* for explicit fence sync */
+#endif
};
typedef enum surf_message {
struct wl_egl_window *wl_egl_window;
struct wl_surface *wl_surface;
+
+#if TIZEN_FEATURE_ENABLE
struct zwp_linux_surface_synchronization_v1 *surface_sync; /* for explicit fence sync */
struct tizen_surface_shm_flusher *tss_flusher; /* used for surface buffer_flush */
+#endif
tpl_surface_vblank_t *vblank;
/* for checking draw done */
tpl_bool_t draw_done;
-
+#if TIZEN_FEATURE_ENABLE
/* to get release event via zwp_linux_buffer_release_v1 */
struct zwp_linux_buffer_release_v1 *buffer_release;
-
+#endif
/* each buffers own its release_fence_fd, until it passes ownership
* to it to EGL */
int32_t release_fence_fd;
tpl_wl_egl_surface_t *wl_egl_surface;
};
+#if TIZEN_FEATURE_ENABLE
struct pst_feedback {
/* to get presentation feedback from display server */
struct wp_presentation_feedback *presentation_feedback;
tpl_wl_egl_surface_t *wl_egl_surface;
};
+#endif
static int
_get_tbm_surface_bo_name(tbm_surface_h tbm_surface);
#define IMPL_TIZEN_SURFACE_SHM_VERSION 2
+
static void
__cb_wl_resistry_global_callback(void *data, struct wl_registry *wl_registry,
uint32_t name, const char *interface,
uint32_t version)
{
+#if TIZEN_FEATURE_ENABLE
tpl_wl_egl_display_t *wl_egl_display = (tpl_wl_egl_display_t *)data;
if (!strcmp(interface, "tizen_surface_shm")) {
&tizen_surface_shm_interface,
((version < IMPL_TIZEN_SURFACE_SHM_VERSION) ?
version : IMPL_TIZEN_SURFACE_SHM_VERSION));
+ wl_egl_display->use_tss = TPL_TRUE;
} else if (!strcmp(interface, wp_presentation_interface.name)) {
wl_egl_display->presentation =
wl_registry_bind(wl_registry,
TPL_DEBUG("bind zwp_linux_explicit_synchronization_v1_interface");
}
}
+#endif
}
static void
goto fini;
}
+#if TIZEN_FEATURE_ENABLE
/* set tizen_surface_shm's queue as client's private queue */
if (wl_egl_display->tss) {
wl_proxy_set_queue((struct wl_proxy *)wl_egl_display->tss,
TPL_LOG_T("WL_EGL", "zwp_linux_explicit_synchronization_v1(%p) init.",
wl_egl_display->explicit_sync);
}
-
+#endif
wl_egl_display->wl_initialized = TPL_TRUE;
TPL_INFO("[WAYLAND_INIT]",
"wl_egl_display(%p) wl_display(%p) wl_tbm_client(%p) event_queue(%p)",
wl_egl_display, wl_egl_display->wl_display,
wl_egl_display->wl_tbm_client, wl_egl_display->ev_queue);
+#if TIZEN_FEATURE_ENABLE
TPL_INFO("[WAYLAND_INIT]",
"tizen_surface_shm(%p) wp_presentation(%p) explicit_sync(%p)",
wl_egl_display->tss, wl_egl_display->presentation,
wl_egl_display->explicit_sync);
-
+#endif
fini:
if (display_wrapper)
wl_proxy_wrapper_destroy(display_wrapper);
wl_egl_display->ev_queue) == -1) {
_wl_display_print_err(wl_egl_display, "dispatch_queue_pending");
}
-
+#if TIZEN_FEATURE_ENABLE
if (wl_egl_display->tss) {
TPL_INFO("[TIZEN_SURFACE_SHM_DESTROY]",
"wl_egl_display(%p) tizen_surface_shm(%p) fini.",
zwp_linux_explicit_synchronization_v1_destroy(wl_egl_display->explicit_sync);
wl_egl_display->explicit_sync = NULL;
}
-
+#endif
if (wl_egl_display->wl_tbm_client) {
struct wl_proxy *wl_tbm = NULL;
wl_egl_display->ev_queue = NULL;
wl_egl_display->wl_display = (struct wl_display *)display->native_handle;
wl_egl_display->last_error = 0;
+ wl_egl_display->use_tss = TPL_FALSE;
wl_egl_display->use_explicit_sync = TPL_FALSE; // default disabled
wl_egl_display->prepared = TPL_FALSE;
+#if TIZEN_FEATURE_ENABLE
/* Wayland Interfaces */
wl_egl_display->tss = NULL;
wl_egl_display->presentation = NULL;
wl_egl_display->explicit_sync = NULL;
+#endif
wl_egl_display->wl_tbm_client = NULL;
wl_egl_display->use_wait_vblank = TPL_TRUE; // default enabled
TPL_INFO("[DISPLAY_INIT]",
"USE_WAIT_VBLANK(%s) TIZEN_SURFACE_SHM(%s) USE_EXPLICIT_SYNC(%s)",
wl_egl_display->use_wait_vblank ? "TRUE" : "FALSE",
- wl_egl_display->tss ? "TRUE" : "FALSE",
+ wl_egl_display->use_tss ? "TRUE" : "FALSE",
wl_egl_display->use_explicit_sync ? "TRUE" : "FALSE");
return TPL_ERROR_NONE;
return commit_sync_fd;
}
+#if TIZEN_FEATURE_ENABLE
static int
__cb_create_presentation_sync_fd(struct wl_egl_window *wl_egl_window, void *private)
{
__cb_tss_flusher_free_flush_callback
};
/* -- END -- tizen_surface_shm_flusher_listener */
-
+#endif
/* -- BEGIN -- tbm_surface_queue callback funstions */
static void
"wl_egl_surface(%p) wl_egl_window(%p) wl_surface(%p)",
wl_egl_surface, wl_egl_surface->wl_egl_window,
wl_egl_surface->wl_surface);
-
+#if TIZEN_FEATURE_ENABLE
tpl_gmutex_lock(&wl_egl_surface->presentation_sync.mutex);
if (wl_egl_display->presentation && wl_egl_surface->presentation_feedbacks) {
tizen_surface_shm_flusher_destroy(wl_egl_surface->tss_flusher);
wl_egl_surface->tss_flusher = NULL;
}
-
+#endif
if (wl_egl_surface->vblank && wl_egl_surface->vblank->waiting_buffers) {
__tpl_list_free(wl_egl_surface->vblank->waiting_buffers, NULL);
wl_egl_surface->vblank->waiting_buffers = NULL;
wl_egl_surface->serial = 0;
wl_egl_surface->vblank = NULL;
+#if TIZEN_FEATURE_ENABLE
wl_egl_surface->tss_flusher = NULL;
wl_egl_surface->surface_sync = NULL;
+#endif
wl_egl_surface->post_interval = surface->post_interval;
tizen_private->set_window_serial_callback = (void *)
__cb_set_window_serial_callback;
tizen_private->create_commit_sync_fd = (void *)__cb_create_commit_sync_fd;
+#if TIZEN_FEATURE_ENABLE
tizen_private->create_presentation_sync_fd = (void *)__cb_create_presentation_sync_fd;
+#else
+ tizen_private->create_presentation_sync_fd = NULL;
+#endif
wl_egl_window->destroy_window_callback = (void *)__cb_destroy_callback;
wl_egl_window->resize_callback = (void *)__cb_resize_callback;
}
wl_egl_surface->vblank = vblank;
-
+#if TIZEN_FEATURE_ENABLE
if (wl_egl_display->tss) {
wl_egl_surface->tss_flusher =
tizen_surface_shm_get_flusher(wl_egl_display->tss,
wl_egl_display->use_explicit_sync = TPL_FALSE;
}
}
-
+#endif
wl_egl_surface->presentation_feedbacks = __tpl_list_alloc();
}
wl_egl_buffer->draw_done = TPL_FALSE;
wl_egl_buffer->need_to_commit = TPL_TRUE;
+#if TIZEN_FEATURE_ENABLE
wl_egl_buffer->buffer_release = NULL;
+#endif
wl_egl_buffer->transform = tizen_private->transform;
if (wl_egl_buffer->w_transform != tizen_private->window_transform) {
tpl_gmutex_lock(&wl_egl_buffer->mutex);
wl_egl_buffer->status = DEQUEUED;
+
/* If wl_egl_buffer->release_fence_fd is -1,
* the tbm_surface can be used immediately.
* If not, user(EGL) have to wait until signaled. */
if (release_fence) {
+#if TIZEN_FEATURE_ENABLE
if (wl_egl_surface->surface_sync) {
*release_fence = wl_egl_buffer->release_fence_fd;
TPL_DEBUG("wl_egl_surface(%p) wl_egl_buffer(%p) release_fence_fd(%d)",
wl_egl_surface, wl_egl_buffer, *release_fence);
wl_egl_buffer->release_fence_fd = -1;
- } else {
+ } else
+#endif
+ {
*release_fence = -1;
}
}
}
if (wl_egl_buffer->acquire_fence_fd != -1) {
+#if TIZEN_FEATURE_ENABLE
if (wl_egl_surface->surface_sync)
ready_to_commit = TPL_TRUE;
- else {
+ else
+#endif
+ {
if (wl_egl_buffer->waiting_source) {
tpl_gsource_destroy(wl_egl_buffer->waiting_source, TPL_FALSE);
wl_egl_buffer->waiting_source = NULL;
}
/* -- END -- tdm_client vblank callback function */
+#if TIZEN_FEATURE_ENABLE
static void
__cb_buffer_fenced_release(void *data,
struct zwp_linux_buffer_release_v1 *release, int32_t fence)
__cb_buffer_fenced_release,
__cb_buffer_immediate_release,
};
+#endif
static void
__cb_wl_buffer_release(void *data, struct wl_proxy *wl_buffer)
static const struct wl_buffer_listener wl_buffer_release_listener = {
(void *)__cb_wl_buffer_release,
};
-
+#if TIZEN_FEATURE_ENABLE
static void
__cb_presentation_feedback_sync_output(void *data,
struct wp_presentation_feedback *presentation_feedback,
__cb_presentation_feedback_presented,
__cb_presentation_feedback_discarded
};
+#endif
static tpl_result_t
_thread_surface_vblank_wait(tpl_wl_egl_surface_t *wl_egl_surface)
version = wl_proxy_get_version((struct wl_proxy *)wl_surface);
+#if TIZEN_FEATURE_ENABLE
/* create presentation feedback and add listener */
tpl_gmutex_lock(&wl_egl_surface->presentation_sync.mutex);
if (wl_egl_display->presentation && wl_egl_buffer->presentation_sync_fd != -1) {
}
}
tpl_gmutex_unlock(&wl_egl_surface->presentation_sync.mutex);
+#endif
if (wl_egl_buffer->w_rotated == TPL_TRUE) {
wayland_tbm_client_set_buffer_transform(
wayland_tbm_client_set_buffer_serial(wl_egl_display->wl_tbm_client,
(void *)wl_egl_buffer->wl_buffer,
wl_egl_buffer->serial);
-
+#if TIZEN_FEATURE_ENABLE
if (wl_egl_display->use_explicit_sync &&
wl_egl_surface->surface_sync) {
wl_egl_buffer->buffer_release, &zwp_release_listner, wl_egl_buffer);
TPL_DEBUG("add explicit_sync_release_listener.");
}
- } else {
+ } else
+#endif
+ {
wl_buffer_add_listener((void *)wl_egl_buffer->wl_buffer,
&wl_buffer_release_listener, wl_egl_buffer);
}
wl_egl_buffer->wl_buffer = NULL;
}
+#if TIZEN_FEATURE_ENABLE
if (wl_egl_buffer->buffer_release) {
zwp_linux_buffer_release_v1_destroy(wl_egl_buffer->buffer_release);
wl_egl_buffer->buffer_release = NULL;
close(wl_egl_buffer->release_fence_fd);
wl_egl_buffer->release_fence_fd = -1;
}
+#endif
if (wl_egl_buffer->waiting_source) {
tpl_gsource_destroy(wl_egl_buffer->waiting_source, TPL_FALSE);
#include <tdm_client.h>
+#ifndef TIZEN_FEATURE_ENABLE
+#define TIZEN_FEATURE_ENABLE 1
+#endif
+
+#if TIZEN_FEATURE_ENABLE
#include <tizen-surface-client-protocol.h>
#include <linux-explicit-synchronization-unstable-v1-client-protocol.h>
+#endif
#include "tpl_utils_gthread.h"
int min_buffer;
int max_buffer;
int present_modes;
-
+#if TIZEN_FEATURE_ENABLE
struct zwp_linux_explicit_synchronization_v1 *explicit_sync; /* for explicit fence sync */
+#endif
};
struct _tpl_wl_vk_swapchain {
tpl_wl_vk_swapchain_t *swapchain;
struct wl_surface *wl_surface;
+#if TIZEN_FEATURE_ENABLE
struct zwp_linux_surface_synchronization_v1 *surface_sync; /* for explicit fence sync */
-
+#endif
tdm_client_vblank *vblank;
/* surface information */
/* for checking need_to_commit (frontbuffer mode) */
tpl_bool_t need_to_commit;
+#if TIZEN_FEATURE_ENABLE
/* to get release event via zwp_linux_buffer_release_v1 */
struct zwp_linux_buffer_release_v1 *buffer_release;
+#endif
/* each buffers own its release_fence_fd, until it passes ownership
* to it to EGL */
return TPL_ERROR_NONE;
}
-#define IMPL_TIZEN_SURFACE_SHM_VERSION 2
-
static void
__cb_wl_resistry_global_callback(void *data, struct wl_registry *wl_registry,
uint32_t name, const char *interface,
uint32_t version)
{
+#if TIZEN_FEATURE_ENABLE
tpl_wl_vk_display_t *wl_vk_display = (tpl_wl_vk_display_t *)data;
if (strcmp(interface, "zwp_linux_explicit_synchronization_v1") == 0) {
TPL_DEBUG("bind zwp_linux_explicit_synchronization_v1_interface");
}
}
+#endif
}
static void
goto fini;
}
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_display->explicit_sync) {
wl_proxy_set_queue((struct wl_proxy *)wl_vk_display->explicit_sync,
wl_vk_display->ev_queue);
TPL_LOG_T("WL_VK", "zwp_linux_explicit_synchronization_v1(%p) init.",
wl_vk_display->explicit_sync);
}
+#endif
wl_vk_display->wl_initialized = TPL_TRUE;
"wl_vk_display(%p) wl_display(%p) wl_tbm_client(%p) event_queue(%p)",
wl_vk_display, wl_vk_display->wl_display,
wl_vk_display->wl_tbm_client, wl_vk_display->ev_queue);
+#if TIZEN_FEATURE_ENABLE
TPL_INFO("[WAYLAND_INIT]",
"explicit_sync(%p)",
wl_vk_display->explicit_sync);
-
+#endif
fini:
if (display_wrapper)
wl_proxy_wrapper_destroy(display_wrapper);
_wl_display_print_err(wl_vk_display, "dispatch_queue_pending");
}
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_display->explicit_sync) {
TPL_INFO("[EXPLICIT_SYNC_DESTROY]",
"wl_vk_display(%p) zwp_linux_explicit_synchronization_v1(%p) fini.",
zwp_linux_explicit_synchronization_v1_destroy(wl_vk_display->explicit_sync);
wl_vk_display->explicit_sync = NULL;
}
+#endif
if (wl_vk_display->wl_tbm_client) {
struct wl_proxy *wl_tbm = NULL;
wl_vk_display->prepared = TPL_FALSE;
/* Wayland Interfaces */
+#if TIZEN_FEATURE_ENABLE
wl_vk_display->explicit_sync = NULL;
+#endif
wl_vk_display->wl_tbm_client = NULL;
/* Vulkan specific surface capabilities */
wl_vk_surface->vblank);
}
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_display->explicit_sync && wl_vk_display->use_explicit_sync) {
wl_vk_surface->surface_sync =
zwp_linux_explicit_synchronization_v1_get_synchronization(
wl_vk_display->use_explicit_sync = TPL_FALSE;
}
}
-
+#endif
wl_vk_surface->vblank_waiting_buffers = __tpl_list_alloc();
}
wl_vk_surface->vblank_waiting_buffers = NULL;
}
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_surface->surface_sync) {
TPL_INFO("[SURFACE_SYNC_DESTROY]",
"wl_vk_surface(%p) surface_sync(%p)",
zwp_linux_surface_synchronization_v1_destroy(wl_vk_surface->surface_sync);
wl_vk_surface->surface_sync = NULL;
}
+#endif
if (wl_vk_surface->vblank) {
TPL_INFO("[VBLANK_DESTROY]",
wl_vk_surface->render_done_cnt = 0;
wl_vk_surface->vblank = NULL;
+#if TIZEN_FEATURE_ENABLE
wl_vk_surface->surface_sync = NULL;
+#endif
wl_vk_surface->sent_message = NONE_MESSAGE;
wl_vk_buffer->wl_buffer = NULL;
}
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_buffer->buffer_release) {
zwp_linux_buffer_release_v1_destroy(wl_vk_buffer->buffer_release);
wl_vk_buffer->buffer_release = NULL;
}
+#endif
if (wl_vk_buffer->release_fence_fd != -1) {
close(wl_vk_buffer->release_fence_fd);
wl_vk_buffer->num_rects = 0;
wl_vk_buffer->need_to_commit = TPL_FALSE;
+#if TIZEN_FEATURE_ENABLE
wl_vk_buffer->buffer_release = NULL;
-
+#endif
tpl_gmutex_init(&wl_vk_buffer->mutex);
tpl_gcond_init(&wl_vk_buffer->cond);
wl_vk_buffer->status = DEQUEUED;
if (release_fence) {
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_surface->surface_sync) {
*release_fence = wl_vk_buffer->release_fence_fd;
TPL_DEBUG("wl_vk_surface(%p) wl_vk_buffer(%p) release_fence_fd(%d)",
wl_vk_surface, wl_vk_buffer, *release_fence);
wl_vk_buffer->release_fence_fd = -1;
- } else {
+ } else
+#endif
+ {
*release_fence = -1;
}
}
return TPL_ERROR_NONE;
}
+#if TIZEN_FEATURE_ENABLE
static void
__cb_buffer_fenced_release(void *data,
struct zwp_linux_buffer_release_v1 *release,
__cb_buffer_fenced_release,
__cb_buffer_immediate_release,
};
+#endif
static void
__cb_wl_buffer_release(void *data, struct wl_proxy *wl_buffer)
}
}
+#if TIZEN_FEATURE_ENABLE
if (wl_vk_display->use_explicit_sync &&
wl_vk_surface->surface_sync &&
wl_vk_buffer->acquire_fence_fd != -1) {
TPL_DEBUG("add explicit_sync_release_listener.");
}
}
+#endif
wl_surface_commit(wl_surface);