From 48685c45bb333c3564596158e2e67267110c9277 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 8 May 2009 15:23:38 -0700 Subject: only export the GL entry-points, hide everything else. Conflicts: opengl/libagl/Android.mk opengl/libs/Android.mk opengl/libs/egl_impl.h --- opengl/include/GLES/glext.h | 8 ++++---- opengl/include/KHR/khrplatform.h | 2 ++ opengl/libagl/Android.mk | 2 ++ opengl/libs/Android.mk | 4 ++++ opengl/libs/egl_impl.h | 2 ++ 5 files changed, 14 insertions(+), 4 deletions(-) (limited to 'opengl') diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h index 4c01871..3984333 100644 --- a/opengl/include/GLES/glext.h +++ b/opengl/include/GLES/glext.h @@ -603,13 +603,13 @@ typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, * dalvik extension functions *------------------------------------------------------------------------*/ #ifdef ANDROID -void glColorPointerBounds(GLint size, GLenum type, GLsizei stride, +GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLsizei count); -void glNormalPointerBounds(GLenum type, GLsizei stride, +GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, const GLvoid *pointer, GLsizei count); -void glTexCoordPointerBounds(GLint size, GLenum type, +GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer, GLsizei count); -void glVertexPointerBounds(GLint size, GLenum type, +GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer, GLsizei count); #endif diff --git a/opengl/include/KHR/khrplatform.h b/opengl/include/KHR/khrplatform.h index 4cc27c5..1660bd7 100644 --- a/opengl/include/KHR/khrplatform.h +++ b/opengl/include/KHR/khrplatform.h @@ -91,6 +91,8 @@ # define KHRONOS_APICALL __declspec(dllimport) #elif defined (__SYMBIAN32__) # define KHRONOS_APICALL IMPORT_C +#elif defined(ANDROID) +# define KHRONOS_APICALL __attribute__((visibility("default"))) #else # define KHRONOS_APICALL #endif diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk index 99efe4c..3ce0414 100644 --- a/opengl/libagl/Android.mk +++ b/opengl/libagl/Android.mk @@ -33,6 +33,8 @@ ifneq ($(TARGET_SIMULATOR),true) endif LOCAL_SHARED_LIBRARIES := libcutils libutils libpixelflinger +LOCAL_CFLAGS += -fvisibility=hidden + LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE:= libagl diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index d636d73..5ba6b76 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -23,6 +23,8 @@ else LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../bionic/libc/private endif +LOCAL_CFLAGS += -fvisibility=hidden + include $(BUILD_SHARED_LIBRARY) @@ -49,4 +51,6 @@ else LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../bionic/libc/private endif +LOCAL_CFLAGS += -fvisibility=hidden + include $(BUILD_SHARED_LIBRARY) diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h index 62ce3fc..312b176 100644 --- a/opengl/libs/egl_impl.h +++ b/opengl/libs/egl_impl.h @@ -20,6 +20,8 @@ #include #include +#include +#include // ---------------------------------------------------------------------------- namespace android { -- cgit v1.1 From 94aa09680a530353448bc9052cec9c6b205db8b4 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 8 May 2009 15:59:34 -0700 Subject: should fix the build. --- opengl/libs/EGL/gpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'opengl') diff --git a/opengl/libs/EGL/gpu.cpp b/opengl/libs/EGL/gpu.cpp index 3f9fd63..f9dc5f1 100644 --- a/opengl/libs/EGL/gpu.cpp +++ b/opengl/libs/EGL/gpu.cpp @@ -53,7 +53,7 @@ namespace android { static Mutex gRegionsLock; static request_gpu_t gRegions; static sp gSurfaceManager; -ISurfaceComposer* GLES_localSurfaceManager = 0; +GL_API ISurfaceComposer* GLES_localSurfaceManager = 0; extern egl_connection_t gEGLImpl[2]; -- cgit v1.1 From d373c6348a91595dd4c0b83ad256dbf30870fa5d Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 8 May 2009 15:35:17 -0700 Subject: remove the gl{Vertex|Color|TexCoord|Normal}PointerBounds() "extension" fro eglext.h --- opengl/include/GLES/glext.h | 15 --------------- opengl/libs/GLES_CM/gl.cpp | 11 +++++++++++ opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp | 13 +++++++++++++ opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp | 13 +++++++++++++ 4 files changed, 37 insertions(+), 15 deletions(-) (limited to 'opengl') diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h index 3984333..a8fe2e9 100644 --- a/opengl/include/GLES/glext.h +++ b/opengl/include/GLES/glext.h @@ -599,21 +599,6 @@ typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, #define GL_EXT_texture_filter_anisotropic 1 #endif -/*------------------------------------------------------------------------* - * dalvik extension functions - *------------------------------------------------------------------------*/ -#ifdef ANDROID -GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr, GLsizei count); -GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, - const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -#endif - - #ifdef __cplusplus } #endif diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp index 0057168..384b59a 100644 --- a/opengl/libs/GLES_CM/gl.cpp +++ b/opengl/libs/GLES_CM/gl.cpp @@ -37,6 +37,17 @@ using namespace android; // extensions for the framework // ---------------------------------------------------------------------------- +extern "C" { +GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, + const GLvoid *ptr, GLsizei count); +GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, + const GLvoid *pointer, GLsizei count); +GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count); +GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count); +} + void glColorPointerBounds(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr, GLsizei count) { glColorPointer(size, type, stride, ptr); diff --git a/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp index 7aa18b6..3948fd3 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp @@ -23,6 +23,19 @@ #include #include +/* special calls implemented in Android's GLES wrapper used to more + * efficiently bound-check passed arrays */ +extern "C" { +GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, + const GLvoid *ptr, GLsizei count); +GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, + const GLvoid *pointer, GLsizei count); +GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count); +GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count); +} + static int initialized = 0; static jclass nioAccessClass; diff --git a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp index 8f174c7..11c6087 100644 --- a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp +++ b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp @@ -23,6 +23,19 @@ #include #include +/* special calls implemented in Android's GLES wrapper used to more + * efficiently bound-check passed arrays */ +extern "C" { +GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, + const GLvoid *ptr, GLsizei count); +GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, + const GLvoid *pointer, GLsizei count); +GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count); +GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count); +} + static int initialized = 0; static jclass nioAccessClass; -- cgit v1.1 From eccc8cfb2fc83e7f924016ef31e3a4a12e347e99 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Wed, 13 May 2009 00:19:22 -0700 Subject: should help fix the Simulator build. --- opengl/libs/EGL/egl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opengl') diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 5ed3ecc..25e31ee 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -164,8 +164,8 @@ static pthread_key_t gEGLThreadLocalStorageKey = -1; // ---------------------------------------------------------------------------- -gl_hooks_t gHooks[IMPL_NUM_IMPLEMENTATIONS]; -pthread_key_t gGLWrapperKey = -1; +EGLAPI gl_hooks_t gHooks[IMPL_NUM_IMPLEMENTATIONS]; +EGLAPI pthread_key_t gGLWrapperKey = -1; // ---------------------------------------------------------------------------- -- cgit v1.1