summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Labiuk <m.labiuk@samsung.com>2018-08-07 20:04:51 +0300
committerMikhail Labiuk <m.labiuk@samsung.com>2018-08-07 21:10:04 +0300
commitc58044361c8d028613469f2a10a201bd7ffd2c7e (patch)
treeba0325eb14b459d0d4b1bfb6afdacb7c79e69232
parent3639edafe715673a090150b7e93ce53b3a4b2f0e (diff)
downloademulator-yagl-tizen_5.5_mobile_hotfix.tar.gz
emulator-yagl-tizen_5.5_mobile_hotfix.tar.bz2
emulator-yagl-tizen_5.5_mobile_hotfix.zip
Call tpl_surface_validate before dequeue to check if it needs to be reset. Change-Id: I346ca23f4d85c7f8e3f174ac79a9bdf83cf7652e Signed-off-by: Mikhail Labiuk <m.labiuk@samsung.com>
-rw-r--r--EGL/tizen/yagl_tizen_window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/EGL/tizen/yagl_tizen_window.c b/EGL/tizen/yagl_tizen_window.c
index fe2ac39..9e65770 100644
--- a/EGL/tizen/yagl_tizen_window.c
+++ b/EGL/tizen/yagl_tizen_window.c
@@ -52,6 +52,7 @@ static int yagl_tizen_window_get_buffer(struct yagl_native_drawable *drawable,
tbm_bo bo;
tbm_surface_h tbm_surface;
int i;
+ tpl_bool_t invalid_surface;
YAGL_LOG_FUNC_SET(yagl_tizen_window_get_buffer);
@@ -64,6 +65,8 @@ static int yagl_tizen_window_get_buffer(struct yagl_native_drawable *drawable,
return 0;
}
+ invalid_surface = tpl_surface_validate(window->surface) == TPL_FALSE;
+
tbm_surface = tpl_surface_dequeue_buffer(window->surface);
if (tbm_surface == NULL) {
YAGL_LOG_ERROR("can't get buffer for %p", window->surface);
@@ -74,7 +77,7 @@ static int yagl_tizen_window_get_buffer(struct yagl_native_drawable *drawable,
width = tbm_surface_get_width(tbm_surface);
height = tbm_surface_get_height(tbm_surface);
- if ((window->width != width) || (window->height != height)) {
+ if (invalid_surface || (window->width != width) || (window->height != height)) {
for (i = 0; i < YAGL_TIZEN_MAX_COLOR_BUF; i++) {
if (window->color_buffers[i].locked && window->back != &window->color_buffers[i]) {
/*