#define KEY_BUFFER_INFO (unsigned long)(&buffer_info_key)
#define CLIENT_QUEUE_SIZE 3
+#define VK_CLIENT_QUEUE_SIZE 3
typedef struct _twe_wl_disp_source twe_wl_disp_source;
typedef struct _twe_wl_surf_source twe_wl_surf_source;
struct wl_event_queue *ev_queue;
struct wayland_tbm_client *wl_tbm_client;
struct tizen_surface_shm *tss; /* used for surface buffer_flush */
+ struct {
+ int min_buffer;
+ int max_buffer;
+ int present_modes;
+ } surface_capabilities;
+ struct wayland_vulkan *wl_vk_client;
+ tpl_bool_t is_vulkan_dpy;
tpl_bool_t prepared;
twe_del_source *disp_del_source;
twe_thread *thread;
source->gfd.revents = 0;
__tpl_object_init(&source->obj, TPL_OBJECT_DISPLAY, NULL);
+ if (backend == TPL_BACKEND_WAYLAND_VULKAN_WSI) {
+ source->is_vulkan_dpy = TPL_TRUE;
+ source->surface_capabilities.min_buffer = 2;
+ source->surface_capabilities.max_buffer = VK_CLIENT_QUEUE_SIZE;
+ source->surface_capabilities.present_modes =
+ TPL_DISPLAY_PRESENT_MODE_MAILBOX;
+ } else { /* wayland_egl backend */
+ /* These are not used. It just be initialized. */
+ source->is_vulkan_dpy = TPL_FALSE;
+ source->surface_capabilities.min_buffer = 2;
+ source->surface_capabilities.max_buffer = CLIENT_QUEUE_SIZE;
+ source->surface_capabilities.present_modes =
+ TPL_DISPLAY_PRESENT_MODE_FIFO;
+ }
+
_twe_display_shm_init(source);
source->disp_del_source = _twe_del_source_init(ctx, source);