diff options
Diffstat (limited to 'src/egl/main/eglimage.h')
-rw-r--r-- | src/egl/main/eglimage.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h index 161230f9009..bdc325a7f33 100644 --- a/src/egl/main/eglimage.h +++ b/src/egl/main/eglimage.h @@ -43,6 +43,28 @@ _eglInitImage(_EGLImage *img, _EGLDisplay *dpy); /** + * Increment reference count for the image. + */ +static INLINE _EGLImage * +_eglGetImage(_EGLImage *img) +{ + if (img) + _eglGetResource(&img->Resource); + return img; +} + + +/** + * Decrement reference count for the image. + */ +static INLINE EGLBoolean +_eglPutImage(_EGLImage *img) +{ + return (img) ? _eglPutResource(&img->Resource) : EGL_FALSE; +} + + +/** * Link an image to its display and return the handle of the link. * The handle can be passed to client directly. */ |