summaryrefslogtreecommitdiff
path: root/src/egl/main/eglimage.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-10-23 11:59:03 +0800
committerChia-I Wu <olv@lunarg.com>2010-10-23 15:19:34 +0800
commitdc4f845c37a8446de19036e24fd397a0aa864c02 (patch)
tree7b1d125da53a1a6f932eae5cdbbdbcf489474601 /src/egl/main/eglimage.c
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/eglimage.c')
-rw-r--r--src/egl/main/eglimage.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index af4a29fb0e..9625d2ae84 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -81,8 +81,7 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *dpy,
EGLBoolean
_eglInitImage(_EGLImage *img, _EGLDisplay *dpy)
{
- memset(img, 0, sizeof(_EGLImage));
- img->Resource.Display = dpy;
+ _eglInitResource(&img->Resource, sizeof(*img), dpy);
return EGL_TRUE;
}