Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb3c06c5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Silence unused-but-set-variable warnings." into main am: ddaefbc0

parents e7c72a42 ddaefbc0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
// 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"
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
// 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"
+14 −14
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
// 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"
@@ -58,7 +59,7 @@ nativeClassInit(JNIEnv *_env, jclass glImplClass)

    egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getNativeHandle", "()J");
    eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getNativeHandle", "()J");
    eglsyncGetHandleID = _env->GetMethodID(eglsyncClassLocal, "getNativeHandle", "()J");
    eglsyncGetHandleID = _env->GetMethodID(eglsyncClass, "getNativeHandle", "()J");
}

static void *
@@ -72,6 +73,14 @@ fromEGLHandle(JNIEnv *_env, jmethodID mid, jobject obj) {
    return reinterpret_cast<void*>(_env->CallLongMethod(obj, mid));
}

// TODO: this should be generated from the .spec file, but needs to be renamed and made private
static jint android_eglDupNativeFenceFDANDROID(JNIEnv *env, jobject, jobject dpy, jobject sync) {
    EGLDisplay dpy_native = (EGLDisplay)fromEGLHandle(env, egldisplayGetHandleID, dpy);
    EGLSync sync_native = (EGLSync)fromEGLHandle(env, eglsyncGetHandleID, sync);

    return eglDupNativeFenceFDANDROID(dpy_native, sync_native);
}

// --------------------------------------------------------------------------
/* EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time ) */
static jboolean
@@ -89,21 +98,12 @@ android_eglPresentationTimeANDROID
    return (jboolean)_returnValue;
}

static jint android_eglDupNativeFenceFDANDROID(JNIEnv *env, jobject, jobject dpy, jobject sync) {
    EGLDisplay dpy_native = (EGLDisplay)fromEGLHandle(env, egldisplayGetHandleID, dpy);
    EGLSync sync_native = (EGLSync)fromEGLHandle(env, eglsyncGetHandleID, sync);

    return eglDupNativeFenceFDANDROID(dpy_native, sync_native);
}

static const char *classPathName = "android/opengl/EGLExt";

static const JNINativeMethod methods[] = {
{"_nativeClassInit", "()V", (void*)nativeClassInit },
        {"eglPresentationTimeANDROID", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;J)Z",
         (void *)android_eglPresentationTimeANDROID},
        {"eglDupNativeFenceFDANDROIDImpl", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSync;)I",
         (void *)android_eglDupNativeFenceFDANDROID},
{"eglPresentationTimeANDROID", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;J)Z", (void *) android_eglPresentationTimeANDROID },
{"eglDupNativeFenceFDANDROIDImpl", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSync;)I", (void *)android_eglDupNativeFenceFDANDROID },
};

int register_android_opengl_jni_EGLExt(JNIEnv *_env)
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
// 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>
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
// 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>
Loading