summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/eglApi.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-29 17:55:46 -0800
committerMathias Agopian <mathias@google.com>2011-11-29 18:00:35 -0800
commitcadd325aff7354be23d3bccb4f53b603f1506c9f (patch)
tree1d9621d70c04d9b89a95144c575cb640fa41462c /opengl/libs/EGL/eglApi.cpp
parentf296ee697409b4b55bef17d534edbc24a4619f0f (diff)
downloadframeworks_base-cadd325aff7354be23d3bccb4f53b603f1506c9f.zip
frameworks_base-cadd325aff7354be23d3bccb4f53b603f1506c9f.tar.gz
frameworks_base-cadd325aff7354be23d3bccb4f53b603f1506c9f.tar.bz2
add a way to access the version string of the h/w implementation of EGL
we use a hidden egl extension. the version string is printed in SF's dumpsys log. Change-Id: I123eb4bde6de462bb2404c67b74d6d6219a48d6a
Diffstat (limited to 'opengl/libs/EGL/eglApi.cpp')
-rw-r--r--opengl/libs/EGL/eglApi.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index a63d5b0..2b0ed5d 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -49,6 +49,8 @@ using namespace android;
// ----------------------------------------------------------------------------
+#define EGL_VERSION_HW_ANDROID 0x3143
+
struct extention_map_t {
const char* name;
__eglMustCastToProperFunctionPointerType address;
@@ -972,6 +974,12 @@ const char* eglQueryString(EGLDisplay dpy, EGLint name)
return dp->getExtensionString();
case EGL_CLIENT_APIS:
return dp->getClientApiString();
+ case EGL_VERSION_HW_ANDROID: {
+ if (gEGLImpl[IMPL_HARDWARE].dso) {
+ return dp->disp[IMPL_HARDWARE].queryString.version;
+ }
+ return dp->disp[IMPL_SOFTWARE].queryString.version;
+ }
}
return setError(EGL_BAD_PARAMETER, (const char *)0);
}