From ecdf21035ec1990ff7ae378b1d6c310a5b3036dc Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 9 Jul 2021 17:14:47 -0400 Subject: [PATCH] glamor: Assume EGL in glamor_context Reviewed-by: Emma Anholt --- glamor/glamor_context.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/glamor/glamor_context.h b/glamor/glamor_context.h index 47b87e620..50986971c 100644 --- a/glamor/glamor_context.h +++ b/glamor/glamor_context.h @@ -21,29 +21,26 @@ * IN THE SOFTWARE. */ +#ifndef GLAMOR_CONTEXT_H +#define GLAMOR_CONTEXT_H + +#include + /** * @file glamor_context.h * * This is the struct of state required for context switching in - * glamor. It has to use types that don't require including either - * server headers or Xlib headers, since it will be included by both - * the server and the GLX (xlib) code. + * glamor. Initially this was abstracted away from EGL, and + * presumably it would need to be again if someone wanted to use + * glamor with WGL/CGL. */ struct glamor_context { - /** Either an EGLDisplay or an Xlib Display */ - void *display; - - /** Either a GLXContext or an EGLContext. */ - void *ctx; - - /** The EGLSurface we should MakeCurrent to */ - void *drawable; - - /** The GLXDrawable we should MakeCurrent to */ - uint32_t drawable_xid; + EGLDisplay display; + EGLContext ctx; + EGLSurface surface; void (*make_current)(struct glamor_context *glamor_ctx); }; -Bool glamor_glx_screen_init(struct glamor_context *glamor_ctx); +#endif