From: joonbum.ko Date: Tue, 26 Sep 2017 07:00:31 +0000 (+0900) Subject: tpl_wayland_egl_thread: Added surface capabilities to twe_display for vk backend. X-Git-Tag: accepted/tizen/unified/20171206.063114~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5aaa60cd2890e7fcf389910a761ffb400dfeb69;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git tpl_wayland_egl_thread: Added surface capabilities to twe_display for vk backend. Change-Id: I68cc93c4c0c473d091b8d9f4023d7edfcd2b312f Signed-off-by: joonbum.ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index 9894301..9982113 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -20,6 +20,7 @@ static int buffer_info_key; #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; @@ -59,6 +60,13 @@ struct _twe_wl_disp_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; @@ -810,6 +818,21 @@ twe_display_add(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);