125 {
126 static const JNINativeMethod methods[] = {
127 {
128 .name = "nativeOnVsync",
129 .signature = "(JJJ)V",
130 .fnPtr = reinterpret_cast<void*>(&OnVsyncFromJava),
131 },
132 {
133 .name = "nativeUpdateRefreshRate",
134 .signature = "(F)V",
135 .fnPtr = reinterpret_cast<void*>(&OnUpdateRefreshRate),
136 }};
137
138 jclass clazz = env->FindClass("io/flutter/embedding/engine/FlutterJNI");
139
140 if (clazz == nullptr) {
141 return false;
142 }
143
146
150
151 return env->RegisterNatives(clazz, methods, std::size(methods)) == 0;
152}
#define FML_CHECK(condition)
static fml::jni::ScopedJavaGlobalRef< jclass > * g_vsync_waiter_class
static jmethodID g_async_wait_for_vsync_method_