mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 04:36:07 +00:00
st/oxr: Hand determination of frame time and interval over to compositor
This commit is contained in:
parent
8c37377853
commit
f78509ba9b
|
@ -463,7 +463,6 @@ struct oxr_session
|
||||||
*/
|
*/
|
||||||
float ipd_meters;
|
float ipd_meters;
|
||||||
|
|
||||||
uint64_t nominal_frame_interval_ns;
|
|
||||||
float static_prediction_s;
|
float static_prediction_s;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -299,16 +299,11 @@ oxr_session_frame_wait(struct oxr_logger *log,
|
||||||
" session is not running");
|
" session is not running");
|
||||||
}
|
}
|
||||||
|
|
||||||
// OK to update this here because xrWaitFrame must be externally
|
//! @todo this should be carefully synchronized, because there may be
|
||||||
// synchronized by the app.
|
//! more than one session per instance.
|
||||||
timepoint_ns now =
|
timepoint_ns now =
|
||||||
time_state_get_now_and_update(sess->sys->inst->timekeeping);
|
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;
|
struct xrt_compositor *xc = sess->compositor;
|
||||||
xc->wait_frame(xc, &frameState->predictedDisplayTime,
|
xc->wait_frame(xc, &frameState->predictedDisplayTime,
|
||||||
&frameState->predictedDisplayPeriod);
|
&frameState->predictedDisplayPeriod);
|
||||||
|
@ -492,8 +487,6 @@ oxr_session_create(struct oxr_logger *log,
|
||||||
}
|
}
|
||||||
|
|
||||||
sess->ipd_meters = debug_get_num_option_ipd() / 1000.0f;
|
sess->ipd_meters = debug_get_num_option_ipd() / 1000.0f;
|
||||||
//! @todo hard-coding 90Hz
|
|
||||||
sess->nominal_frame_interval_ns = 11111111;
|
|
||||||
sess->static_prediction_s =
|
sess->static_prediction_s =
|
||||||
debug_get_num_option_prediction_ms() / 1000.0f;
|
debug_get_num_option_prediction_ms() / 1000.0f;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue