summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXuelian Bai <xuelian.bai@samsung.com>2019-05-05 19:27:39 +0800
committerSooChan Lim <sc1.lim@samsung.com>2019-05-07 00:52:53 +0000
commitb0dec10d0d0fbc7f77623016f3d986122f718f8b (patch)
treec57435318f32e12715a780fc107ef6a378a07237
parent78860276d442ef2be075c1c0043bf098e4a61b50 (diff)
downloadmesa-b0dec10d0d0fbc7f77623016f3d986122f718f8b.tar.gz
mesa-b0dec10d0d0fbc7f77623016f3d986122f718f8b.tar.bz2
mesa-b0dec10d0d0fbc7f77623016f3d986122f718f8b.zip
Pbuffer is not created via TPL, so when query a pbuffer surface, we can only call _eglQuerySurface instead of TPL APIs. Change-Id: I55c7f4d06392198ae41ffd0a9d5dd23fb15bd532
-rw-r--r--src/egl/drivers/dri2/platform_tizen.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c
index 0d33138e2e7..bd4594acd43 100644
--- a/src/egl/drivers/dri2/platform_tizen.c
+++ b/src/egl/drivers/dri2/platform_tizen.c
@@ -945,26 +945,28 @@ tizen_query_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
int width = 0, height = 0;
- if (tpl_display_get_native_window_info(dri2_dpy->tpl_display,
- dri2_surf->native_win,
- &width, &height, NULL, 0, 0) != TPL_ERROR_NONE)
- return EGL_FALSE;
-
- switch (attribute) {
- case EGL_WIDTH:
- if (dri2_surf->base.Type == EGL_WINDOW_BIT && dri2_surf->native_win) {
- *value = width;
- return EGL_TRUE;
- }
- break;
- case EGL_HEIGHT:
- if (dri2_surf->base.Type == EGL_WINDOW_BIT && dri2_surf->native_win) {
- *value = height;
- return EGL_TRUE;
- }
- break;
- default:
- break;
+ if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
+ if (tpl_display_get_native_window_info(dri2_dpy->tpl_display,
+ dri2_surf->native_win,
+ &width, &height, NULL, 0, 0) != TPL_ERROR_NONE)
+ return EGL_FALSE;
+
+ switch (attribute) {
+ case EGL_WIDTH:
+ if (dri2_surf->native_win) {
+ *value = width;
+ return EGL_TRUE;
+ }
+ break;
+ case EGL_HEIGHT:
+ if (dri2_surf->native_win) {
+ *value = height;
+ return EGL_TRUE;
+ }
+ break;
+ default:
+ break;
+ }
}
return _eglQuerySurface(drv, dpy, surf, attribute, value);
}