aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglsurface.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-10-14 16:38:58 +0800
committerChia-I Wu <[email protected]>2010-10-14 17:16:14 +0800
commit3fa21881b18044292e7d9455e9a370a71249df22 (patch)
treed1b75b07ae9505e89895f0a862b903fbcf107f9e /src/egl/main/eglsurface.c
parent282e514240c8f514da768af6377ae61b9f79c81f (diff)
egl: Access config attributes directly.
Replace SET_CONFIG_ATTRIB/GET_CONFIG_ATTRIB by direct dereferences.
Diffstat (limited to 'src/egl/main/eglsurface.c')
-rw-r--r--src/egl/main/eglsurface.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
index 52f5c240c65..ec51dd6ba22 100644
--- a/src/egl/main/eglsurface.c
+++ b/src/egl/main/eglsurface.c
@@ -17,12 +17,12 @@
static void
_eglClampSwapInterval(_EGLSurface *surf, EGLint interval)
{
- EGLint bound = GET_CONFIG_ATTRIB(surf->Config, EGL_MAX_SWAP_INTERVAL);
+ EGLint bound = surf->Config->MaxSwapInterval;
if (interval >= bound) {
interval = bound;
}
else {
- bound = GET_CONFIG_ATTRIB(surf->Config, EGL_MIN_SWAP_INTERVAL);
+ bound = surf->Config->MinSwapInterval;
if (interval < bound)
interval = bound;
}
@@ -263,7 +263,7 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
return EGL_FALSE;
}
- if ((GET_CONFIG_ATTRIB(conf, EGL_SURFACE_TYPE) & type) == 0) {
+ if ((conf->SurfaceType & type) == 0) {
/* The config can't be used to create a surface of this type */
_eglError(EGL_BAD_CONFIG, func);
return EGL_FALSE;
@@ -333,7 +333,7 @@ _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
*value = surface->Height;
break;
case EGL_CONFIG_ID:
- *value = GET_CONFIG_ATTRIB(surface->Config, EGL_CONFIG_ID);
+ *value = surface->Config->ConfigID;
break;
case EGL_LARGEST_PBUFFER:
*value = surface->LargestPbuffer;
@@ -445,7 +445,7 @@ _eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
switch (attribute) {
case EGL_MIPMAP_LEVEL:
- confval = GET_CONFIG_ATTRIB(surface->Config, EGL_RENDERABLE_TYPE);
+ confval = surface->Config->RenderableType;
if (!(confval & (EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT))) {
err = EGL_BAD_PARAMETER;
break;
@@ -457,7 +457,7 @@ _eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
case EGL_MULTISAMPLE_RESOLVE_DEFAULT:
break;
case EGL_MULTISAMPLE_RESOLVE_BOX:
- confval = GET_CONFIG_ATTRIB(surface->Config, EGL_SURFACE_TYPE);
+ confval = surface->Config->SurfaceType;
if (!(confval & EGL_MULTISAMPLE_RESOLVE_BOX_BIT))
err = EGL_BAD_MATCH;
break;
@@ -474,7 +474,7 @@ _eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
case EGL_BUFFER_DESTROYED:
break;
case EGL_BUFFER_PRESERVED:
- confval = GET_CONFIG_ATTRIB(surface->Config, EGL_SURFACE_TYPE);
+ confval = surface->Config->SurfaceType;
if (!(confval & EGL_SWAP_BEHAVIOR_PRESERVED_BIT))
err = EGL_BAD_MATCH;
break;