diff options
author | Mikhail Labiuk <m.labiuk@samsung.com> | 2018-08-07 20:04:51 +0300 |
---|---|---|
committer | Mikhail Labiuk <m.labiuk@samsung.com> | 2018-08-07 21:10:04 +0300 |
commit | c58044361c8d028613469f2a10a201bd7ffd2c7e (patch) | |
tree | ba0325eb14b459d0d4b1bfb6afdacb7c79e69232 | |
parent | 3639edafe715673a090150b7e93ce53b3a4b2f0e (diff) | |
download | emulator-yagl-c58044361c8d028613469f2a10a201bd7ffd2c7e.tar.gz emulator-yagl-c58044361c8d028613469f2a10a201bd7ffd2c7e.tar.bz2 emulator-yagl-c58044361c8d028613469f2a10a201bd7ffd2c7e.zip |
Modify decision for window reset by checking tpl_surface_validatetizen_5.5.m2_releasesubmit/tizen_5.5_mobile_hotfix/20201026.185101submit/tizen_5.5/20191031.000001submit/tizen_5.0/20181101.000001submit/tizen/20180827.075509submit/tizen/20180809.082641accepted/tizen/unified/20180827.160650accepted/tizen/5.5/unified/mobile/hotfix/20201027.081758accepted/tizen/5.5/unified/20191031.014531accepted/tizen/5.0/unified/20181102.012242tizen_5.5_mobile_hotfixtizen_5.0accepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.0_unified
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.c | 5 |
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]) { /* |