summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-07-17 13:37:57 -0400
committerAdam Jackson <ajax@redhat.com>2013-08-02 07:27:28 -0400
commitd5302bb597cd609908175008f1f307d5bbe315c1 (patch)
tree4a0bdba7e7254f121c2a912f8f0a013ba85e9435
parent137ad5c11c8e5548fc4d4df615d3dad33052263d (diff)
Add a way to get the EGLDisplay from the screen
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--src/glamor.h3
-rw-r--r--src/glamor_egl.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/glamor.h b/src/glamor.h
index c55c603..0509523 100644
--- a/src/glamor.h
+++ b/src/glamor.h
@@ -352,4 +352,7 @@ extern _X_EXPORT Bool glamor_poly_lines_nf(DrawablePtr drawable, GCPtr gc, int m
extern _X_EXPORT int glamor_pixmap_get_fbo(PixmapPtr pixmap);
+
+extern _X_EXPORT void *glamor_egl_get_display(ScreenPtr pScreen);
+
#endif /* GLAMOR_H */
diff --git a/src/glamor_egl.c b/src/glamor_egl.c
index 5b25b2e..6883b59 100644
--- a/src/glamor_egl.c
+++ b/src/glamor_egl.c
@@ -108,6 +108,12 @@ glamor_egl_get_screen_private(ScrnInfoPtr scrn)
scrn->privates[xf86GlamorEGLPrivateIndex].ptr;
}
+_X_EXPORT void *
+glamor_egl_get_display(ScreenPtr screen)
+{
+ return glamor_egl_get_screen_private(xf86ScreenToScrn(screen))->display;
+}
+
_X_EXPORT void
glamor_egl_make_current(ScreenPtr screen)
{