From: Joonbum Ko Date: Mon, 21 Jun 2021 02:11:34 +0000 (+0900) Subject: Fix missing use of num_buffers when create tbm_queue. X-Git-Tag: submit/tizen/20210621.073348~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44143afa080d4f4e0b79655e677300a0e4cc2530;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Fix missing use of num_buffers when create tbm_queue. Change-Id: If02ac0b00d87c3a1da860eb69b3b361666ff90a6 Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 32d5f22..05f5789 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -31,8 +31,7 @@ static int wl_egl_buffer_key; #define KEY_WL_EGL_BUFFER (unsigned long)(&wl_egl_buffer_key) /* In wayland, application and compositor create its own drawing buffers. Recommend size is more than 2. */ -#define CLIENT_QUEUE_SIZE 3 -#define BUFFER_ARRAY_SIZE (CLIENT_QUEUE_SIZE * 2) +#define BUFFER_ARRAY_SIZE 9 typedef struct _tpl_wl_egl_display tpl_wl_egl_display_t; typedef struct _tpl_wl_egl_surface tpl_wl_egl_surface_t; @@ -78,6 +77,7 @@ struct _tpl_wl_egl_surface { tpl_gsource *surf_source; tbm_surface_queue_h tbm_queue; + int num_buffers; struct wl_egl_window *wl_egl_window; struct wl_surface *wl_surface; @@ -1609,6 +1609,7 @@ __tpl_wl_egl_surface_init(tpl_surface_t *surface) wl_egl_surface->width = wl_egl_window->width; wl_egl_surface->height = wl_egl_window->height; wl_egl_surface->format = surface->format; + wl_egl_surface->num_buffers = surface->num_buffers; wl_egl_surface->surf_source = surf_source; wl_egl_surface->wl_egl_window = wl_egl_window; @@ -1842,7 +1843,7 @@ _thread_wl_egl_surface_init(tpl_wl_egl_surface_t *wl_egl_surface) wl_egl_surface->tbm_queue = _thread_create_tbm_queue( wl_egl_surface, wl_egl_display->wl_tbm_client, - CLIENT_QUEUE_SIZE); + wl_egl_surface->num_buffers); if (!wl_egl_surface->tbm_queue) { TPL_ERR("Failed to create tbm_queue. wl_egl_surface(%p) wl_tbm_client(%p)", wl_egl_surface, wl_egl_display->wl_tbm_client); @@ -1858,7 +1859,7 @@ _thread_wl_egl_surface_init(tpl_wl_egl_surface_t *wl_egl_surface) wl_egl_surface->tbm_queue, wl_egl_surface->width, wl_egl_surface->height, - CLIENT_QUEUE_SIZE, + wl_egl_surface->num_buffers, wl_egl_surface->format); if (wl_egl_display->use_wait_vblank) {