summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-02-25 22:50:24 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-02-25 22:50:25 +0000
commitb78cce6f92e38b57a6a56183cdbafc054c5758fe (patch)
treeaf98b286d6454200b4f2a672ee1f436bc1c25195
parent0d8b97a44e4cb5c5cfffd6421eb2cec1ebc00d2f (diff)
parent10caf0390d39f0bd46876eee6ab2c9a73d4e1d39 (diff)
downloadframeworks_base-b78cce6f92e38b57a6a56183cdbafc054c5758fe.zip
frameworks_base-b78cce6f92e38b57a6a56183cdbafc054c5758fe.tar.gz
frameworks_base-b78cce6f92e38b57a6a56183cdbafc054c5758fe.tar.bz2
Merge "Update autogenerated gl functions."
-rw-r--r--core/jni/Android.mk2
-rw-r--r--core/jni/android_opengl_EGL14.cpp3
-rw-r--r--core/jni/android_opengl_GLES30.cpp8
3 files changed, 9 insertions, 4 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index d070c97..20ece24 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -5,7 +5,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_CFLAGS += -DHAVE_CONFIG_H -DKHTML_NO_EXCEPTIONS -DGKWQ_NO_JAVA
LOCAL_CFLAGS += -DNO_SUPPORT_JS_BINDING -DQT_NO_WHEELEVENT -DKHTML_NO_XBL
LOCAL_CFLAGS += -U__APPLE__
-LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast
+LOCAL_CFLAGS += -Wno-unused-parameter
LOCAL_CFLAGS += -Wno-non-virtual-dtor
LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses
LOCAL_CPPFLAGS += -Wno-conversion-null
diff --git a/core/jni/android_opengl_EGL14.cpp b/core/jni/android_opengl_EGL14.cpp
index 1afcf73..36f7963 100644
--- a/core/jni/android_opengl_EGL14.cpp
+++ b/core/jni/android_opengl_EGL14.cpp
@@ -160,7 +160,8 @@ static jobject
android_eglGetDisplayInt
(JNIEnv *_env, jobject _this, jint display_id) {
- if ((EGLNativeDisplayType)display_id != EGL_DEFAULT_DISPLAY) {
+ if (static_cast<uintptr_t>(display_id) !=
+ reinterpret_cast<uintptr_t>(EGL_DEFAULT_DISPLAY)) {
jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglGetDisplay");
return 0;
}
diff --git a/core/jni/android_opengl_GLES30.cpp b/core/jni/android_opengl_GLES30.cpp
index 713fff9..226162d 100644
--- a/core/jni/android_opengl_GLES30.cpp
+++ b/core/jni/android_opengl_GLES30.cpp
@@ -1935,7 +1935,11 @@ android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuff
(GLsizei *)length,
(GLint *)size,
(GLenum *)type,
- (char *)name
+ // The cast below is incorrect. The driver will end up writing to the
+ // address specified by name, which will always crash the process since
+ // it is guaranteed to be in low memory. The additional static_cast
+ // suppresses the warning for now. http://b/19478262
+ (char *)static_cast<uintptr_t>(name)
);
if (_typeArray) {
releasePointer(_env, _typeArray, type, JNI_TRUE);
@@ -3643,7 +3647,7 @@ android_glDrawElementsInstanced__IIIII
(GLenum)mode,
(GLsizei)count,
(GLenum)type,
- (GLvoid *)indicesOffset,
+ (GLvoid *)static_cast<uintptr_t>(indicesOffset),
(GLsizei)instanceCount
);
}