Skip to content

Commit 5a6d607

Browse files
committed
[vr_main] add comment documenting time to first frame
1 parent b43f05c commit 5a6d607

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/android/app/src/main/jni/vr/vr_main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ class VRApp {
228228
// Doesn't actually matter, except to make the indices
229229
// consistent in traces
230230
mFrameIndex++;
231+
232+
// Log time to first frame
231233
if (mFrameIndex == 1) {
232234
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
233235
ALOGI("Time to first frame: %lld ms",
@@ -801,7 +803,10 @@ struct VRAppHandle {
801803

802804
extern "C" JNIEXPORT jlong JNICALL
803805
Java_org_citra_citra_1emu_vr_VrActivity_nativeOnCreate(JNIEnv* env, jobject thiz) {
806+
// Log the creat start time, which will be used to calculate the total
807+
// time to first frame.
804808
gOnCreateStartTime = std::chrono::steady_clock::now();
809+
805810
JavaVM* jvm;
806811
env->GetJavaVM(&jvm);
807812
return VRAppHandle(new VRApp(jvm, env->NewGlobalRef(thiz))).l;

0 commit comments

Comments
 (0)