Merge "Frameworks/native: Add pragmas to glgen headers"

This commit is contained in:
Andreas Gampe 2014-11-12 18:30:40 +00:00 committed by Gerrit Code Review
commit fecc0bf4f1
13 changed files with 46 additions and 2 deletions

View File

@ -16,6 +16,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>

View File

@ -16,6 +16,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>

View File

@ -17,6 +17,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES/gl.h>
#include <GLES/glext.h>

View File

@ -17,6 +17,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES/gl.h>
#include <GLES/glext.h>

View File

@ -17,6 +17,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES/gl.h>
#include <GLES/glext.h>

View File

@ -17,6 +17,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES/gl.h>
#include <GLES/glext.h>

View File

@ -17,6 +17,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>

View File

@ -17,6 +17,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES3/gl3.h>
#include <GLES3/gl3ext.h>

View File

@ -16,6 +16,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <GLES3/gl31.h>
#include <GLES2/gl2ext.h>

View File

@ -16,5 +16,9 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include <stdint.h>
#include <GLES3/gl31.h>

View File

@ -3,7 +3,7 @@ static void android_glDrawArraysIndirect(JNIEnv *_env, jobject, int mode, jlong
// In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
// GL checks for too-large values. Here we only need to check for successful signed 64-bit
// to unsigned 32-bit conversion.
if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
return;
}

View File

@ -3,7 +3,7 @@ static void android_glDrawElementsIndirect(JNIEnv *_env, jobject, jint mode, jin
// In OpenGL ES, 'indirect' is a byte offset into a buffer, not a raw pointer.
// GL checks for too-large values. Here we only need to check for successful signed 64-bit
// to unsigned 32-bit conversion.
if (sizeof(void*) != sizeof(jlong) && indirect > UINTPTR_MAX) {
if (sizeof(void*) != sizeof(jlong) && indirect > static_cast<jlong>(UINT32_MAX)) {
jniThrowException(_env, "java/lang/IllegalArgumentException", "indirect offset too large");
return;
}

View File

@ -16,6 +16,10 @@
// This source file is automatically generated
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include "jni.h"
#include "JNIHelp.h"
#include <android_runtime/AndroidRuntime.h>