From 72d0a97060e6191f467f3063a9ecdded570231b3 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 29 Nov 2017 12:00:29 +0900 Subject: [PATCH] tpl_wayland_egl_thread: Added the missing code to allocate list. - vblank_waiting_buffers list is needed to support FIFO & FIFO_RELAXED modes. Change-Id: I93a90ad4711bcb8f13640cc0942dc4175cdff8cc Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index d3116fd..7944b82 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -2158,6 +2158,12 @@ _twe_thread_wl_surf_source_destroy(void *source) surf_source->committed_buffers = NULL; } + if (surf_source->vblank_waiting_buffers) { + __tpl_list_free(surf_source->vblank_waiting_buffers, + (tpl_free_func_t)__cb_buffer_remove_from_list); + surf_source->vblank_waiting_buffers = NULL; + } + if (!disp_source->is_vulkan_dpy) { _twe_surface_buffer_flusher_fini(surf_source); } @@ -2425,6 +2431,11 @@ twe_surface_create_swapchain(twe_surface_h twe_surface, return TPL_ERROR_INVALID_OPERATION; } + if (present_mode == TPL_DISPLAY_PRESENT_MODE_FIFO + || present_mode == TPL_DISPLAY_PRESENT_MODE_FIFO_RELAXED) { + surf_source->vblank_waiting_buffers = __tpl_list_alloc(); + } + surf_source->format = format; surf_source->swapchain_properties.width = width; surf_source->swapchain_properties.height = height; -- 2.7.4