Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03ad785b authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am e8ba2aba: Merge "add a way to access the version string of the h/w...

am e8ba2aba: Merge "add a way to access the version string of the h/w implementation of EGL" into ics-mr1

* commit 'e8ba2aba934e3767d2081007bba93bad68566d22':
  add a way to access the version string of the h/w implementation of EGL
parents aa0c0b65 363c4a9f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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);
}
+2 −1
Original line number Diff line number Diff line
@@ -9,4 +9,5 @@ for use by Android extensions.
0x3140               EGL_ANDROID_image_native_buffer
0x3141               (unused)
0x3142               EGL_ANDROID_recordable
0x3143 - 0x314F      (unused)
0x3143               EGL_VERSION_HW_ANDROID (internal use)
0x3144 - 0x314F      (unused)
+9 −1
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@
#define AID_GRAPHICS 1003
#endif

#define EGL_VERSION_HW_ANDROID  0x3143

#define DISPLAY_COUNT       1

namespace android {
@@ -1548,6 +1550,12 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
                extensions.getRenderer(),
                extensions.getVersion());
        result.append(buffer);

        snprintf(buffer, SIZE, "EGL : %s\n",
                eglQueryString(graphicPlane(0).getEGLDisplay(),
                        EGL_VERSION_HW_ANDROID));
        result.append(buffer);

        snprintf(buffer, SIZE, "EXTS: %s\n", extensions.getExtension());
        result.append(buffer);