summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-05-14 22:44:23 -0700
committerMathias Agopian <mathias@google.com>2009-05-14 22:44:23 -0700
commitd717598616910b5454b56429dec3bfad2757bd52 (patch)
treec2271b0f7e475c4ac1cf520bcecd6f35e002d99a /opengl
parent5958661507b39cd59e68e9bc2b54399af92847c4 (diff)
parent757a434f81895ddcad2481a5912ff1eb0de8a0d6 (diff)
downloadframeworks_native-d717598616910b5454b56429dec3bfad2757bd52.zip
frameworks_native-d717598616910b5454b56429dec3bfad2757bd52.tar.gz
frameworks_native-d717598616910b5454b56429dec3bfad2757bd52.tar.bz2
Merge commit 'goog/master' into merge_master
Conflicts: opengl/libagl/Android.mk opengl/libs/Android.mk opengl/libs/egl_impl.h
Diffstat (limited to 'opengl')
-rw-r--r--opengl/include/GLES/glext.h15
-rw-r--r--opengl/include/KHR/khrplatform.h2
-rw-r--r--opengl/libagl/Android.mk2
-rw-r--r--opengl/libs/Android.mk2
-rw-r--r--opengl/libs/EGL/egl.cpp4
-rw-r--r--opengl/libs/EGL/gpu.cpp2
-rw-r--r--opengl/libs/GLES_CM/gl.cpp11
-rw-r--r--opengl/libs/egl_impl.h3
-rw-r--r--opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp13
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp13
10 files changed, 48 insertions, 19 deletions
diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h
index 4c01871..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
-void glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count);
-void glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count);
-void glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-void glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count);
-#endif
-
-
#ifdef __cplusplus
}
#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 af5a700..946e849 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -44,6 +44,8 @@ LOCAL_CFLAGS += -DLOG_TAG=\"libagl\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
LOCAL_SHARED_LIBRARIES := libcutils libhardware 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 da00cc5..538e943 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -24,6 +24,7 @@ endif
LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+LOCAL_CFLAGS += -fvisibility=hidden
include $(BUILD_SHARED_LIBRARY)
@@ -53,5 +54,6 @@ endif
LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+LOCAL_CFLAGS += -fvisibility=hidden
include $(BUILD_SHARED_LIBRARY)
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 6c80538..7cdf494 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -178,8 +178,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;
// ----------------------------------------------------------------------------
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<ISurfaceComposer> gSurfaceManager;
-ISurfaceComposer* GLES_localSurfaceManager = 0;
+GL_API ISurfaceComposer* GLES_localSurfaceManager = 0;
extern egl_connection_t gEGLImpl[2];
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index d1b9ac6..3204d9a 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -35,6 +35,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/libs/egl_impl.h b/opengl/libs/egl_impl.h
index 4e0c7bf..80455d0 100644
--- a/opengl/libs/egl_impl.h
+++ b/opengl/libs/egl_impl.h
@@ -21,6 +21,7 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include <EGL/eglplatform.h>
// ----------------------------------------------------------------------------
namespace android {
@@ -37,7 +38,7 @@ struct egl_connection_t
int unavailable;
};
-EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image);
+EGLAPI EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image);
// ----------------------------------------------------------------------------
}; // namespace android
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 <GLES/gl.h>
#include <GLES/glext.h>
+/* 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 <GLES/gl.h>
#include <GLES/glext.h>
+/* 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;