summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoonbum Ko <joonbum.ko@samsung.com>2020-07-22 19:15:06 +0900
committerXuelian Bai <xuelian.bai@samsung.com>2023-02-21 14:32:52 +0800
commit416691a142151be18242f0ff927c315e5c7631c8 (patch)
tree99763847c35f6f205385d4d0e83e3511763863c2 /src
parent5a6435d59e6696527a7be16417eaa053edca30c7 (diff)
downloadmesa-416691a142151be18242f0ff927c315e5c7631c8.tar.gz
mesa-416691a142151be18242f0ff927c315e5c7631c8.tar.bz2
mesa-416691a142151be18242f0ff927c315e5c7631c8.zip
Reduced the calling tpl_surface_validate.
Change-Id: I92d33fba7cc073dc43cf6babc56778a600148b1a Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/egl/drivers/dri2/platform_tizen.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c
index a4b591f38c9..f0681b0ff3d 100755
--- a/src/egl/drivers/dri2/platform_tizen.c
+++ b/src/egl/drivers/dri2/platform_tizen.c
@@ -1127,11 +1127,20 @@ tizen_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
static bool
tizen_validate_drawable(__DRIdrawable * driDrawable, void *loaderPrivate)
{
- struct dri2_egl_surface *dri2_surf = loaderPrivate;
- bool v = tpl_surface_validate(dri2_surf->tpl_surface);
+ struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ bool v = true;
+ tpl_result_t res = TPL_ERROR_NONE;
+ int width, height;
+
+ res = tpl_surface_get_size(dri2_surf->tpl_surface, &width, &height);
+ if (res != TPL_ERROR_NONE)
+ return false;
+
+ if ((width != dri2_surf->base.Width) || (height != dri2_surf->base.Height))
+ v = false;
- dri2_surf->valid = v;
- return v;
+ dri2_surf->valid = v;
+ return v;
}
static int