The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/main: Revert "Transition to visible/focused after xrEndFrame, not xrWaitFrame"

This reverts commit e03ee48dcea88427ac3272ccab70bb665b1618a4.

+10 -12
+9 -6
src/xrt/compositor/main/comp_compositor.c
··· 210 210 *predicted_display_time = c->last_next_display_time; 211 211 *out_frame_id = c->last_next_display_time; 212 212 213 + if (c->state == COMP_STATE_PREPARED) { 214 + c->state = COMP_STATE_WAITED; 215 + } 213 216 return XRT_SUCCESS; 214 217 } 215 218 ··· 242 245 *out_frame_id = c->last_next_display_time; 243 246 244 247 c->last_next_display_time = next_display_time; 248 + 249 + if (c->state == COMP_STATE_PREPARED) { 250 + c->state = COMP_STATE_WAITED; 251 + } 245 252 return XRT_SUCCESS; 246 253 } 247 254 } ··· 507 514 c->expected_app_duration_ns = 508 515 c->app_profiling.last_end - c->app_profiling.last_begin; 509 516 510 - if (c->state == COMP_STATE_PREPARED) { 511 - c->state = COMP_STATE_COMMITTED; 512 - } 513 - 514 517 // Now is a good point to garbage collect. 515 518 comp_compositor_garbage_collect(c); 516 519 return XRT_SUCCESS; ··· 532 535 case COMP_STATE_PREPARED: 533 536 out_xce->state.type = XRT_COMPOSITOR_EVENT_NONE; 534 537 break; 535 - case COMP_STATE_COMMITTED: 536 - COMP_DEBUG(c, "COMMITTED -> VISIBLE"); 538 + case COMP_STATE_WAITED: 539 + COMP_DEBUG(c, "WAITED -> VISIBLE"); 537 540 out_xce->state.type = XRT_COMPOSITOR_EVENT_STATE_CHANGE; 538 541 out_xce->state.visible = true; 539 542 c->state = COMP_STATE_VISIBLE;
+1 -1
src/xrt/compositor/main/comp_compositor.h
··· 129 129 { 130 130 COMP_STATE_READY = 0, 131 131 COMP_STATE_PREPARED = 1, 132 - COMP_STATE_COMMITTED = 2, 132 + COMP_STATE_WAITED = 2, 133 133 COMP_STATE_VISIBLE = 3, 134 134 COMP_STATE_FOCUSED = 4, 135 135 };
-5
src/xrt/state_trackers/oxr/oxr_session.c
··· 1898 1898 1899 1899 do_synchronize_state_change(log, sess); 1900 1900 1901 - // For emitting state changes, the compositor has to know 1902 - // whether the client is synchronized, i.e. has called 1903 - // xrEndFrame, even with 0 layers. 1904 - CALL_CHK(xrt_comp_layer_commit(xc, -1)); 1905 - 1906 1901 return oxr_session_success_result(sess); 1907 1902 } 1908 1903