egl: inline fallback for swap_buffers_with_damage
[mesa.git] / src / egl / main / eglcontext.h
index 241917f3bead6df77675da829bb62d6c9448a3da..2c6ebd19cb9c2eb6bcfdc48e81d9e7c1cbb7c387 100644 (file)
 #include "egldisplay.h"
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * "Base" class for device driver contexts.
  */
@@ -58,19 +62,19 @@ struct _egl_context
    EGLint Flags;
    EGLint Profile;
    EGLint ResetNotificationStrategy;
-
-   /* The real render buffer when a window surface is bound */
-   EGLint WindowRenderBuffer;
+   EGLint ContextPriority;
+   EGLBoolean NoError;
+   EGLint ReleaseBehavior;
 };
 
 
 extern EGLBoolean
-_eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy,
+_eglInitContext(_EGLContext *ctx, _EGLDisplay *disp,
                 _EGLConfig *config, const EGLint *attrib_list);
 
 
 extern EGLBoolean
-_eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint attribute, EGLint *value);
+_eglQueryContext(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx, EGLint attribute, EGLint *value);
 
 
 extern EGLBoolean
@@ -78,6 +82,9 @@ _eglBindContext(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read,
                 _EGLContext **old_ctx,
                 _EGLSurface **old_draw, _EGLSurface **old_read);
 
+extern _EGLContext *
+_eglBindContextToThread(_EGLContext *ctx, _EGLThreadInfo *t);
+
 
 /**
  * Increment reference count for the context.
@@ -129,10 +136,10 @@ _eglUnlinkContext(_EGLContext *ctx)
  * Return NULL if the handle has no corresponding linked context.
  */
 static inline _EGLContext *
-_eglLookupContext(EGLContext context, _EGLDisplay *dpy)
+_eglLookupContext(EGLContext context, _EGLDisplay *disp)
 {
    _EGLContext *ctx = (_EGLContext *) context;
-   if (!dpy || !_eglCheckResource((void *) ctx, _EGL_RESOURCE_CONTEXT, dpy))
+   if (!disp || !_eglCheckResource((void *) ctx, _EGL_RESOURCE_CONTEXT, disp))
       ctx = NULL;
    return ctx;
 }
@@ -150,4 +157,8 @@ _eglGetContextHandle(_EGLContext *ctx)
 }
 
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* EGLCONTEXT_INCLUDED */