OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This file is of the same format as file that generated by |
| 6 // base/android/jni_generator/jni_generator.py |
| 7 // For |
| 8 // com/google/vr/ndk/base/GvrApi |
| 9 |
| 10 // Local modification includes: |
| 11 // 1. Remove all implementaiton, only keep definition. |
| 12 // 2. Use absolute path instead of relative path. |
| 13 // 3. Removed all helper functions such as: Create. |
| 14 // 4. Changed RectF, Point, and PoseTracker to correct package name. |
| 15 // 5. Added function RegisterGvrApiNatives at the end of this file. |
| 16 |
| 17 #ifndef com_google_vr_ndk_base_GvrApi_JNI |
| 18 #define com_google_vr_ndk_base_GvrApi_JNI |
| 19 |
| 20 #include "base/android/jni_android.h" |
| 21 // ---------------------------------------------------------------------------- |
| 22 // Native JNI methods |
| 23 // ---------------------------------------------------------------------------- |
| 24 #include <jni.h> |
| 25 |
| 26 #include "base/android/jni_generator/jni_generator_helper.h" |
| 27 |
| 28 #include "base/android/jni_int_wrapper.h" |
| 29 |
| 30 // Step 1: forward declarations. |
| 31 namespace { |
| 32 const char kGvrApiClassPath[] = "com/google/vr/ndk/base/GvrApi"; |
| 33 // Leaking this jclass as we cannot use LazyInstance from some threads. |
| 34 base::subtle::AtomicWord g_GvrApi_clazz __attribute__((unused)) = 0; |
| 35 #define GvrApi_clazz(env) \ |
| 36 base::android::LazyGetClass(env, kGvrApiClassPath, &g_GvrApi_clazz) |
| 37 |
| 38 } // namespace |
| 39 |
| 40 namespace GvrApi { |
| 41 |
| 42 // Step 2: method stubs. |
| 43 extern "C" __attribute__((visibility("default"))) jlong |
| 44 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListCreate( |
| 45 JNIEnv* env, |
| 46 jobject jcaller, |
| 47 jlong nativeGvrContext); |
| 48 |
| 49 extern "C" __attribute__((visibility("default"))) void |
| 50 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListDestroy( |
| 51 JNIEnv* env, |
| 52 jobject jcaller, |
| 53 jlong nativeBufferViewportList); |
| 54 |
| 55 extern "C" __attribute__((visibility("default"))) jint |
| 56 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetSize( |
| 57 JNIEnv* env, |
| 58 jobject jcaller, |
| 59 jlong nativeBufferViewportList); |
| 60 |
| 61 extern "C" __attribute__((visibility("default"))) void |
| 62 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetItem( |
| 63 JNIEnv* env, |
| 64 jobject jcaller, |
| 65 jlong nativeBufferViewportList, |
| 66 jint index, |
| 67 jlong nativeBufferViewport); |
| 68 |
| 69 extern "C" __attribute__((visibility("default"))) void |
| 70 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListSetItem( |
| 71 JNIEnv* env, |
| 72 jobject jcaller, |
| 73 jlong nativeBufferViewportList, |
| 74 jint index, |
| 75 jlong nativeBufferViewport); |
| 76 |
| 77 extern "C" __attribute__((visibility("default"))) jlong |
| 78 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportCreate( |
| 79 JNIEnv* env, |
| 80 jobject jcaller, |
| 81 jlong nativeGvrContext); |
| 82 |
| 83 extern "C" __attribute__((visibility("default"))) void |
| 84 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportDestroy( |
| 85 JNIEnv* env, |
| 86 jobject jcaller, |
| 87 jlong nativeBufferViewport); |
| 88 |
| 89 extern "C" __attribute__((visibility("default"))) void |
| 90 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceUv( |
| 91 JNIEnv* env, |
| 92 jobject jcaller, |
| 93 jlong nativeBufferViewport, |
| 94 jobject out); |
| 95 |
| 96 extern "C" __attribute__((visibility("default"))) void |
| 97 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceUv( |
| 98 JNIEnv* env, |
| 99 jobject jcaller, |
| 100 jlong nativeBufferViewport, |
| 101 jfloat left, |
| 102 jfloat top, |
| 103 jfloat right, |
| 104 jfloat bottom); |
| 105 |
| 106 extern "C" __attribute__((visibility("default"))) void |
| 107 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceFov( |
| 108 JNIEnv* env, |
| 109 jobject jcaller, |
| 110 jlong nativeBufferViewport, |
| 111 jobject out); |
| 112 |
| 113 extern "C" __attribute__((visibility("default"))) void |
| 114 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceFov( |
| 115 JNIEnv* env, |
| 116 jobject jcaller, |
| 117 jlong nativeBufferViewport, |
| 118 jfloat left, |
| 119 jfloat top, |
| 120 jfloat right, |
| 121 jfloat bottom); |
| 122 |
| 123 extern "C" __attribute__((visibility("default"))) void |
| 124 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTransform( |
| 125 JNIEnv* env, |
| 126 jobject jcaller, |
| 127 jlong nativeBufferViewport, |
| 128 jfloatArray matrix); |
| 129 |
| 130 extern "C" __attribute__((visibility("default"))) void |
| 131 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTransform( |
| 132 JNIEnv* env, |
| 133 jobject jcaller, |
| 134 jlong nativeBufferViewport, |
| 135 jfloatArray matrix); |
| 136 |
| 137 extern "C" __attribute__((visibility("default"))) jboolean |
| 138 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportEqual(JNIEnv* env, |
| 139 jobject jcaller, |
| 140 jlong nativeA, |
| 141 jlong nativeB); |
| 142 |
| 143 extern "C" __attribute__((visibility("default"))) jint |
| 144 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTargetEye( |
| 145 JNIEnv* env, |
| 146 jobject jcaller, |
| 147 jlong nativeBufferViewport); |
| 148 |
| 149 extern "C" __attribute__((visibility("default"))) void |
| 150 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTargetEye( |
| 151 JNIEnv* env, |
| 152 jobject jcaller, |
| 153 jlong nativeBufferViewport, |
| 154 jint eye); |
| 155 |
| 156 extern "C" __attribute__((visibility("default"))) jint |
| 157 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceBufferIndex( |
| 158 JNIEnv* env, |
| 159 jobject jcaller, |
| 160 jlong nativeBufferViewport); |
| 161 |
| 162 extern "C" __attribute__((visibility("default"))) void |
| 163 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceBufferIndex( |
| 164 JNIEnv* env, |
| 165 jobject jcaller, |
| 166 jlong nativeBufferViewport, |
| 167 jint index); |
| 168 |
| 169 extern "C" __attribute__((visibility("default"))) jint |
| 170 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetExternalSurfaceId( |
| 171 JNIEnv* env, |
| 172 jobject jcaller, |
| 173 jlong nativeBufferViewport); |
| 174 |
| 175 extern "C" __attribute__((visibility("default"))) void |
| 176 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetExternalSurfaceId( |
| 177 JNIEnv* env, |
| 178 jobject jcaller, |
| 179 jlong nativeBufferViewport, |
| 180 jint id); |
| 181 |
| 182 extern "C" __attribute__((visibility("default"))) jint |
| 183 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetReprojection( |
| 184 JNIEnv* env, |
| 185 jobject jcaller, |
| 186 jlong nativeBufferViewport); |
| 187 |
| 188 extern "C" __attribute__((visibility("default"))) void |
| 189 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetReprojection( |
| 190 JNIEnv* env, |
| 191 jobject jcaller, |
| 192 jlong nativeBufferViewport, |
| 193 jint reprojection); |
| 194 |
| 195 extern "C" __attribute__((visibility("default"))) jlong |
| 196 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecCreate( |
| 197 JNIEnv* env, |
| 198 jobject jcaller, |
| 199 jlong nativeGvrContext); |
| 200 |
| 201 extern "C" __attribute__((visibility("default"))) void |
| 202 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecDestroy( |
| 203 JNIEnv* env, |
| 204 jobject jcaller, |
| 205 jlong nativeBufferSpec); |
| 206 |
| 207 extern "C" __attribute__((visibility("default"))) void |
| 208 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSize( |
| 209 JNIEnv* env, |
| 210 jobject jcaller, |
| 211 jlong nativeBufferSpec, |
| 212 jobject size); |
| 213 |
| 214 extern "C" __attribute__((visibility("default"))) void |
| 215 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSize( |
| 216 JNIEnv* env, |
| 217 jobject jcaller, |
| 218 jlong nativeBufferSpec, |
| 219 jint width, |
| 220 jint height); |
| 221 |
| 222 extern "C" __attribute__((visibility("default"))) void |
| 223 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetColorFormat( |
| 224 JNIEnv* env, |
| 225 jobject jcaller, |
| 226 jlong nativeBufferSpec, |
| 227 jint format); |
| 228 |
| 229 extern "C" __attribute__((visibility("default"))) void |
| 230 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetDepthStencilFormat( |
| 231 JNIEnv* env, |
| 232 jobject jcaller, |
| 233 jlong nativeBufferSpec, |
| 234 jint format); |
| 235 |
| 236 extern "C" __attribute__((visibility("default"))) jint |
| 237 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSamples( |
| 238 JNIEnv* env, |
| 239 jobject jcaller, |
| 240 jlong nativeBufferSpec); |
| 241 |
| 242 extern "C" __attribute__((visibility("default"))) void |
| 243 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSamples( |
| 244 JNIEnv* env, |
| 245 jobject jcaller, |
| 246 jlong nativeBufferSpec, |
| 247 jint samples); |
| 248 |
| 249 extern "C" __attribute__((visibility("default"))) jlong |
| 250 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainCreate(JNIEnv* env, |
| 251 jobject jcaller, |
| 252 jlong nativeContext, |
| 253 jlongArray specs); |
| 254 |
| 255 extern "C" __attribute__((visibility("default"))) void |
| 256 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainDestroy(JNIEnv* env, |
| 257 jobject jcaller, |
| 258 jlong nativeContext); |
| 259 |
| 260 extern "C" __attribute__((visibility("default"))) jint |
| 261 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferCount( |
| 262 JNIEnv* env, |
| 263 jobject jcaller, |
| 264 jlong nativeSwapChain); |
| 265 |
| 266 extern "C" __attribute__((visibility("default"))) void |
| 267 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferSize( |
| 268 JNIEnv* env, |
| 269 jobject jcaller, |
| 270 jlong nativeSwapChain, |
| 271 jint bufferIndex, |
| 272 jobject size); |
| 273 |
| 274 extern "C" __attribute__((visibility("default"))) void |
| 275 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainResizeBuffer( |
| 276 JNIEnv* env, |
| 277 jobject jcaller, |
| 278 jlong nativeSwapChain, |
| 279 jint bufferIndex, |
| 280 jint width, |
| 281 jint height); |
| 282 |
| 283 extern "C" __attribute__((visibility("default"))) jlong |
| 284 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainAcquireFrame( |
| 285 JNIEnv* env, |
| 286 jobject jcaller, |
| 287 jlong nativeSwapChain); |
| 288 |
| 289 extern "C" __attribute__((visibility("default"))) void |
| 290 Java_com_google_vr_ndk_base_GvrApi_nativeFrameBindBuffer(JNIEnv* env, |
| 291 jobject jcaller, |
| 292 jlong nativeFrame, |
| 293 jint bufferIndex); |
| 294 |
| 295 extern "C" __attribute__((visibility("default"))) void |
| 296 Java_com_google_vr_ndk_base_GvrApi_nativeFrameUnbind(JNIEnv* env, |
| 297 jobject jcaller, |
| 298 jlong nativeFrame); |
| 299 |
| 300 extern "C" __attribute__((visibility("default"))) jint |
| 301 Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetFramebufferObject( |
| 302 JNIEnv* env, |
| 303 jobject jcaller, |
| 304 jlong nativeFrame, |
| 305 jint bufferIndex); |
| 306 |
| 307 extern "C" __attribute__((visibility("default"))) void |
| 308 Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetBufferSize(JNIEnv* env, |
| 309 jobject jcaller, |
| 310 jlong nativeFrame, |
| 311 jint bufferIndex, |
| 312 jobject size); |
| 313 |
| 314 extern "C" __attribute__((visibility("default"))) void |
| 315 Java_com_google_vr_ndk_base_GvrApi_nativeFrameSubmit( |
| 316 JNIEnv* env, |
| 317 jobject jcaller, |
| 318 jlong nativeFrame, |
| 319 jlong nativeBufferViewportList, |
| 320 jfloatArray transform); |
| 321 |
| 322 extern "C" __attribute__((visibility("default"))) jlong |
| 323 Java_com_google_vr_ndk_base_GvrApi_nativeCreate( |
| 324 JNIEnv* env, |
| 325 jobject jcaller, |
| 326 jclass classLoader, |
| 327 jobject context, |
| 328 jlong synchronizer, |
| 329 jint widthPixels, |
| 330 jint heightPixels, |
| 331 jfloat xDpi, |
| 332 jfloat yDpi, |
| 333 jobject optionalPoseTrackingForTesting); |
| 334 |
| 335 extern "C" __attribute__((visibility("default"))) jint |
| 336 Java_com_google_vr_ndk_base_GvrApi_nativeGetError(JNIEnv* env, |
| 337 jobject jcaller, |
| 338 jlong nativeGvrContext); |
| 339 |
| 340 extern "C" __attribute__((visibility("default"))) jint |
| 341 Java_com_google_vr_ndk_base_GvrApi_nativeClearError(JNIEnv* env, |
| 342 jobject jcaller, |
| 343 jlong nativeGvrContext); |
| 344 |
| 345 extern "C" __attribute__((visibility("default"))) jstring |
| 346 Java_com_google_vr_ndk_base_GvrApi_nativeGetErrorString(JNIEnv* env, |
| 347 jclass jcaller, |
| 348 jint errorCode); |
| 349 |
| 350 extern "C" __attribute__((visibility("default"))) jlong |
| 351 Java_com_google_vr_ndk_base_GvrApi_nativeGetUserPrefs(JNIEnv* env, |
| 352 jobject jcaller, |
| 353 jlong nativeGvrContext); |
| 354 |
| 355 extern "C" __attribute__((visibility("default"))) jint |
| 356 Java_com_google_vr_ndk_base_GvrApi_nativeUserPrefsGetControllerHandedness( |
| 357 JNIEnv* env, |
| 358 jobject jcaller, |
| 359 jlong nativeUserPrefs); |
| 360 |
| 361 extern "C" __attribute__((visibility("default"))) void |
| 362 Java_com_google_vr_ndk_base_GvrApi_nativePause(JNIEnv* env, |
| 363 jobject jcaller, |
| 364 jlong nativeGvrContext); |
| 365 |
| 366 extern "C" __attribute__((visibility("default"))) void |
| 367 Java_com_google_vr_ndk_base_GvrApi_nativeResume(JNIEnv* env, |
| 368 jobject jcaller, |
| 369 jlong nativeGvrContext); |
| 370 |
| 371 extern "C" __attribute__((visibility("default"))) void |
| 372 Java_com_google_vr_ndk_base_GvrApi_nativeReleaseGvrContext( |
| 373 JNIEnv* env, |
| 374 jobject jcaller, |
| 375 jlong nativeGvrContext); |
| 376 |
| 377 extern "C" __attribute__((visibility("default"))) void |
| 378 Java_com_google_vr_ndk_base_GvrApi_nativeInitializeGl(JNIEnv* env, |
| 379 jobject jcaller, |
| 380 jlong nativeGvrContext); |
| 381 |
| 382 extern "C" __attribute__((visibility("default"))) void |
| 383 Java_com_google_vr_ndk_base_GvrApi_nativeOnSurfaceCreatedReprojectionThread( |
| 384 JNIEnv* env, |
| 385 jobject jcaller, |
| 386 jlong nativeGvrContext); |
| 387 |
| 388 extern "C" __attribute__((visibility("default"))) void |
| 389 Java_com_google_vr_ndk_base_GvrApi_nativeGetRecommendedBufferViewports( |
| 390 JNIEnv* env, |
| 391 jobject jcaller, |
| 392 jlong nativeGvrContext, |
| 393 jlong nativeBufferViewportList); |
| 394 |
| 395 extern "C" __attribute__((visibility("default"))) void |
| 396 Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenBufferViewports( |
| 397 JNIEnv* env, |
| 398 jobject jcaller, |
| 399 jlong nativeGvrContext, |
| 400 jlong nativeBufferViewportList); |
| 401 |
| 402 extern "C" __attribute__((visibility("default"))) void |
| 403 Java_com_google_vr_ndk_base_GvrApi_nativeGetMaximumEffectiveRenderTargetSize( |
| 404 JNIEnv* env, |
| 405 jobject jcaller, |
| 406 jlong nativeGvrContext, |
| 407 jobject size); |
| 408 |
| 409 extern "C" __attribute__((visibility("default"))) void |
| 410 Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenTargetSize( |
| 411 JNIEnv* env, |
| 412 jobject jcaller, |
| 413 jlong nativeGvrContext, |
| 414 jobject size); |
| 415 |
| 416 extern "C" __attribute__((visibility("default"))) void |
| 417 Java_com_google_vr_ndk_base_GvrApi_nativeDistortToScreen( |
| 418 JNIEnv* env, |
| 419 jobject jcaller, |
| 420 jlong nativeGvrContext, |
| 421 jint textureId, |
| 422 jlong nativeBufferViewportList, |
| 423 jfloatArray pose, |
| 424 jlong timeNs); |
| 425 |
| 426 extern "C" __attribute__((visibility("default"))) void |
| 427 Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultFramebufferActive( |
| 428 JNIEnv* env, |
| 429 jobject jcaller, |
| 430 jlong nativeGvrContext); |
| 431 |
| 432 extern "C" __attribute__((visibility("default"))) jobject |
| 433 Java_com_google_vr_ndk_base_GvrApi_nativeRenderReprojectionThread( |
| 434 JNIEnv* env, |
| 435 jobject jcaller, |
| 436 jlong nativeGvrContext); |
| 437 |
| 438 extern "C" __attribute__((visibility("default"))) void |
| 439 Java_com_google_vr_ndk_base_GvrApi_nativeOnPauseReprojectionThread( |
| 440 JNIEnv* env, |
| 441 jobject jcaller, |
| 442 jlong nativeGvrContext); |
| 443 |
| 444 extern "C" __attribute__((visibility("default"))) void |
| 445 Java_com_google_vr_ndk_base_GvrApi_nativeUpdateSurfaceReprojectionThread( |
| 446 JNIEnv* env, |
| 447 jobject jcaller, |
| 448 jlong nativeGvrContext, |
| 449 jint surfaceId, |
| 450 jint textureId, |
| 451 jlong timestamp, |
| 452 jfloatArray transformMatrix); |
| 453 |
| 454 extern "C" __attribute__((visibility("default"))) void |
| 455 Java_com_google_vr_ndk_base_GvrApi_nativeRemoveAllSurfacesReprojectionThread( |
| 456 JNIEnv* env, |
| 457 jobject jcaller, |
| 458 jlong nativeGvrContext); |
| 459 |
| 460 extern "C" __attribute__((visibility("default"))) void |
| 461 Java_com_google_vr_ndk_base_GvrApi_nativeGetHeadSpaceFromStartSpaceRotation( |
| 462 JNIEnv* env, |
| 463 jobject jcaller, |
| 464 jlong nativeGvrContext, |
| 465 jfloatArray outPose, |
| 466 jlong timeNs); |
| 467 |
| 468 extern "C" __attribute__((visibility("default"))) void |
| 469 Java_com_google_vr_ndk_base_GvrApi_nativeSetIgnoreManualPauseResumeTracker( |
| 470 JNIEnv* env, |
| 471 jobject jcaller, |
| 472 jlong nativeGvrContext, |
| 473 jboolean shouldIgnore); |
| 474 |
| 475 extern "C" __attribute__((visibility("default"))) jbyteArray |
| 476 Java_com_google_vr_ndk_base_GvrApi_nativePauseTracking(JNIEnv* env, |
| 477 jobject jcaller, |
| 478 jlong nativeGvrContext); |
| 479 |
| 480 extern "C" __attribute__((visibility("default"))) void |
| 481 Java_com_google_vr_ndk_base_GvrApi_nativeResumeTracking( |
| 482 JNIEnv* env, |
| 483 jobject jcaller, |
| 484 jlong nativeGvrContext, |
| 485 jbyteArray trackerStateBytes); |
| 486 |
| 487 extern "C" __attribute__((visibility("default"))) void |
| 488 Java_com_google_vr_ndk_base_GvrApi_nativeResetTracking(JNIEnv* env, |
| 489 jobject jcaller, |
| 490 jlong nativeGvrContext); |
| 491 |
| 492 extern "C" __attribute__((visibility("default"))) void |
| 493 Java_com_google_vr_ndk_base_GvrApi_nativeRecenterTracking( |
| 494 JNIEnv* env, |
| 495 jobject jcaller, |
| 496 jlong nativeGvrContext); |
| 497 |
| 498 extern "C" __attribute__((visibility("default"))) void |
| 499 Java_com_google_vr_ndk_base_GvrApi_nativeGetEyeFromHeadMatrix( |
| 500 JNIEnv* env, |
| 501 jobject jcaller, |
| 502 jlong nativeGvrContext, |
| 503 jint eye, |
| 504 jfloatArray out); |
| 505 |
| 506 extern "C" __attribute__((visibility("default"))) jintArray |
| 507 Java_com_google_vr_ndk_base_GvrApi_nativeGetWindowBounds( |
| 508 JNIEnv* env, |
| 509 jobject jcaller, |
| 510 jlong nativeGvrContext); |
| 511 |
| 512 extern "C" __attribute__((visibility("default"))) jfloatArray |
| 513 Java_com_google_vr_ndk_base_GvrApi_nativeComputeDistortedPoint( |
| 514 JNIEnv* env, |
| 515 jobject jcaller, |
| 516 jlong nativeGvrContext, |
| 517 jint eyeType, |
| 518 jfloatArray uvIn); |
| 519 |
| 520 extern "C" __attribute__((visibility("default"))) jboolean |
| 521 Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultViewerProfile( |
| 522 JNIEnv* env, |
| 523 jobject jcaller, |
| 524 jlong nativeGvrContext, |
| 525 jstring viewerProfileUri); |
| 526 |
| 527 extern "C" __attribute__((visibility("default"))) jstring |
| 528 Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerVendor( |
| 529 JNIEnv* env, |
| 530 jobject jcaller, |
| 531 jlong nativeGvrContext); |
| 532 |
| 533 extern "C" __attribute__((visibility("default"))) jstring |
| 534 Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerModel(JNIEnv* env, |
| 535 jobject jcaller, |
| 536 jlong nativeGvrContext); |
| 537 |
| 538 extern "C" __attribute__((visibility("default"))) jint |
| 539 Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerType(JNIEnv* env, |
| 540 jobject jcaller, |
| 541 jlong nativeGvrContext); |
| 542 |
| 543 extern "C" __attribute__((visibility("default"))) jboolean |
| 544 Java_com_google_vr_ndk_base_GvrApi_nativeSetAsyncReprojectionEnabled( |
| 545 JNIEnv* env, |
| 546 jobject jcaller, |
| 547 jlong nativeGvrContext, |
| 548 jboolean enabled); |
| 549 |
| 550 extern "C" __attribute__((visibility("default"))) jboolean |
| 551 Java_com_google_vr_ndk_base_GvrApi_nativeGetAsyncReprojectionEnabled( |
| 552 JNIEnv* env, |
| 553 jobject jcaller, |
| 554 jlong nativeGvrContext); |
| 555 |
| 556 extern "C" __attribute__((visibility("default"))) void |
| 557 Java_com_google_vr_ndk_base_GvrApi_nativeReconnectSensors( |
| 558 JNIEnv* env, |
| 559 jobject jcaller, |
| 560 jlong nativeGvrContext); |
| 561 |
| 562 extern "C" __attribute__((visibility("default"))) jboolean |
| 563 Java_com_google_vr_ndk_base_GvrApi_nativeSetViewerParams( |
| 564 JNIEnv* env, |
| 565 jobject jcaller, |
| 566 jlong nativeGvrContext, |
| 567 jbyteArray serializedViewerParams); |
| 568 |
| 569 extern "C" __attribute__((visibility("default"))) void |
| 570 Java_com_google_vr_ndk_base_GvrApi_nativeSetDisplayMetrics( |
| 571 JNIEnv* env, |
| 572 jobject jcaller, |
| 573 jlong nativeGvrContext, |
| 574 jint widthPixels, |
| 575 jint heightPixels, |
| 576 jfloat xDpi, |
| 577 jfloat yDpi); |
| 578 |
| 579 extern "C" __attribute__((visibility("default"))) jfloat |
| 580 Java_com_google_vr_ndk_base_GvrApi_nativeGetBorderSizeMeters( |
| 581 JNIEnv* env, |
| 582 jobject jcaller, |
| 583 jlong nativeGvrContext); |
| 584 |
| 585 extern "C" __attribute__((visibility("default"))) void |
| 586 Java_com_google_vr_ndk_base_GvrApi_nativeSetSurfaceSize( |
| 587 JNIEnv* env, |
| 588 jobject jcaller, |
| 589 jlong nativeGvrContext, |
| 590 jint surfaceWidthPixels, |
| 591 jint surfaceHeightPixels); |
| 592 |
| 593 extern "C" __attribute__((visibility("default"))) void |
| 594 Java_com_google_vr_ndk_base_GvrApi_nativeSetLensOffset(JNIEnv* env, |
| 595 jobject jcaller, |
| 596 jlong nativeGvrContext, |
| 597 jfloat x, |
| 598 jfloat y); |
| 599 |
| 600 extern "C" __attribute__((visibility("default"))) void |
| 601 Java_com_google_vr_ndk_base_GvrApi_nativeDumpDebugData(JNIEnv* env, |
| 602 jobject jcaller, |
| 603 jlong nativeGvrContext); |
| 604 |
| 605 extern "C" __attribute__((visibility("default"))) jboolean |
| 606 Java_com_google_vr_ndk_base_GvrApi_nativeUsingVrDisplayService( |
| 607 JNIEnv* env, |
| 608 jobject jcaller, |
| 609 jlong nativeGvrContext); |
| 610 |
| 611 // Step 3: RegisterNatives. |
| 612 |
| 613 static const JNINativeMethod kMethodsGvrApi[] = { |
| 614 {"nativeBufferViewportListCreate", |
| 615 "(" |
| 616 "J" |
| 617 ")" |
| 618 "J", |
| 619 reinterpret_cast<void*>( |
| 620 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListCreate)}, |
| 621 {"nativeBufferViewportListDestroy", |
| 622 "(" |
| 623 "J" |
| 624 ")" |
| 625 "V", |
| 626 reinterpret_cast<void*>( |
| 627 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListDestroy)}, |
| 628 {"nativeBufferViewportListGetSize", |
| 629 "(" |
| 630 "J" |
| 631 ")" |
| 632 "I", |
| 633 reinterpret_cast<void*>( |
| 634 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetSize)}, |
| 635 {"nativeBufferViewportListGetItem", |
| 636 "(" |
| 637 "J" |
| 638 "I" |
| 639 "J" |
| 640 ")" |
| 641 "V", |
| 642 reinterpret_cast<void*>( |
| 643 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListGetItem)}, |
| 644 {"nativeBufferViewportListSetItem", |
| 645 "(" |
| 646 "J" |
| 647 "I" |
| 648 "J" |
| 649 ")" |
| 650 "V", |
| 651 reinterpret_cast<void*>( |
| 652 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportListSetItem)}, |
| 653 {"nativeBufferViewportCreate", |
| 654 "(" |
| 655 "J" |
| 656 ")" |
| 657 "J", |
| 658 reinterpret_cast<void*>( |
| 659 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportCreate)}, |
| 660 {"nativeBufferViewportDestroy", |
| 661 "(" |
| 662 "J" |
| 663 ")" |
| 664 "V", |
| 665 reinterpret_cast<void*>( |
| 666 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportDestroy)}, |
| 667 {"nativeBufferViewportGetSourceUv", |
| 668 "(" |
| 669 "J" |
| 670 "Landroid/graphics/RectF;" |
| 671 ")" |
| 672 "V", |
| 673 reinterpret_cast<void*>( |
| 674 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceUv)}, |
| 675 {"nativeBufferViewportSetSourceUv", |
| 676 "(" |
| 677 "J" |
| 678 "F" |
| 679 "F" |
| 680 "F" |
| 681 "F" |
| 682 ")" |
| 683 "V", |
| 684 reinterpret_cast<void*>( |
| 685 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceUv)}, |
| 686 {"nativeBufferViewportGetSourceFov", |
| 687 "(" |
| 688 "J" |
| 689 "Landroid/graphics/RectF;" |
| 690 ")" |
| 691 "V", |
| 692 reinterpret_cast<void*>( |
| 693 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceFov)}, |
| 694 {"nativeBufferViewportSetSourceFov", |
| 695 "(" |
| 696 "J" |
| 697 "F" |
| 698 "F" |
| 699 "F" |
| 700 "F" |
| 701 ")" |
| 702 "V", |
| 703 reinterpret_cast<void*>( |
| 704 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceFov)}, |
| 705 {"nativeBufferViewportGetTransform", |
| 706 "(" |
| 707 "J" |
| 708 "[F" |
| 709 ")" |
| 710 "V", |
| 711 reinterpret_cast<void*>( |
| 712 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTransform)}, |
| 713 {"nativeBufferViewportSetTransform", |
| 714 "(" |
| 715 "J" |
| 716 "[F" |
| 717 ")" |
| 718 "V", |
| 719 reinterpret_cast<void*>( |
| 720 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTransform)}, |
| 721 {"nativeBufferViewportEqual", |
| 722 "(" |
| 723 "J" |
| 724 "J" |
| 725 ")" |
| 726 "Z", |
| 727 reinterpret_cast<void*>( |
| 728 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportEqual)}, |
| 729 {"nativeBufferViewportGetTargetEye", |
| 730 "(" |
| 731 "J" |
| 732 ")" |
| 733 "I", |
| 734 reinterpret_cast<void*>( |
| 735 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetTargetEye)}, |
| 736 {"nativeBufferViewportSetTargetEye", |
| 737 "(" |
| 738 "J" |
| 739 "I" |
| 740 ")" |
| 741 "V", |
| 742 reinterpret_cast<void*>( |
| 743 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetTargetEye)}, |
| 744 {"nativeBufferViewportGetSourceBufferIndex", |
| 745 "(" |
| 746 "J" |
| 747 ")" |
| 748 "I", |
| 749 reinterpret_cast<void*>( |
| 750 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetSourceBufferI
ndex)}, |
| 751 {"nativeBufferViewportSetSourceBufferIndex", |
| 752 "(" |
| 753 "J" |
| 754 "I" |
| 755 ")" |
| 756 "V", |
| 757 reinterpret_cast<void*>( |
| 758 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetSourceBufferI
ndex)}, |
| 759 {"nativeBufferViewportGetExternalSurfaceId", |
| 760 "(" |
| 761 "J" |
| 762 ")" |
| 763 "I", |
| 764 reinterpret_cast<void*>( |
| 765 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetExternalSurfa
ceId)}, |
| 766 {"nativeBufferViewportSetExternalSurfaceId", |
| 767 "(" |
| 768 "J" |
| 769 "I" |
| 770 ")" |
| 771 "V", |
| 772 reinterpret_cast<void*>( |
| 773 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetExternalSurfa
ceId)}, |
| 774 {"nativeBufferViewportGetReprojection", |
| 775 "(" |
| 776 "J" |
| 777 ")" |
| 778 "I", |
| 779 reinterpret_cast<void*>( |
| 780 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportGetReprojection)
}, |
| 781 {"nativeBufferViewportSetReprojection", |
| 782 "(" |
| 783 "J" |
| 784 "I" |
| 785 ")" |
| 786 "V", |
| 787 reinterpret_cast<void*>( |
| 788 Java_com_google_vr_ndk_base_GvrApi_nativeBufferViewportSetReprojection)
}, |
| 789 {"nativeBufferSpecCreate", |
| 790 "(" |
| 791 "J" |
| 792 ")" |
| 793 "J", |
| 794 reinterpret_cast<void*>( |
| 795 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecCreate)}, |
| 796 {"nativeBufferSpecDestroy", |
| 797 "(" |
| 798 "J" |
| 799 ")" |
| 800 "V", |
| 801 reinterpret_cast<void*>( |
| 802 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecDestroy)}, |
| 803 {"nativeBufferSpecGetSize", |
| 804 "(" |
| 805 "J" |
| 806 "Landroid/graphics/Point;" |
| 807 ")" |
| 808 "V", |
| 809 reinterpret_cast<void*>( |
| 810 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSize)}, |
| 811 {"nativeBufferSpecSetSize", |
| 812 "(" |
| 813 "J" |
| 814 "I" |
| 815 "I" |
| 816 ")" |
| 817 "V", |
| 818 reinterpret_cast<void*>( |
| 819 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSize)}, |
| 820 {"nativeBufferSpecSetColorFormat", |
| 821 "(" |
| 822 "J" |
| 823 "I" |
| 824 ")" |
| 825 "V", |
| 826 reinterpret_cast<void*>( |
| 827 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetColorFormat)}, |
| 828 {"nativeBufferSpecSetDepthStencilFormat", |
| 829 "(" |
| 830 "J" |
| 831 "I" |
| 832 ")" |
| 833 "V", |
| 834 reinterpret_cast<void*>( |
| 835 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetDepthStencilForma
t)}, |
| 836 {"nativeBufferSpecGetSamples", |
| 837 "(" |
| 838 "J" |
| 839 ")" |
| 840 "I", |
| 841 reinterpret_cast<void*>( |
| 842 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecGetSamples)}, |
| 843 {"nativeBufferSpecSetSamples", |
| 844 "(" |
| 845 "J" |
| 846 "I" |
| 847 ")" |
| 848 "V", |
| 849 reinterpret_cast<void*>( |
| 850 Java_com_google_vr_ndk_base_GvrApi_nativeBufferSpecSetSamples)}, |
| 851 {"nativeSwapChainCreate", |
| 852 "(" |
| 853 "J" |
| 854 "[J" |
| 855 ")" |
| 856 "J", |
| 857 reinterpret_cast<void*>( |
| 858 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainCreate)}, |
| 859 {"nativeSwapChainDestroy", |
| 860 "(" |
| 861 "J" |
| 862 ")" |
| 863 "V", |
| 864 reinterpret_cast<void*>( |
| 865 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainDestroy)}, |
| 866 {"nativeSwapChainGetBufferCount", |
| 867 "(" |
| 868 "J" |
| 869 ")" |
| 870 "I", |
| 871 reinterpret_cast<void*>( |
| 872 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferCount)}, |
| 873 {"nativeSwapChainGetBufferSize", |
| 874 "(" |
| 875 "J" |
| 876 "I" |
| 877 "Landroid/graphics/Point;" |
| 878 ")" |
| 879 "V", |
| 880 reinterpret_cast<void*>( |
| 881 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainGetBufferSize)}, |
| 882 {"nativeSwapChainResizeBuffer", |
| 883 "(" |
| 884 "J" |
| 885 "I" |
| 886 "I" |
| 887 "I" |
| 888 ")" |
| 889 "V", |
| 890 reinterpret_cast<void*>( |
| 891 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainResizeBuffer)}, |
| 892 {"nativeSwapChainAcquireFrame", |
| 893 "(" |
| 894 "J" |
| 895 ")" |
| 896 "J", |
| 897 reinterpret_cast<void*>( |
| 898 Java_com_google_vr_ndk_base_GvrApi_nativeSwapChainAcquireFrame)}, |
| 899 {"nativeFrameBindBuffer", |
| 900 "(" |
| 901 "J" |
| 902 "I" |
| 903 ")" |
| 904 "V", |
| 905 reinterpret_cast<void*>( |
| 906 Java_com_google_vr_ndk_base_GvrApi_nativeFrameBindBuffer)}, |
| 907 {"nativeFrameUnbind", |
| 908 "(" |
| 909 "J" |
| 910 ")" |
| 911 "V", |
| 912 reinterpret_cast<void*>( |
| 913 Java_com_google_vr_ndk_base_GvrApi_nativeFrameUnbind)}, |
| 914 {"nativeFrameGetFramebufferObject", |
| 915 "(" |
| 916 "J" |
| 917 "I" |
| 918 ")" |
| 919 "I", |
| 920 reinterpret_cast<void*>( |
| 921 Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetFramebufferObject)}, |
| 922 {"nativeFrameGetBufferSize", |
| 923 "(" |
| 924 "J" |
| 925 "I" |
| 926 "Landroid/graphics/Point;" |
| 927 ")" |
| 928 "V", |
| 929 reinterpret_cast<void*>( |
| 930 Java_com_google_vr_ndk_base_GvrApi_nativeFrameGetBufferSize)}, |
| 931 {"nativeFrameSubmit", |
| 932 "(" |
| 933 "J" |
| 934 "J" |
| 935 "[F" |
| 936 ")" |
| 937 "V", |
| 938 reinterpret_cast<void*>( |
| 939 Java_com_google_vr_ndk_base_GvrApi_nativeFrameSubmit)}, |
| 940 {"nativeCreate", |
| 941 "(" |
| 942 "Ljava/lang/ClassLoader;" |
| 943 "Landroid/content/Context;" |
| 944 "J" |
| 945 "I" |
| 946 "I" |
| 947 "F" |
| 948 "F" |
| 949 "Lcom/google/vr/ndk/base/GvrApi$PoseTracker;" |
| 950 ")" |
| 951 "J", |
| 952 reinterpret_cast<void*>(Java_com_google_vr_ndk_base_GvrApi_nativeCreate)}, |
| 953 {"nativeGetError", |
| 954 "(" |
| 955 "J" |
| 956 ")" |
| 957 "I", |
| 958 reinterpret_cast<void*>( |
| 959 Java_com_google_vr_ndk_base_GvrApi_nativeGetError)}, |
| 960 {"nativeClearError", |
| 961 "(" |
| 962 "J" |
| 963 ")" |
| 964 "I", |
| 965 reinterpret_cast<void*>( |
| 966 Java_com_google_vr_ndk_base_GvrApi_nativeClearError)}, |
| 967 {"nativeGetErrorString", |
| 968 "(" |
| 969 "I" |
| 970 ")" |
| 971 "Ljava/lang/String;", |
| 972 reinterpret_cast<void*>( |
| 973 Java_com_google_vr_ndk_base_GvrApi_nativeGetErrorString)}, |
| 974 {"nativeGetUserPrefs", |
| 975 "(" |
| 976 "J" |
| 977 ")" |
| 978 "J", |
| 979 reinterpret_cast<void*>( |
| 980 Java_com_google_vr_ndk_base_GvrApi_nativeGetUserPrefs)}, |
| 981 {"nativeUserPrefsGetControllerHandedness", |
| 982 "(" |
| 983 "J" |
| 984 ")" |
| 985 "I", |
| 986 reinterpret_cast<void*>( |
| 987 Java_com_google_vr_ndk_base_GvrApi_nativeUserPrefsGetControllerHandedne
ss)}, |
| 988 {"nativePause", |
| 989 "(" |
| 990 "J" |
| 991 ")" |
| 992 "V", |
| 993 reinterpret_cast<void*>(Java_com_google_vr_ndk_base_GvrApi_nativePause)}, |
| 994 {"nativeResume", |
| 995 "(" |
| 996 "J" |
| 997 ")" |
| 998 "V", |
| 999 reinterpret_cast<void*>(Java_com_google_vr_ndk_base_GvrApi_nativeResume)}, |
| 1000 {"nativeReleaseGvrContext", |
| 1001 "(" |
| 1002 "J" |
| 1003 ")" |
| 1004 "V", |
| 1005 reinterpret_cast<void*>( |
| 1006 Java_com_google_vr_ndk_base_GvrApi_nativeReleaseGvrContext)}, |
| 1007 {"nativeInitializeGl", |
| 1008 "(" |
| 1009 "J" |
| 1010 ")" |
| 1011 "V", |
| 1012 reinterpret_cast<void*>( |
| 1013 Java_com_google_vr_ndk_base_GvrApi_nativeInitializeGl)}, |
| 1014 {"nativeOnSurfaceCreatedReprojectionThread", |
| 1015 "(" |
| 1016 "J" |
| 1017 ")" |
| 1018 "V", |
| 1019 reinterpret_cast<void*>( |
| 1020 Java_com_google_vr_ndk_base_GvrApi_nativeOnSurfaceCreatedReprojectionTh
read)}, |
| 1021 {"nativeGetRecommendedBufferViewports", |
| 1022 "(" |
| 1023 "J" |
| 1024 "J" |
| 1025 ")" |
| 1026 "V", |
| 1027 reinterpret_cast<void*>( |
| 1028 Java_com_google_vr_ndk_base_GvrApi_nativeGetRecommendedBufferViewports)
}, |
| 1029 {"nativeGetScreenBufferViewports", |
| 1030 "(" |
| 1031 "J" |
| 1032 "J" |
| 1033 ")" |
| 1034 "V", |
| 1035 reinterpret_cast<void*>( |
| 1036 Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenBufferViewports)}, |
| 1037 {"nativeGetMaximumEffectiveRenderTargetSize", |
| 1038 "(" |
| 1039 "J" |
| 1040 "Landroid/graphics/Point;" |
| 1041 ")" |
| 1042 "V", |
| 1043 reinterpret_cast<void*>( |
| 1044 Java_com_google_vr_ndk_base_GvrApi_nativeGetMaximumEffectiveRenderTarge
tSize)}, |
| 1045 {"nativeGetScreenTargetSize", |
| 1046 "(" |
| 1047 "J" |
| 1048 "Landroid/graphics/Point;" |
| 1049 ")" |
| 1050 "V", |
| 1051 reinterpret_cast<void*>( |
| 1052 Java_com_google_vr_ndk_base_GvrApi_nativeGetScreenTargetSize)}, |
| 1053 {"nativeDistortToScreen", |
| 1054 "(" |
| 1055 "J" |
| 1056 "I" |
| 1057 "J" |
| 1058 "[F" |
| 1059 "J" |
| 1060 ")" |
| 1061 "V", |
| 1062 reinterpret_cast<void*>( |
| 1063 Java_com_google_vr_ndk_base_GvrApi_nativeDistortToScreen)}, |
| 1064 {"nativeSetDefaultFramebufferActive", |
| 1065 "(" |
| 1066 "J" |
| 1067 ")" |
| 1068 "V", |
| 1069 reinterpret_cast<void*>( |
| 1070 Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultFramebufferActive)}, |
| 1071 {"nativeRenderReprojectionThread", |
| 1072 "(" |
| 1073 "J" |
| 1074 ")" |
| 1075 "Landroid/graphics/Point;", |
| 1076 reinterpret_cast<void*>( |
| 1077 Java_com_google_vr_ndk_base_GvrApi_nativeRenderReprojectionThread)}, |
| 1078 {"nativeOnPauseReprojectionThread", |
| 1079 "(" |
| 1080 "J" |
| 1081 ")" |
| 1082 "V", |
| 1083 reinterpret_cast<void*>( |
| 1084 Java_com_google_vr_ndk_base_GvrApi_nativeOnPauseReprojectionThread)}, |
| 1085 {"nativeUpdateSurfaceReprojectionThread", |
| 1086 "(" |
| 1087 "J" |
| 1088 "I" |
| 1089 "I" |
| 1090 "J" |
| 1091 "[F" |
| 1092 ")" |
| 1093 "V", |
| 1094 reinterpret_cast<void*>( |
| 1095 Java_com_google_vr_ndk_base_GvrApi_nativeUpdateSurfaceReprojectionThrea
d)}, |
| 1096 {"nativeRemoveAllSurfacesReprojectionThread", |
| 1097 "(" |
| 1098 "J" |
| 1099 ")" |
| 1100 "V", |
| 1101 reinterpret_cast<void*>( |
| 1102 Java_com_google_vr_ndk_base_GvrApi_nativeRemoveAllSurfacesReprojectionT
hread)}, |
| 1103 {"nativeGetHeadSpaceFromStartSpaceRotation", |
| 1104 "(" |
| 1105 "J" |
| 1106 "[F" |
| 1107 "J" |
| 1108 ")" |
| 1109 "V", |
| 1110 reinterpret_cast<void*>( |
| 1111 Java_com_google_vr_ndk_base_GvrApi_nativeGetHeadSpaceFromStartSpaceRota
tion)}, |
| 1112 {"nativeSetIgnoreManualPauseResumeTracker", |
| 1113 "(" |
| 1114 "J" |
| 1115 "Z" |
| 1116 ")" |
| 1117 "V", |
| 1118 reinterpret_cast<void*>( |
| 1119 Java_com_google_vr_ndk_base_GvrApi_nativeSetIgnoreManualPauseResumeTrac
ker)}, |
| 1120 {"nativePauseTracking", |
| 1121 "(" |
| 1122 "J" |
| 1123 ")" |
| 1124 "[B", |
| 1125 reinterpret_cast<void*>( |
| 1126 Java_com_google_vr_ndk_base_GvrApi_nativePauseTracking)}, |
| 1127 {"nativeResumeTracking", |
| 1128 "(" |
| 1129 "J" |
| 1130 "[B" |
| 1131 ")" |
| 1132 "V", |
| 1133 reinterpret_cast<void*>( |
| 1134 Java_com_google_vr_ndk_base_GvrApi_nativeResumeTracking)}, |
| 1135 {"nativeResetTracking", |
| 1136 "(" |
| 1137 "J" |
| 1138 ")" |
| 1139 "V", |
| 1140 reinterpret_cast<void*>( |
| 1141 Java_com_google_vr_ndk_base_GvrApi_nativeResetTracking)}, |
| 1142 {"nativeRecenterTracking", |
| 1143 "(" |
| 1144 "J" |
| 1145 ")" |
| 1146 "V", |
| 1147 reinterpret_cast<void*>( |
| 1148 Java_com_google_vr_ndk_base_GvrApi_nativeRecenterTracking)}, |
| 1149 {"nativeGetEyeFromHeadMatrix", |
| 1150 "(" |
| 1151 "J" |
| 1152 "I" |
| 1153 "[F" |
| 1154 ")" |
| 1155 "V", |
| 1156 reinterpret_cast<void*>( |
| 1157 Java_com_google_vr_ndk_base_GvrApi_nativeGetEyeFromHeadMatrix)}, |
| 1158 {"nativeGetWindowBounds", |
| 1159 "(" |
| 1160 "J" |
| 1161 ")" |
| 1162 "[I", |
| 1163 reinterpret_cast<void*>( |
| 1164 Java_com_google_vr_ndk_base_GvrApi_nativeGetWindowBounds)}, |
| 1165 {"nativeComputeDistortedPoint", |
| 1166 "(" |
| 1167 "J" |
| 1168 "I" |
| 1169 "[F" |
| 1170 ")" |
| 1171 "[F", |
| 1172 reinterpret_cast<void*>( |
| 1173 Java_com_google_vr_ndk_base_GvrApi_nativeComputeDistortedPoint)}, |
| 1174 {"nativeSetDefaultViewerProfile", |
| 1175 "(" |
| 1176 "J" |
| 1177 "Ljava/lang/String;" |
| 1178 ")" |
| 1179 "Z", |
| 1180 reinterpret_cast<void*>( |
| 1181 Java_com_google_vr_ndk_base_GvrApi_nativeSetDefaultViewerProfile)}, |
| 1182 {"nativeGetViewerVendor", |
| 1183 "(" |
| 1184 "J" |
| 1185 ")" |
| 1186 "Ljava/lang/String;", |
| 1187 reinterpret_cast<void*>( |
| 1188 Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerVendor)}, |
| 1189 {"nativeGetViewerModel", |
| 1190 "(" |
| 1191 "J" |
| 1192 ")" |
| 1193 "Ljava/lang/String;", |
| 1194 reinterpret_cast<void*>( |
| 1195 Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerModel)}, |
| 1196 {"nativeGetViewerType", |
| 1197 "(" |
| 1198 "J" |
| 1199 ")" |
| 1200 "I", |
| 1201 reinterpret_cast<void*>( |
| 1202 Java_com_google_vr_ndk_base_GvrApi_nativeGetViewerType)}, |
| 1203 {"nativeSetAsyncReprojectionEnabled", |
| 1204 "(" |
| 1205 "J" |
| 1206 "Z" |
| 1207 ")" |
| 1208 "Z", |
| 1209 reinterpret_cast<void*>( |
| 1210 Java_com_google_vr_ndk_base_GvrApi_nativeSetAsyncReprojectionEnabled)}, |
| 1211 {"nativeGetAsyncReprojectionEnabled", |
| 1212 "(" |
| 1213 "J" |
| 1214 ")" |
| 1215 "Z", |
| 1216 reinterpret_cast<void*>( |
| 1217 Java_com_google_vr_ndk_base_GvrApi_nativeGetAsyncReprojectionEnabled)}, |
| 1218 {"nativeReconnectSensors", |
| 1219 "(" |
| 1220 "J" |
| 1221 ")" |
| 1222 "V", |
| 1223 reinterpret_cast<void*>( |
| 1224 Java_com_google_vr_ndk_base_GvrApi_nativeReconnectSensors)}, |
| 1225 {"nativeSetViewerParams", |
| 1226 "(" |
| 1227 "J" |
| 1228 "[B" |
| 1229 ")" |
| 1230 "Z", |
| 1231 reinterpret_cast<void*>( |
| 1232 Java_com_google_vr_ndk_base_GvrApi_nativeSetViewerParams)}, |
| 1233 {"nativeSetDisplayMetrics", |
| 1234 "(" |
| 1235 "J" |
| 1236 "I" |
| 1237 "I" |
| 1238 "F" |
| 1239 "F" |
| 1240 ")" |
| 1241 "V", |
| 1242 reinterpret_cast<void*>( |
| 1243 Java_com_google_vr_ndk_base_GvrApi_nativeSetDisplayMetrics)}, |
| 1244 {"nativeGetBorderSizeMeters", |
| 1245 "(" |
| 1246 "J" |
| 1247 ")" |
| 1248 "F", |
| 1249 reinterpret_cast<void*>( |
| 1250 Java_com_google_vr_ndk_base_GvrApi_nativeGetBorderSizeMeters)}, |
| 1251 {"nativeSetSurfaceSize", |
| 1252 "(" |
| 1253 "J" |
| 1254 "I" |
| 1255 "I" |
| 1256 ")" |
| 1257 "V", |
| 1258 reinterpret_cast<void*>( |
| 1259 Java_com_google_vr_ndk_base_GvrApi_nativeSetSurfaceSize)}, |
| 1260 {"nativeSetLensOffset", |
| 1261 "(" |
| 1262 "J" |
| 1263 "F" |
| 1264 "F" |
| 1265 ")" |
| 1266 "V", |
| 1267 reinterpret_cast<void*>( |
| 1268 Java_com_google_vr_ndk_base_GvrApi_nativeSetLensOffset)}, |
| 1269 {"nativeDumpDebugData", |
| 1270 "(" |
| 1271 "J" |
| 1272 ")" |
| 1273 "V", |
| 1274 reinterpret_cast<void*>( |
| 1275 Java_com_google_vr_ndk_base_GvrApi_nativeDumpDebugData)}, |
| 1276 {"nativeUsingVrDisplayService", |
| 1277 "(" |
| 1278 "J" |
| 1279 ")" |
| 1280 "Z", |
| 1281 reinterpret_cast<void*>( |
| 1282 Java_com_google_vr_ndk_base_GvrApi_nativeUsingVrDisplayService)}, |
| 1283 }; |
| 1284 |
| 1285 static bool RegisterNativesImpl(JNIEnv* env) { |
| 1286 if (base::android::IsManualJniRegistrationDisabled()) |
| 1287 return true; |
| 1288 |
| 1289 const int kMethodsGvrApiSize = arraysize(kMethodsGvrApi); |
| 1290 |
| 1291 if (env->RegisterNatives(GvrApi_clazz(env), kMethodsGvrApi, |
| 1292 kMethodsGvrApiSize) < 0) { |
| 1293 jni_generator::HandleRegistrationError(env, GvrApi_clazz(env), __FILE__); |
| 1294 return false; |
| 1295 } |
| 1296 |
| 1297 return true; |
| 1298 } |
| 1299 |
| 1300 static bool RegisterGvrApiNatives(JNIEnv* env) { |
| 1301 return RegisterNativesImpl(env); |
| 1302 } |
| 1303 |
| 1304 } // namespace GvrApi |
| 1305 |
| 1306 #endif // com_google_vr_ndk_base_GvrApi_JNI |
OLD | NEW |