From: joonbum.ko Date: Tue, 2 Jan 2018 05:50:50 +0000 (+0900) Subject: tpl_wayland_egl_thread: Set to GUARANTEE_CYCLE mode to swapchain tbm_queue. X-Git-Tag: submit/tizen/20180104.042406~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F165688%2F3;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git tpl_wayland_egl_thread: Set to GUARANTEE_CYCLE mode to swapchain tbm_queue. Change-Id: Ie9435f58924932314bbe7a37b71a88cd6937f077 Signed-off-by: joonbum.ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index ba1ece6..96dbb8c 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -2561,6 +2561,11 @@ twe_surface_create_swapchain(twe_surface_h twe_surface, width, height, TBM_FORMAT_ARGB8888); + if (!surf_source->tbm_queue) { + TPL_ERR("TBM surface queue creation failed!"); + return TPL_ERROR_OUT_OF_MEMORY; + } + if (tbm_surface_queue_add_reset_cb(surf_source->tbm_queue, __cb_tbm_queue_reset_callback, surf_source) != TBM_SURFACE_QUEUE_ERROR_NONE) { @@ -2570,9 +2575,13 @@ twe_surface_create_swapchain(twe_surface_h twe_surface, return TPL_ERROR_INVALID_OPERATION; } - if (!surf_source->tbm_queue) { - TPL_ERR("TBM surface queue creation failed!"); - return TPL_ERROR_OUT_OF_MEMORY; + if (tbm_surface_queue_set_modes(surf_source->tbm_queue, + TBM_SURFACE_QUEUE_MODE_GUARANTEE_CYCLE) != + TBM_SURFACE_QUEUE_ERROR_NONE) { + TPL_ERR("Failed to set queue mode to tbm_surface_queue(%p)", + surf_source->tbm_queue); + tbm_surface_queue_destroy(surf_source->tbm_queue); + return TPL_ERROR_INVALID_OPERATION; } if (tbm_surface_queue_add_trace_cb(surf_source->tbm_queue,