MCPcopy Create free account
hub / github.com/android/ndk-samples / UpdateFPS

Method UpdateFPS

teapots/image-decoder/src/main/cpp/TeapotNativeActivity.cpp:369–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369void Engine::UpdateFPS(float fFPS) {
370 JNIEnv* jni;
371 app_->activity->vm->AttachCurrentThread(&jni, NULL);
372
373 // Default class retrieval
374 jclass clazz = jni->GetObjectClass(app_->activity->clazz);
375 jmethodID methodID = jni->GetMethodID(clazz, "updateFPS", "(F)V");
376 jni->CallVoidMethod(app_->activity->clazz, methodID, fFPS);
377
378 app_->activity->vm->DetachCurrentThread();
379 return;
380}
381
382Engine g_engine;
383

Callers

nothing calls this directly

Calls 3

AttachCurrentThreadMethod · 0.80
CallVoidMethodMethod · 0.80
DetachCurrentThreadMethod · 0.80

Tested by

no test coverage detected