The open source OpenXR runtime
0
fork

Configure Feed

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

c/multi: Add warm start and invalid states

authored by

Jakob Bornecrantz and committed by
Moses Turner
6faea922 4b3f97c6

+24 -1
+14 -1
src/xrt/compositor/multi/comp_multi_private.h
··· 235 235 enum multi_system_state 236 236 { 237 237 /*! 238 - * Initial state and post stopping state. 238 + * Invalid state, never used. 239 + */ 240 + MULTI_SYSTEM_STATE_INVALID, 241 + 242 + /*! 243 + * One of the initial states, the multi-client system compositor will 244 + * make sure that its @ref xrt_compositor_native submits one frame. 245 + * 246 + * The session hasn't been started yet. 247 + */ 248 + MULTI_SYSTEM_STATE_INIT_WARM_START, 249 + 250 + /*! 251 + * One of the initial state and post stopping state. 239 252 * 240 253 * The multi-client system compositor has called @ref xrt_comp_end_session 241 254 * on its @ref xrt_compositor_native.
+10
src/xrt/compositor/multi/comp_multi_system.c
··· 373 373 enum xrt_view_type view_type = XRT_VIEW_TYPE_STEREO; 374 374 375 375 switch (msc->sessions.state) { 376 + case MULTI_SYSTEM_STATE_INIT_WARM_START: 377 + U_LOG_I("Doing warm start, %u active app session(s).", (uint32_t)msc->sessions.active_count); 378 + 379 + // Produce at least one frame on init. 380 + msc->sessions.state = MULTI_SYSTEM_STATE_STOPPING; 381 + xrt_comp_begin_session(xc, view_type); 382 + break; 383 + 376 384 case MULTI_SYSTEM_STATE_STOPPED: 377 385 if (msc->sessions.active_count == 0) { 378 386 break; ··· 387 395 if (msc->sessions.active_count > 0) { 388 396 break; 389 397 } 398 + 390 399 U_LOG_I("Stopping main session, %u active app session(s).", (uint32_t)msc->sessions.active_count); 391 400 msc->sessions.state = MULTI_SYSTEM_STATE_STOPPING; 392 401 break; ··· 405 414 xrt_comp_end_session(xc); 406 415 break; 407 416 417 + case MULTI_SYSTEM_STATE_INVALID: 408 418 default: 409 419 U_LOG_E("Got invalid state %u", msc->sessions.state); 410 420 msc->sessions.state = MULTI_SYSTEM_STATE_STOPPING;