summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.h
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-10-23 11:59:03 +0800
committerChia-I Wu <[email protected]>2010-10-23 15:19:34 +0800
commitdc4f845c37a8446de19036e24fd397a0aa864c02 (patch)
tree7b1d125da53a1a6f932eae5cdbbdbcf489474601 /src/egl/main/egldisplay.h
parent662e098b560c6983f5ac320cc5ff7a82ecdc5f8a (diff)
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.
Diffstat (limited to 'src/egl/main/egldisplay.h')
-rw-r--r--src/egl/main/egldisplay.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index f99721e6982..bcba05480a8 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;
@@ -162,6 +163,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);