mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-16 11:55:39 +00:00
c/main: Revert "Transition to visible/focused after xrEndFrame, not xrWaitFrame"
This reverts commit e03ee48dce
.
This commit is contained in:
parent
3dfa7167b2
commit
e7643de8db
|
@ -210,6 +210,9 @@ compositor_wait_frame(struct xrt_compositor *xc,
|
|||
*predicted_display_time = c->last_next_display_time;
|
||||
*out_frame_id = c->last_next_display_time;
|
||||
|
||||
if (c->state == COMP_STATE_PREPARED) {
|
||||
c->state = COMP_STATE_WAITED;
|
||||
}
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -242,6 +245,10 @@ compositor_wait_frame(struct xrt_compositor *xc,
|
|||
*out_frame_id = c->last_next_display_time;
|
||||
|
||||
c->last_next_display_time = next_display_time;
|
||||
|
||||
if (c->state == COMP_STATE_PREPARED) {
|
||||
c->state = COMP_STATE_WAITED;
|
||||
}
|
||||
return XRT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -507,10 +514,6 @@ compositor_layer_commit(struct xrt_compositor *xc, int64_t frame_id)
|
|||
c->expected_app_duration_ns =
|
||||
c->app_profiling.last_end - c->app_profiling.last_begin;
|
||||
|
||||
if (c->state == COMP_STATE_PREPARED) {
|
||||
c->state = COMP_STATE_COMMITTED;
|
||||
}
|
||||
|
||||
// Now is a good point to garbage collect.
|
||||
comp_compositor_garbage_collect(c);
|
||||
return XRT_SUCCESS;
|
||||
|
@ -532,8 +535,8 @@ compositor_poll_events(struct xrt_compositor *xc,
|
|||
case COMP_STATE_PREPARED:
|
||||
out_xce->state.type = XRT_COMPOSITOR_EVENT_NONE;
|
||||
break;
|
||||
case COMP_STATE_COMMITTED:
|
||||
COMP_DEBUG(c, "COMMITTED -> VISIBLE");
|
||||
case COMP_STATE_WAITED:
|
||||
COMP_DEBUG(c, "WAITED -> VISIBLE");
|
||||
out_xce->state.type = XRT_COMPOSITOR_EVENT_STATE_CHANGE;
|
||||
out_xce->state.visible = true;
|
||||
c->state = COMP_STATE_VISIBLE;
|
||||
|
|
|
@ -129,7 +129,7 @@ enum comp_state
|
|||
{
|
||||
COMP_STATE_READY = 0,
|
||||
COMP_STATE_PREPARED = 1,
|
||||
COMP_STATE_COMMITTED = 2,
|
||||
COMP_STATE_WAITED = 2,
|
||||
COMP_STATE_VISIBLE = 3,
|
||||
COMP_STATE_FOCUSED = 4,
|
||||
};
|
||||
|
|
|
@ -1898,11 +1898,6 @@ oxr_session_frame_end(struct oxr_logger *log,
|
|||
|
||||
do_synchronize_state_change(log, sess);
|
||||
|
||||
// For emitting state changes, the compositor has to know
|
||||
// whether the client is synchronized, i.e. has called
|
||||
// xrEndFrame, even with 0 layers.
|
||||
CALL_CHK(xrt_comp_layer_commit(xc, -1));
|
||||
|
||||
return oxr_session_success_result(sess);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue