From dc4f845c37a8446de19036e24fd397a0aa864c02 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sat, 23 Oct 2010 11:59:03 +0800 Subject: egl: Add reference count for resources. This is a really simple mechanism. There is no atomicity and the caller is expected to hold the display lock. --- src/egl/main/egldisplay.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/egl/main/egldisplay.h') diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h index f99721e698..bcba05480a 100644 --- a/src/egl/main/egldisplay.h +++ b/src/egl/main/egldisplay.h @@ -40,6 +40,7 @@ struct _egl_resource /* which display the resource belongs to */ _EGLDisplay *Display; EGLBoolean IsLinked; + EGLint RefCount; /* used to link resources of the same type */ _EGLResource *Next; @@ -161,6 +162,18 @@ _eglGetDisplayHandle(_EGLDisplay *dpy) } +extern void +_eglInitResource(_EGLResource *res, EGLint size, _EGLDisplay *dpy); + + +PUBLIC void +_eglGetResource(_EGLResource *res); + + +PUBLIC EGLBoolean +_eglPutResource(_EGLResource *res); + + extern void _eglLinkResource(_EGLResource *res, _EGLResourceType type); -- cgit v1.2.3