mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-28 17:38:27 +00:00
st/oxr: don't run the timestamp conversion in a loop
This commit is contained in:
parent
075fde3613
commit
b863aa2629
|
@ -1278,32 +1278,29 @@ oxr_session_frame_end(struct oxr_logger *log, struct oxr_session *sess, const Xr
|
|||
const XrCompositionLayerBaseHeader *layer = frameEndInfo->layers[i];
|
||||
assert(layer != NULL);
|
||||
|
||||
int64_t timestamp =
|
||||
time_state_ts_to_monotonic_ns(sess->sys->inst->timekeeping, frameEndInfo->displayTime);
|
||||
|
||||
switch (layer->type) {
|
||||
case XR_TYPE_COMPOSITION_LAYER_PROJECTION:
|
||||
submit_projection_layer(sess, xc, log, (XrCompositionLayerProjection *)layer, xdev, &inv_offset,
|
||||
timestamp);
|
||||
display_time_ns);
|
||||
break;
|
||||
case XR_TYPE_COMPOSITION_LAYER_QUAD:
|
||||
submit_quad_layer(sess, xc, log, (XrCompositionLayerQuad *)layer, xdev, &inv_offset, timestamp);
|
||||
submit_quad_layer(sess, xc, log, (XrCompositionLayerQuad *)layer, xdev, &inv_offset, display_time_ns);
|
||||
break;
|
||||
case XR_TYPE_COMPOSITION_LAYER_CUBE_KHR:
|
||||
submit_cube_layer(sess, xc, log, (XrCompositionLayerCubeKHR *)layer, xdev, &inv_offset,
|
||||
timestamp);
|
||||
display_time_ns);
|
||||
break;
|
||||
case XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR:
|
||||
submit_cylinder_layer(sess, xc, log, (XrCompositionLayerCylinderKHR *)layer, xdev, &inv_offset,
|
||||
timestamp);
|
||||
display_time_ns);
|
||||
break;
|
||||
case XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR:
|
||||
submit_equirect1_layer(sess, xc, log, (XrCompositionLayerEquirectKHR *)layer, xdev, &inv_offset,
|
||||
timestamp);
|
||||
display_time_ns);
|
||||
break;
|
||||
case XR_TYPE_COMPOSITION_LAYER_EQUIRECT2_KHR:
|
||||
submit_equirect2_layer(sess, xc, log, (XrCompositionLayerEquirect2KHR *)layer, xdev,
|
||||
&inv_offset, timestamp);
|
||||
&inv_offset, display_time_ns);
|
||||
break;
|
||||
default: assert(false && "invalid layer type");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue