st/oxr: Hand determination of frame time and interval over to compositor

This commit is contained in:
Ryan Pavlik 2019-03-17 20:34:07 -07:00 committed by Jakob Bornecrantz
parent 8c37377853
commit f78509ba9b
2 changed files with 2 additions and 10 deletions

View file

@ -463,7 +463,6 @@ struct oxr_session
*/
float ipd_meters;
uint64_t nominal_frame_interval_ns;
float static_prediction_s;
/*!

View file

@ -299,16 +299,11 @@ oxr_session_frame_wait(struct oxr_logger *log,
" session is not running");
}
// OK to update this here because xrWaitFrame must be externally
// synchronized by the app.
//! @todo this should be carefully synchronized, because there may be
//! more than one session per instance.
timepoint_ns now =
time_state_get_now_and_update(sess->sys->inst->timekeeping);
// Set defaults - may be overridden by compositor.
frameState->predictedDisplayPeriod = sess->nominal_frame_interval_ns;
frameState->predictedDisplayTime =
now + frameState->predictedDisplayPeriod;
struct xrt_compositor *xc = sess->compositor;
xc->wait_frame(xc, &frameState->predictedDisplayTime,
&frameState->predictedDisplayPeriod);
@ -492,8 +487,6 @@ oxr_session_create(struct oxr_logger *log,
}
sess->ipd_meters = debug_get_num_option_ipd() / 1000.0f;
//! @todo hard-coding 90Hz
sess->nominal_frame_interval_ns = 11111111;
sess->static_prediction_s =
debug_get_num_option_prediction_ms() / 1000.0f;