aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-01-31 13:33:57 +0800
committerChia-I Wu <[email protected]>2010-01-31 14:46:14 +0800
commitd69242be55091e53b0ae2cfa6282790ce1862f29 (patch)
tree84ac6ceb40d6893d6a69b9ad7fef47677416772b /src/egl/main
parente694ccad803157b71b2de78d63ee6dacc489faab (diff)
egl: Initialize display resources with their display.
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an _EGLDisplay instead of an _EGLDriver. This is a more natural form, and plus, the display encodes information such as the extensions supported that might be required for attribute list parsing.
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglcontext.c5
-rw-r--r--src/egl/main/eglcontext.h2
-rw-r--r--src/egl/main/eglimage.c3
-rw-r--r--src/egl/main/eglimage.h2
-rw-r--r--src/egl/main/eglsurface.c3
-rw-r--r--src/egl/main/eglsurface.h2
6 files changed, 10 insertions, 7 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index f73cf2d0b35..012d8dfe1f4 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -101,8 +101,8 @@ _eglParseContextAttribList(_EGLContext *ctx, const EGLint *attrib_list)
* in the attrib_list.
*/
EGLBoolean
-_eglInitContext(_EGLDriver *drv, _EGLContext *ctx,
- _EGLConfig *conf, const EGLint *attrib_list)
+_eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf,
+ const EGLint *attrib_list)
{
const EGLenum api = eglQueryAPI();
EGLint err;
@@ -113,6 +113,7 @@ _eglInitContext(_EGLDriver *drv, _EGLContext *ctx,
}
memset(ctx, 0, sizeof(_EGLContext));
+ ctx->Resource.Display = dpy;
ctx->ClientAPI = api;
ctx->Config = conf;
ctx->WindowRenderBuffer = EGL_NONE;
diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h
index ebb50aa60e6..14fce02c11b 100644
--- a/src/egl/main/eglcontext.h
+++ b/src/egl/main/eglcontext.h
@@ -30,7 +30,7 @@ struct _egl_context
PUBLIC EGLBoolean
-_eglInitContext(_EGLDriver *drv, _EGLContext *ctx,
+_eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy,
_EGLConfig *config, const EGLint *attrib_list);
diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index 5b27df0267d..e7a293b3743 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
@@ -44,11 +44,12 @@ _eglParseImageAttribList(_EGLImage *img, const EGLint *attrib_list)
EGLBoolean
-_eglInitImage(_EGLDriver *drv, _EGLImage *img, const EGLint *attrib_list)
+_eglInitImage(_EGLImage *img, _EGLDisplay *dpy, const EGLint *attrib_list)
{
EGLint err;
memset(img, 0, sizeof(_EGLImage));
+ img->Resource.Display = dpy;
img->Preserved = EGL_FALSE;
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h
index 43107c23e9f..26bf054a07d 100644
--- a/src/egl/main/eglimage.h
+++ b/src/egl/main/eglimage.h
@@ -19,7 +19,7 @@ struct _egl_image
PUBLIC EGLBoolean
-_eglInitImage(_EGLDriver *drv, _EGLImage *img, const EGLint *attrib_list);
+_eglInitImage(_EGLImage *img, _EGLDisplay *dpy, const EGLint *attrib_list);
extern _EGLImage *
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
index 6d436cffc10..58a50e9ee7d 100644
--- a/src/egl/main/eglsurface.c
+++ b/src/egl/main/eglsurface.c
@@ -167,7 +167,7 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
* \return EGL_TRUE if no errors, EGL_FALSE otherwise.
*/
EGLBoolean
-_eglInitSurface(_EGLDriver *drv, _EGLSurface *surf, EGLint type,
+_eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
_EGLConfig *conf, const EGLint *attrib_list)
{
const char *func;
@@ -201,6 +201,7 @@ _eglInitSurface(_EGLDriver *drv, _EGLSurface *surf, EGLint type,
}
memset(surf, 0, sizeof(_EGLSurface));
+ surf->Resource.Display = dpy;
surf->Type = type;
surf->Config = conf;
diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h
index 0d64d20dd42..f054cb46d1a 100644
--- a/src/egl/main/eglsurface.h
+++ b/src/egl/main/eglsurface.h
@@ -40,7 +40,7 @@ struct _egl_surface
PUBLIC EGLBoolean
-_eglInitSurface(_EGLDriver *drv, _EGLSurface *surf, EGLint type,
+_eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
_EGLConfig *config, const EGLint *attrib_list);