blob: 9d5a79028466d0f753f09fc1cd83e35ba12f76ee [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is of the same format as file that generated by
// base/android/jni_generator/jni_generator.py
// For
// com/google/vr/ndk/base/GvrApi
// Local modification includes:
// 1. Remove all implementaiton, only keep definition.
// 2. Use absolute path instead of relative path.
// 3. Removed all helper functions such as: Create.
// 4. Changed RectF, Point, and PoseTracker to correct package name.
// 5. Added function RegisterGvrApiNatives at the end of this file.
#ifndef com_google_vr_ndk_base_GvrApi_JNI
#define com_google_vr_ndk_base_GvrApi_JNI
#include "base/android/jni_android.h"
// ----------------------------------------------------------------------------
// Native JNI methods
// ----------------------------------------------------------------------------
#include <jni.h>
#include "base/android/jni_generator/jni_generator_helper.h"
#include "base/android/jni_int_wrapper.h"
// Step 1: forward declarations.
namespace {
const char kGvrApiClassPath[] = "com/google/vr/ndk/base/GvrApi";
// Leaking this jclass as we cannot use LazyInstance from some threads.
base::subtle::AtomicWord g_GvrApi_clazz __attribute__((unused)) = 0;
#define GvrApi_clazz(env) \
base::android::LazyGetClass(env, kGvrApiClassPath, &g_GvrApi_clazz)
} // namespace
namespace GvrApi {
// Step 2: method stubs.
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListCreate(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListDestroy(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewportList);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetSize(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewportList);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetItem(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewportList,
jint index,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListSetItem(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewportList,
jint index,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportCreate(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportDestroy(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceUv(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jobject out);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceUv(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jfloat left,
jfloat top,
jfloat right,
jfloat bottom);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceFov(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jobject out);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceFov(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jfloat left,
jfloat top,
jfloat right,
jfloat bottom);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTransform(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jfloatArray matrix);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTransform(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jfloatArray matrix);
extern "C" __attribute__((visibility("default"))) jboolean
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportEqual(JNIEnv* env,
jobject jcaller,
jlong nativeA,
jlong nativeB);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTargetEye(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTargetEye(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jint eye);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceBufferIndex(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceBufferIndex(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jint index);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetExternalSurfaceId(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetExternalSurfaceId(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jint id);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetReprojection(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetReprojection(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferViewport,
jint reprojection);
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecCreate(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecDestroy(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSize(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec,
jobject size);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSize(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec,
jint width,
jint height);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetColorFormat(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec,
jint format);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetDepthStencilFormat(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec,
jint format);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSamples(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSamples(
JNIEnv* env,
jobject jcaller,
jlong nativeBufferSpec,
jint samples);
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainCreate(JNIEnv* env,
jobject jcaller,
jlong nativeContext,
jlongArray specs);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainDestroy(JNIEnv* env,
jobject jcaller,
jlong nativeContext);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferCount(
JNIEnv* env,
jobject jcaller,
jlong nativeSwapChain);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferSize(
JNIEnv* env,
jobject jcaller,
jlong nativeSwapChain,
jint bufferIndex,
jobject size);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainResizeBuffer(
JNIEnv* env,
jobject jcaller,
jlong nativeSwapChain,
jint bufferIndex,
jint width,
jint height);
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainAcquireFrame(
JNIEnv* env,
jobject jcaller,
jlong nativeSwapChain);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeFrameBindBuffer(JNIEnv* env,
jobject jcaller,
jlong nativeFrame,
jint bufferIndex);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeFrameUnbind(JNIEnv* env,
jobject jcaller,
jlong nativeFrame);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetFramebufferObject(
JNIEnv* env,
jobject jcaller,
jlong nativeFrame,
jint bufferIndex);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetBufferSize(JNIEnv* env,
jobject jcaller,
jlong nativeFrame,
jint bufferIndex,
jobject size);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeFrameSubmit(
JNIEnv* env,
jobject jcaller,
jlong nativeFrame,
jlong nativeBufferViewportList,
jfloatArray transform);
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeCreate(
JNIEnv* env,
jobject jcaller,
jclass classLoader,
jobject context,
jlong synchronizer,
jint widthPixels,
jint heightPixels,
jfloat xDpi,
jfloat yDpi,
jobject optionalPoseTrackingForTesting);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeGetError(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeClearError(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jstring
Java_com_google_vr_ndk_base_GvrApi_nativeGetErrorString(JNIEnv* env,
jclass jcaller,
jint errorCode);
extern "C" __attribute__((visibility("default"))) jlong
Java_com_google_vr_ndk_base_GvrApi_nativeGetUserPrefs(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeUserPrefsGetControllerHandedness(
JNIEnv* env,
jobject jcaller,
jlong nativeUserPrefs);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativePause(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeResume(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeReleaseGvrContext(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeInitializeGl(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeOnSurfaceCreatedReprojectionThread(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeGetRecommendedBufferViewports(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jlong nativeBufferViewportList);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenBufferViewports(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jlong nativeBufferViewportList);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeGetMaximumEffectiveRenderTargetSize(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jobject size);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenTargetSize(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jobject size);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeDistortToScreen(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jint textureId,
jlong nativeBufferViewportList,
jfloatArray pose,
jlong timeNs);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultFramebufferActive(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jobject
Java_com_google_vr_ndk_base_GvrApi_nativeRenderReprojectionThread(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeOnPauseReprojectionThread(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeUpdateSurfaceReprojectionThread(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jint surfaceId,
jint textureId,
jlong timestamp,
jfloatArray transformMatrix);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeRemoveAllSurfacesReprojectionThread(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeGetHeadSpaceFromStartSpaceRotation(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jfloatArray outPose,
jlong timeNs);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSetIgnoreManualPauseResumeTracker(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jboolean shouldIgnore);
extern "C" __attribute__((visibility("default"))) jbyteArray
Java_com_google_vr_ndk_base_GvrApi_nativePauseTracking(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeResumeTracking(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jbyteArray trackerStateBytes);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeResetTracking(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeRecenterTracking(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeGetEyeFromHeadMatrix(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jint eye,
jfloatArray out);
extern "C" __attribute__((visibility("default"))) jintArray
Java_com_google_vr_ndk_base_GvrApi_nativeGetWindowBounds(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jfloatArray
Java_com_google_vr_ndk_base_GvrApi_nativeComputeDistortedPoint(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jint eyeType,
jfloatArray uvIn);
extern "C" __attribute__((visibility("default"))) jboolean
Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultViewerProfile(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jstring viewerProfileUri);
extern "C" __attribute__((visibility("default"))) jstring
Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerVendor(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jstring
Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerModel(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jint
Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerType(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jboolean
Java_com_google_vr_ndk_base_GvrApi_nativeSetAsyncReprojectionEnabled(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jboolean enabled);
extern "C" __attribute__((visibility("default"))) jboolean
Java_com_google_vr_ndk_base_GvrApi_nativeGetAsyncReprojectionEnabled(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeReconnectSensors(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jboolean
Java_com_google_vr_ndk_base_GvrApi_nativeSetViewerParams(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jbyteArray serializedViewerParams);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSetDisplayMetrics(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jint widthPixels,
jint heightPixels,
jfloat xDpi,
jfloat yDpi);
extern "C" __attribute__((visibility("default"))) jfloat
Java_com_google_vr_ndk_base_GvrApi_nativeGetBorderSizeMeters(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSetSurfaceSize(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jint surfaceWidthPixels,
jint surfaceHeightPixels);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeSetLensOffset(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext,
jfloat x,
jfloat y);
extern "C" __attribute__((visibility("default"))) void
Java_com_google_vr_ndk_base_GvrApi_nativeDumpDebugData(JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
extern "C" __attribute__((visibility("default"))) jboolean
Java_com_google_vr_ndk_base_GvrApi_nativeUsingVrDisplayService(
JNIEnv* env,
jobject jcaller,
jlong nativeGvrContext);
// Step 3: RegisterNatives.
static const JNINativeMethod kMethodsGvrApi[] = {
{"nativeBufferViewportListCreate",
"("
"J"
")"
"J",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListCreate)},
{"nativeBufferViewportListDestroy",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListDestroy)},
{"nativeBufferViewportListGetSize",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetSize)},
{"nativeBufferViewportListGetItem",
"("
"J"
"I"
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetItem)},
{"nativeBufferViewportListSetItem",
"("
"J"
"I"
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListSetItem)},
{"nativeBufferViewportCreate",
"("
"J"
")"
"J",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportCreate)},
{"nativeBufferViewportDestroy",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportDestroy)},
{"nativeBufferViewportGetSourceUv",
"("
"J"
"Landroid/graphics/RectF;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceUv)},
{"nativeBufferViewportSetSourceUv",
"("
"J"
"F"
"F"
"F"
"F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceUv)},
{"nativeBufferViewportGetSourceFov",
"("
"J"
"Landroid/graphics/RectF;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceFov)},
{"nativeBufferViewportSetSourceFov",
"("
"J"
"F"
"F"
"F"
"F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceFov)},
{"nativeBufferViewportGetTransform",
"("
"J"
"[F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTransform)},
{"nativeBufferViewportSetTransform",
"("
"J"
"[F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTransform)},
{"nativeBufferViewportEqual",
"("
"J"
"J"
")"
"Z",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportEqual)},
{"nativeBufferViewportGetTargetEye",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTargetEye)},
{"nativeBufferViewportSetTargetEye",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTargetEye)},
{"nativeBufferViewportGetSourceBufferIndex",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceBufferIndex)},
{"nativeBufferViewportSetSourceBufferIndex",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceBufferIndex)},
{"nativeBufferViewportGetExternalSurfaceId",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetExternalSurfaceId)},
{"nativeBufferViewportSetExternalSurfaceId",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetExternalSurfaceId)},
{"nativeBufferViewportGetReprojection",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetReprojection)},
{"nativeBufferViewportSetReprojection",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetReprojection)},
{"nativeBufferSpecCreate",
"("
"J"
")"
"J",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecCreate)},
{"nativeBufferSpecDestroy",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecDestroy)},
{"nativeBufferSpecGetSize",
"("
"J"
"Landroid/graphics/Point;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSize)},
{"nativeBufferSpecSetSize",
"("
"J"
"I"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSize)},
{"nativeBufferSpecSetColorFormat",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetColorFormat)},
{"nativeBufferSpecSetDepthStencilFormat",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetDepthStencilFormat)},
{"nativeBufferSpecGetSamples",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSamples)},
{"nativeBufferSpecSetSamples",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSamples)},
{"nativeSwapChainCreate",
"("
"J"
"[J"
")"
"J",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainCreate)},
{"nativeSwapChainDestroy",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainDestroy)},
{"nativeSwapChainGetBufferCount",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferCount)},
{"nativeSwapChainGetBufferSize",
"("
"J"
"I"
"Landroid/graphics/Point;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferSize)},
{"nativeSwapChainResizeBuffer",
"("
"J"
"I"
"I"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainResizeBuffer)},
{"nativeSwapChainAcquireFrame",
"("
"J"
")"
"J",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainAcquireFrame)},
{"nativeFrameBindBuffer",
"("
"J"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeFrameBindBuffer)},
{"nativeFrameUnbind",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeFrameUnbind)},
{"nativeFrameGetFramebufferObject",
"("
"J"
"I"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetFramebufferObject)},
{"nativeFrameGetBufferSize",
"("
"J"
"I"
"Landroid/graphics/Point;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetBufferSize)},
{"nativeFrameSubmit",
"("
"J"
"J"
"[F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeFrameSubmit)},
{"nativeCreate",
"("
"Ljava/lang/ClassLoader;"
"Landroid/content/Context;"
"J"
"I"
"I"
"F"
"F"
"Lcom/google/vr/ndk/base/GvrApi$PoseTracker;"
")"
"J",
reinterpret_cast<void*>(Java_com_google_vr_ndk_base_GvrApi_nativeCreate)},
{"nativeGetError",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetError)},
{"nativeClearError",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeClearError)},
{"nativeGetErrorString",
"("
"I"
")"
"Ljava/lang/String;",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetErrorString)},
{"nativeGetUserPrefs",
"("
"J"
")"
"J",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetUserPrefs)},
{"nativeUserPrefsGetControllerHandedness",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeUserPrefsGetControllerHandedness)},
{"nativePause",
"("
"J"
")"
"V",
reinterpret_cast<void*>(Java_com_google_vr_ndk_base_GvrApi_nativePause)},
{"nativeResume",
"("
"J"
")"
"V",
reinterpret_cast<void*>(Java_com_google_vr_ndk_base_GvrApi_nativeResume)},
{"nativeReleaseGvrContext",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeReleaseGvrContext)},
{"nativeInitializeGl",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeInitializeGl)},
{"nativeOnSurfaceCreatedReprojectionThread",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeOnSurfaceCreatedReprojectionThread)},
{"nativeGetRecommendedBufferViewports",
"("
"J"
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetRecommendedBufferViewports)},
{"nativeGetScreenBufferViewports",
"("
"J"
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenBufferViewports)},
{"nativeGetMaximumEffectiveRenderTargetSize",
"("
"J"
"Landroid/graphics/Point;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetMaximumEffectiveRenderTargetSize)},
{"nativeGetScreenTargetSize",
"("
"J"
"Landroid/graphics/Point;"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenTargetSize)},
{"nativeDistortToScreen",
"("
"J"
"I"
"J"
"[F"
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeDistortToScreen)},
{"nativeSetDefaultFramebufferActive",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultFramebufferActive)},
{"nativeRenderReprojectionThread",
"("
"J"
")"
"Landroid/graphics/Point;",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeRenderReprojectionThread)},
{"nativeOnPauseReprojectionThread",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeOnPauseReprojectionThread)},
{"nativeUpdateSurfaceReprojectionThread",
"("
"J"
"I"
"I"
"J"
"[F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeUpdateSurfaceReprojectionThread)},
{"nativeRemoveAllSurfacesReprojectionThread",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeRemoveAllSurfacesReprojectionThread)},
{"nativeGetHeadSpaceFromStartSpaceRotation",
"("
"J"
"[F"
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetHeadSpaceFromStartSpaceRotation)},
{"nativeSetIgnoreManualPauseResumeTracker",
"("
"J"
"Z"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetIgnoreManualPauseResumeTracker)},
{"nativePauseTracking",
"("
"J"
")"
"[B",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativePauseTracking)},
{"nativeResumeTracking",
"("
"J"
"[B"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeResumeTracking)},
{"nativeResetTracking",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeResetTracking)},
{"nativeRecenterTracking",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeRecenterTracking)},
{"nativeGetEyeFromHeadMatrix",
"("
"J"
"I"
"[F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetEyeFromHeadMatrix)},
{"nativeGetWindowBounds",
"("
"J"
")"
"[I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetWindowBounds)},
{"nativeComputeDistortedPoint",
"("
"J"
"I"
"[F"
")"
"[F",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeComputeDistortedPoint)},
{"nativeSetDefaultViewerProfile",
"("
"J"
"Ljava/lang/String;"
")"
"Z",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultViewerProfile)},
{"nativeGetViewerVendor",
"("
"J"
")"
"Ljava/lang/String;",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerVendor)},
{"nativeGetViewerModel",
"("
"J"
")"
"Ljava/lang/String;",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerModel)},
{"nativeGetViewerType",
"("
"J"
")"
"I",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerType)},
{"nativeSetAsyncReprojectionEnabled",
"("
"J"
"Z"
")"
"Z",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetAsyncReprojectionEnabled)},
{"nativeGetAsyncReprojectionEnabled",
"("
"J"
")"
"Z",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetAsyncReprojectionEnabled)},
{"nativeReconnectSensors",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeReconnectSensors)},
{"nativeSetViewerParams",
"("
"J"
"[B"
")"
"Z",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetViewerParams)},
{"nativeSetDisplayMetrics",
"("
"J"
"I"
"I"
"F"
"F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetDisplayMetrics)},
{"nativeGetBorderSizeMeters",
"("
"J"
")"
"F",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeGetBorderSizeMeters)},
{"nativeSetSurfaceSize",
"("
"J"
"I"
"I"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetSurfaceSize)},
{"nativeSetLensOffset",
"("
"J"
"F"
"F"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeSetLensOffset)},
{"nativeDumpDebugData",
"("
"J"
")"
"V",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeDumpDebugData)},
{"nativeUsingVrDisplayService",
"("
"J"
")"
"Z",
reinterpret_cast<void*>(
Java_com_google_vr_ndk_base_GvrApi_nativeUsingVrDisplayService)},
};
static bool RegisterNativesImpl(JNIEnv* env) {
if (jni_generator::ShouldSkipJniRegistration(false))
return true;
const int kMethodsGvrApiSize = arraysize(kMethodsGvrApi);
if (env->RegisterNatives(GvrApi_clazz(env), kMethodsGvrApi,
kMethodsGvrApiSize) < 0) {
jni_generator::HandleRegistrationError(env, GvrApi_clazz(env), __FILE__);
return false;
}
return true;
}
static bool RegisterGvrApiNatives(JNIEnv* env) {
return RegisterNativesImpl(env);
}
} // namespace GvrApi
#endif // com_google_vr_ndk_base_GvrApi_JNI