summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglsurface.c
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2011-12-14 21:24:09 +0100
committerChia-I Wu <[email protected]>2011-12-20 17:04:46 +0800
commit7d46b45c5bd7d1ab3e32a2722ca65061ca80dc34 (patch)
tree0b93d727b5eb9e34f0a115abf51ee965488e528e /src/egl/main/eglsurface.c
parentf63e129d5fef73b0710d294ddc19440d9d388836 (diff)
egl: add EGL_NV_post_sub_buffer
v2: Handle EGL_POST_SUB_BUFFER_SUPPORTED_NV in _eglParseSurfaceAttribList() Signed-off-by: Fredrik Höglund <[email protected]> [olv: remove #ifdef checks]
Diffstat (limited to 'src/egl/main/eglsurface.c')
-rw-r--r--src/egl/main/eglsurface.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
index 3564ecd01b0..52d85ef8b70 100644
--- a/src/egl/main/eglsurface.c
+++ b/src/egl/main/eglsurface.c
@@ -170,6 +170,18 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
}
surf->RenderBuffer = val;
break;
+ case EGL_POST_SUB_BUFFER_SUPPORTED_NV:
+ if (!dpy->Extensions.NV_post_sub_buffer ||
+ type != EGL_WINDOW_BIT) {
+ err = EGL_BAD_ATTRIBUTE;
+ break;
+ }
+ if (val != EGL_TRUE && val != EGL_FALSE) {
+ err = EGL_BAD_PARAMETER;
+ break;
+ }
+ surf->PostSubBufferSupportedNV = val;
+ break;
/* pbuffer surface attributes */
case EGL_WIDTH:
if (type != EGL_PBUFFER_BIT) {
@@ -323,6 +335,8 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
surf->VerticalResolution = EGL_UNKNOWN;
surf->AspectRatio = EGL_UNKNOWN;
+ surf->PostSubBufferSupportedNV = EGL_FALSE;
+
/* the default swap interval is 1 */
_eglClampSwapInterval(surf, 1);
@@ -392,6 +406,9 @@ _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
case EGL_VG_COLORSPACE:
*value = surface->VGColorspace;
break;
+ case EGL_POST_SUB_BUFFER_SUPPORTED_NV:
+ *value = surface->PostSubBufferSupportedNV;
+ break;
default:
_eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface");
return EGL_FALSE;