summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonbum Ko <joonbum.ko@samsung.com>2020-07-22 19:15:06 +0900
committerJoonbum Ko <joonbum.ko@samsung.com>2020-07-22 19:15:19 +0900
commit35db761d2d89edd08c3c67e4da688091b48e5fcb (patch)
tree97c04b4f1e6a88a61dd2253390102739c41c911a
parent0a1a9cd4de3cf32c0795247cb424405e553f46a0 (diff)
downloadmesa-35db761d2d89edd08c3c67e4da688091b48e5fcb.tar.gz
mesa-35db761d2d89edd08c3c67e4da688091b48e5fcb.tar.bz2
mesa-35db761d2d89edd08c3c67e4da688091b48e5fcb.zip
Reduced the calling tpl_surface_validate.
Change-Id: I92d33fba7cc073dc43cf6babc56778a600148b1a Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
-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 aa665ac800f..91f62604e3e 100755
--- a/src/egl/drivers/dri2/platform_tizen.c
+++ b/src/egl/drivers/dri2/platform_tizen.c
@@ -1128,11 +1128,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