mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
egl: Clarify IsLinked and IsBound.
Both a link and a binding creates a reference to the resource. Drivers should not destroy the resource when there is a reference. The difference is better described in doc/egl.html.
This commit is contained in:
parent
fc5ca85a63
commit
b31255fbfd
2 changed files with 12 additions and 0 deletions
|
|
@ -60,6 +60,9 @@ _eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLConte
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the context is bound to a thread.
|
* 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
|
static INLINE EGLBoolean
|
||||||
_eglIsContextBound(_EGLContext *ctx)
|
_eglIsContextBound(_EGLContext *ctx)
|
||||||
|
|
@ -119,6 +122,9 @@ _eglGetContextHandle(_EGLContext *ctx)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the context is linked to a display.
|
* 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
|
static INLINE EGLBoolean
|
||||||
_eglIsContextLinked(_EGLContext *ctx)
|
_eglIsContextLinked(_EGLContext *ctx)
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,9 @@ _eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if there is a context bound to the surface.
|
* Return true if there is a context bound to the surface.
|
||||||
|
*
|
||||||
|
* The binding is considered a reference to the surface. Drivers should not
|
||||||
|
* destroy a surface when it is bound.
|
||||||
*/
|
*/
|
||||||
static INLINE EGLBoolean
|
static INLINE EGLBoolean
|
||||||
_eglIsSurfaceBound(_EGLSurface *surf)
|
_eglIsSurfaceBound(_EGLSurface *surf)
|
||||||
|
|
@ -166,6 +169,9 @@ _eglGetSurfaceHandle(_EGLSurface *surf)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the surface is linked to a display.
|
* Return true if the surface is linked to a display.
|
||||||
|
*
|
||||||
|
* The link is considered a reference to the surface (the display is owning the
|
||||||
|
* surface). Drivers should not destroy a surface when it is linked.
|
||||||
*/
|
*/
|
||||||
static INLINE EGLBoolean
|
static INLINE EGLBoolean
|
||||||
_eglIsSurfaceLinked(_EGLSurface *surf)
|
_eglIsSurfaceLinked(_EGLSurface *surf)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue