diff options
author | Adam Jackson <ajax@redhat.com> | 2017-07-14 15:01:07 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-07-17 09:26:16 -0400 |
commit | 54b5ccf888301d6d48f9083af80a039d8135a190 (patch) | |
tree | 9af94fcf2cece9d635c291e790b87a650353fbe7 | |
parent | 52ff7e75d1d0b764d9c5fef2abe37574daa6fd42 (diff) |
glamor: Add glamor_get_screen_contextwtf-gcc
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | glamor/glamor.c | 8 | ||||
-rw-r--r-- | glamor/glamor.h | 2 | ||||
-rw-r--r-- | glamor/glamor_context.h | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c index 573fe8e4a..1ee2ccd11 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -34,6 +34,7 @@ #include <stdlib.h> #include "glamor_priv.h" +#include "glamor_context.h" #include "mipict.h" DevPrivateKeyRec glamor_screen_private_key; @@ -53,6 +54,13 @@ glamor_set_screen_private(ScreenPtr screen, glamor_screen_private *priv) dixSetPrivate(&screen->devPrivates, &glamor_screen_private_key, priv); } +/* XXX put me elsewhere */ +struct glamor_ctx * +glamor_get_screen_context(ScreenPtr screen) +{ + return (struct glamor_ctx *)&(glamor_get_screen_private(screen)->ctx); +} + /** * glamor_get_drawable_pixmap() returns a backing pixmap for a given drawable. * diff --git a/glamor/glamor.h b/glamor/glamor.h index 5b15a46e5..404009c99 100644 --- a/glamor/glamor.h +++ b/glamor/glamor.h @@ -351,4 +351,6 @@ extern _X_EXPORT XF86VideoAdaptorPtr glamor_xv_init(ScreenPtr pScreen, int num_texture_ports); #endif +extern struct glamor_ctx *glamor_get_screen_context(ScreenPtr screen); + #endif /* GLAMOR_H */ diff --git a/glamor/glamor_context.h b/glamor/glamor_context.h index 47b87e620..874ff1db8 100644 --- a/glamor/glamor_context.h +++ b/glamor/glamor_context.h @@ -30,6 +30,9 @@ * the server and the GLX (xlib) code. */ +// #ifndef GLAMOR_CONTEXT_H +// #define GLAMOR_CONTEXT_H + struct glamor_context { /** Either an EGLDisplay or an Xlib Display */ void *display; @@ -47,3 +50,5 @@ struct glamor_context { }; Bool glamor_glx_screen_init(struct glamor_context *glamor_ctx); + +// #endif |