From cadd325aff7354be23d3bccb4f53b603f1506c9f Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 29 Nov 2011 17:55:46 -0800 Subject: 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 --- opengl/libs/EGL/eglApi.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'opengl/libs/EGL/eglApi.cpp') 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); } -- cgit v1.1