Merge remote branch 'origin/master' into pipe-video
[mesa.git] / src / egl / main / eglcontext.h
index 84d8deed51c02c26ad4b207f0c82228372f66a0b..cfe92dd9f5c4c37234169810c1a5c02c93113f4f 100644 (file)
@@ -1,4 +1,3 @@
-
 #ifndef EGLCONTEXT_INCLUDED
 #define EGLCONTEXT_INCLUDED
 
@@ -31,7 +30,7 @@ struct _egl_context
 
 
 PUBLIC EGLBoolean
-_eglInitContext(_EGLDriver *drv, _EGLContext *ctx,
+_eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy,
                 _EGLConfig *config, const EGLint *attrib_list);
 
 
@@ -51,7 +50,7 @@ PUBLIC EGLBoolean
 _eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read);
 
 
-PUBLIC EGLBoolean
+extern EGLBoolean
 _eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx);
 
 
@@ -61,6 +60,9 @@ _eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLConte
 
 /**
  * Return true if the context is bound to a thread.
+ *
+ * The binding is considered a reference to the context.  Drivers should not
+ * destroy a context when it is bound.
  */
 static INLINE EGLBoolean
 _eglIsContextBound(_EGLContext *ctx)
@@ -120,6 +122,9 @@ _eglGetContextHandle(_EGLContext *ctx)
 
 /**
  * Return true if the context is linked to a display.
+ *
+ * The link is considered a reference to the context (the display is owning the
+ * context).  Drivers should not destroy a context when it is linked.
  */
 static INLINE EGLBoolean
 _eglIsContextLinked(_EGLContext *ctx)