Loading opengl/include/EGL/eglext.h +7 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,13 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL #define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ #endif #ifndef EGL_KHR_gl_colorspace #define EGL_KHR_gl_colorspace 1 #define EGL_GL_COLORSPACE_KHR 0x309D #define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 #define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A #endif #ifndef EGL_KHR_gl_renderbuffer_image #define EGL_KHR_gl_renderbuffer_image 1 #define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ Loading opengl/libs/EGL/eglApi.cpp +1 −23 Original line number Diff line number Diff line Loading @@ -50,10 +50,6 @@ using namespace android; // This extension has not been ratified yet, so can't be shipped. // Implementation is incomplete and untested. #define ENABLE_EGL_KHR_GL_COLORSPACE 0 #define ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS 0 // ---------------------------------------------------------------------------- Loading Loading @@ -95,9 +91,7 @@ extern char const * const gExtensionString = "EGL_KHR_image_base " // mandatory "EGL_KHR_image_pixmap " "EGL_KHR_lock_surface " #if (ENABLE_EGL_KHR_GL_COLORSPACE != 0) "EGL_KHR_gl_colorspace " #endif "EGL_KHR_gl_texture_2D_image " "EGL_KHR_gl_texture_3D_image " "EGL_KHR_gl_texture_cubemap_image " Loading Loading @@ -436,12 +430,6 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, // surfaces // ---------------------------------------------------------------------------- // The EGL_KHR_gl_colorspace spec hasn't been ratified yet, so these haven't // been added to the Khronos egl.h. #define EGL_GL_COLORSPACE_KHR EGL_VG_COLORSPACE #define EGL_GL_COLORSPACE_SRGB_KHR EGL_VG_COLORSPACE_sRGB #define EGL_GL_COLORSPACE_LINEAR_KHR EGL_VG_COLORSPACE_LINEAR // Turn linear formats into corresponding sRGB formats when colorspace is // EGL_GL_COLORSPACE_SRGB_KHR, or turn sRGB formats into corresponding linear // formats when colorspace is EGL_GL_COLORSPACE_LINEAR_KHR. In any cases where Loading Loading @@ -508,17 +496,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, if (attrib_list && dp->haveExtension("EGL_KHR_gl_colorspace")) { for (const EGLint* attr = attrib_list; *attr != EGL_NONE; attr += 2) { if (*attr == EGL_GL_COLORSPACE_KHR) { if (ENABLE_EGL_KHR_GL_COLORSPACE) { dataSpace = modifyBufferDataspace(dataSpace, *(attr+1)); } else { // Normally we'd pass through unhandled attributes to // the driver. But in case the driver implements this // extension but we're disabling it, we want to prevent // it getting through -- support will be broken without // our help. ALOGE("sRGB window surfaces not supported"); return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE); } } } } Loading Loading
opengl/include/EGL/eglext.h +7 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,13 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL #define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ #endif #ifndef EGL_KHR_gl_colorspace #define EGL_KHR_gl_colorspace 1 #define EGL_GL_COLORSPACE_KHR 0x309D #define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 #define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A #endif #ifndef EGL_KHR_gl_renderbuffer_image #define EGL_KHR_gl_renderbuffer_image 1 #define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ Loading
opengl/libs/EGL/eglApi.cpp +1 −23 Original line number Diff line number Diff line Loading @@ -50,10 +50,6 @@ using namespace android; // This extension has not been ratified yet, so can't be shipped. // Implementation is incomplete and untested. #define ENABLE_EGL_KHR_GL_COLORSPACE 0 #define ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS 0 // ---------------------------------------------------------------------------- Loading Loading @@ -95,9 +91,7 @@ extern char const * const gExtensionString = "EGL_KHR_image_base " // mandatory "EGL_KHR_image_pixmap " "EGL_KHR_lock_surface " #if (ENABLE_EGL_KHR_GL_COLORSPACE != 0) "EGL_KHR_gl_colorspace " #endif "EGL_KHR_gl_texture_2D_image " "EGL_KHR_gl_texture_3D_image " "EGL_KHR_gl_texture_cubemap_image " Loading Loading @@ -436,12 +430,6 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, // surfaces // ---------------------------------------------------------------------------- // The EGL_KHR_gl_colorspace spec hasn't been ratified yet, so these haven't // been added to the Khronos egl.h. #define EGL_GL_COLORSPACE_KHR EGL_VG_COLORSPACE #define EGL_GL_COLORSPACE_SRGB_KHR EGL_VG_COLORSPACE_sRGB #define EGL_GL_COLORSPACE_LINEAR_KHR EGL_VG_COLORSPACE_LINEAR // Turn linear formats into corresponding sRGB formats when colorspace is // EGL_GL_COLORSPACE_SRGB_KHR, or turn sRGB formats into corresponding linear // formats when colorspace is EGL_GL_COLORSPACE_LINEAR_KHR. In any cases where Loading Loading @@ -508,17 +496,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, if (attrib_list && dp->haveExtension("EGL_KHR_gl_colorspace")) { for (const EGLint* attr = attrib_list; *attr != EGL_NONE; attr += 2) { if (*attr == EGL_GL_COLORSPACE_KHR) { if (ENABLE_EGL_KHR_GL_COLORSPACE) { dataSpace = modifyBufferDataspace(dataSpace, *(attr+1)); } else { // Normally we'd pass through unhandled attributes to // the driver. But in case the driver implements this // extension but we're disabling it, we want to prevent // it getting through -- support will be broken without // our help. ALOGE("sRGB window surfaces not supported"); return setError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE); } } } } Loading