summaryrefslogtreecommitdiffstats
path: root/opengl/libs
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-06-24 22:37:39 -0700
committerMathias Agopian <mathias@google.com>2009-06-25 00:02:44 -0700
commit8d2e83b9f44c7f2207a312fcfda8eb3a4c26745f (patch)
tree4627e6412931f53b9fa275783fc3701707f2ea24 /opengl/libs
parentaf74213546acc887b2b9e93459124cefd7f5e335 (diff)
downloadframeworks_native-8d2e83b9f44c7f2207a312fcfda8eb3a4c26745f.zip
frameworks_native-8d2e83b9f44c7f2207a312fcfda8eb3a4c26745f.tar.gz
frameworks_native-8d2e83b9f44c7f2207a312fcfda8eb3a4c26745f.tar.bz2
Add eglGetRenderBufferANDROID() extension, which returns the current render buffer as an android_native_buffer_t*
Diffstat (limited to 'opengl/libs')
-rw-r--r--opengl/libs/EGL/egl.cpp17
-rw-r--r--opengl/libs/EGL/egl_entries.in1
2 files changed, 18 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index fec4e5d..004b74a 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -58,6 +58,7 @@ static char const * const gExtensionString =
"EGL_KHR_image_pixmap "
"EGL_ANDROID_image_native_buffer "
"EGL_ANDROID_swap_rectangle "
+ "EGL_ANDROID_get_render_buffer "
;
// ----------------------------------------------------------------------------
@@ -303,6 +304,10 @@ static const extention_map_t gExtentionMap[] = {
(__eglMustCastToProperFunctionPointerType)&eglCreateImageKHR },
{ "eglDestroyImageKHR",
(__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR },
+ { "eglSetSwapRectangleANDROID",
+ (__eglMustCastToProperFunctionPointerType)&eglSetSwapRectangleANDROID },
+ { "eglGetRenderBufferANDROID",
+ (__eglMustCastToProperFunctionPointerType)&eglGetRenderBufferANDROID },
};
static extention_map_t gGLExtentionMap[MAX_NUMBER_OF_GL_EXTENSIONS];
@@ -1484,3 +1489,15 @@ EGLBoolean eglSetSwapRectangleANDROID(EGLDisplay dpy, EGLSurface draw,
return EGL_FALSE;
}
+EGLClientBuffer eglGetRenderBufferANDROID(EGLDisplay dpy, EGLSurface draw)
+{
+ if (!validate_display_surface(dpy, draw))
+ return 0;
+ egl_display_t const * const dp = get_display(dpy);
+ egl_surface_t const * const s = get_surface(draw);
+ if (s->cnx->hooks->egl.eglGetRenderBufferANDROID) {
+ return s->cnx->hooks->egl.eglGetRenderBufferANDROID(dp->dpys[s->impl],
+ s->surface);
+ }
+ return 0;
+}
diff --git a/opengl/libs/EGL/egl_entries.in b/opengl/libs/EGL/egl_entries.in
index 1fe2b57..5d89287 100644
--- a/opengl/libs/EGL/egl_entries.in
+++ b/opengl/libs/EGL/egl_entries.in
@@ -54,3 +54,4 @@ EGL_ENTRY(EGLBoolean, eglDestroyImageKHR, EGLDisplay, EGLImageKHR)
/* ANDROID extensions */
EGL_ENTRY(EGLBoolean, eglSetSwapRectangleANDROID, EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint)
+EGL_ENTRY(EGLClientBuffer, eglGetRenderBufferANDROID, EGLDisplay, EGLSurface)