Hi,
Somewhat a cross-post from android-dev but that now seems to be a wasteland of job adverts, and it does relate to native code.
I'm writing a runtime for a new smartphone-powered VR setup, and looking to get the lowest latency possible via front-buffer rendering (KHR_mutable_render_buffer, ANDROID_front_buffer_auto_refresh) and scheduling a "late warp" of the latest rendered buffer to apply at least orientation updates just before the new frame is scanned out.
Choreographer has offsets on some devices from "true" vsync time, so I expect I'll want to track vsync myself somewhere and schedule the late warp thread to wake up at the right time to produce the next frame + some wiggle room.
Are there any guarantees of scheduling latencies on Android (assuming an available CPU)? Is usleep as good as it gets or are there advantages to the timerfd API used in SurfaceFlinger's
scheduler?
Thanks,
Simon