[Mesa-dev] [PATCH 2/2] egl: wayland: bufferAge: only request a back buffer if there isn't one
Lionel Landwerlin
llandwerlin at gmail.com
Wed Dec 7 11:57:53 UTC 2016
Seeing gtk+ application lockup when they query the buffer age of a surface.
Since we update the buffer age field only when creating buffers & swaping
them on the client side, there shouldn't be any need for requesting a new
back buffer if there is already one available.
This change depends on a previous commit settings the age value of buffers
to 0 on buffer destruction, so we're sure to always have an up to date
value.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84016
---
src/egl/drivers/dri2/platform_wayland.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 540cf690ca..78989cf33d 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -800,7 +800,7 @@ dri2_wl_query_buffer_age(_EGLDriver *drv,
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surface);
- if (get_back_bo(dri2_surf) < 0) {
+ if (dri2_surf->back == NULL && get_back_bo(dri2_surf) < 0) {
_eglError(EGL_BAD_ALLOC, "dri2_query_buffer_age");
return 0;
}
--
2.11.0
More information about the mesa-dev
mailing list