summaryrefslogtreecommitdiffstats
path: root/src/loader/loader_dri3_helper.c
diff options
context:
space:
mode:
authorBrendan King <[email protected]>2017-02-17 15:12:21 +0000
committerEric Engestrom <[email protected]>2017-02-28 10:11:42 +0000
commit884f65e1856733697a894c86f94803343cfa9a21 (patch)
tree3130a3c25d6a0a3ed26ae16d706da7791458fa97 /src/loader/loader_dri3_helper.c
parent936f5407a7da0449926a4f89abd222503ba43eb4 (diff)
egl/dri3: implement query surface hook
This is a DRI3 version of a change made for DRI2 (4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"), that fixed failures in dEQP-EGL.functional.resize.surface_size.grow and dEQP-EGL.functional.resize.surface_size.shrink. Cc: Tapani Pälli <[email protected]> Cc: Mark Janes <[email protected]> Cc: Chad Versace <[email protected]> Signed-off-by: Brendan King <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Cc: "17.0" <[email protected]>
Diffstat (limited to 'src/loader/loader_dri3_helper.c')
-rw-r--r--src/loader/loader_dri3_helper.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 6e5d1b8843e..493a7f5218c 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1408,3 +1408,26 @@ loader_dri3_get_buffers(__DRIdrawable *driDrawable,
return true;
}
+
+/** loader_dri3_update_drawable_geometry
+ *
+ * Get the current drawable geometry.
+ */
+void
+loader_dri3_update_drawable_geometry(struct loader_dri3_drawable *draw)
+{
+ xcb_get_geometry_cookie_t geom_cookie;
+ xcb_get_geometry_reply_t *geom_reply;
+
+ geom_cookie = xcb_get_geometry(draw->conn, draw->drawable);
+
+ geom_reply = xcb_get_geometry_reply(draw->conn, geom_cookie, NULL);
+
+ if (geom_reply) {
+ draw->width = geom_reply->width;
+ draw->height = geom_reply->height;
+ draw->vtable->set_drawable_size(draw, draw->width, draw->height);
+
+ free(geom_reply);
+ }
+}