Reduced the calling tpl_surface_validate.
authorJoonbum Ko <joonbum.ko@samsung.com>
Wed, 22 Jul 2020 10:15:06 +0000 (19:15 +0900)
committerXuelian Bai <xuelian.bai@samsung.com>
Tue, 21 Feb 2023 06:32:52 +0000 (14:32 +0800)
Change-Id: I92d33fba7cc073dc43cf6babc56778a600148b1a
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/egl/drivers/dri2/platform_tizen.c

index a4b591f..f0681b0 100755 (executable)
@@ -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