mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
c/multi: Pass in option to do warm start-ups
This commit is contained in:
parent
6faea9224e
commit
e06608533f
|
@ -1305,5 +1305,5 @@ xrt_gfx_provider_create_system(struct xrt_device *xdev, struct xrt_system_compos
|
||||||
xrt_result_t xret = u_pa_factory_create(&upaf);
|
xrt_result_t xret = u_pa_factory_create(&upaf);
|
||||||
assert(xret == XRT_SUCCESS && upaf != NULL);
|
assert(xret == XRT_SUCCESS && upaf != NULL);
|
||||||
|
|
||||||
return comp_multi_create_system_compositor(&c->base.base, upaf, sys_info, out_xsysc);
|
return comp_multi_create_system_compositor(&c->base.base, upaf, sys_info, true, out_xsysc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,18 @@ struct u_pacing_app_factory;
|
||||||
* through a "multi compositor") and that drives a single native compositor.
|
* through a "multi compositor") and that drives a single native compositor.
|
||||||
* Both the native compositor and the pacing factory is owned by the system
|
* Both the native compositor and the pacing factory is owned by the system
|
||||||
* compositor and destroyed by it.
|
* compositor and destroyed by it.
|
||||||
|
*
|
||||||
|
* @param xcn Native compositor that client are multi-plexed to.
|
||||||
|
* @param upaf App pacing factory, one pacer created per client.
|
||||||
|
* @param xsci Information to be exposed.
|
||||||
|
* @param do_warm_start Should we always submit a frame at startup.
|
||||||
|
* @param out_xsysc Created @ref xrt_system_compositor.
|
||||||
*/
|
*/
|
||||||
xrt_result_t
|
xrt_result_t
|
||||||
comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
|
comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
|
||||||
struct u_pacing_app_factory *upaf,
|
struct u_pacing_app_factory *upaf,
|
||||||
const struct xrt_system_compositor_info *xsci,
|
const struct xrt_system_compositor_info *xsci,
|
||||||
|
bool do_warm_start,
|
||||||
struct xrt_system_compositor **out_xsysc);
|
struct xrt_system_compositor **out_xsysc);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -642,6 +642,7 @@ xrt_result_t
|
||||||
comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
|
comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
|
||||||
struct u_pacing_app_factory *upaf,
|
struct u_pacing_app_factory *upaf,
|
||||||
const struct xrt_system_compositor_info *xsci,
|
const struct xrt_system_compositor_info *xsci,
|
||||||
|
bool do_warm_start,
|
||||||
struct xrt_system_compositor **out_xsysc)
|
struct xrt_system_compositor **out_xsysc)
|
||||||
{
|
{
|
||||||
struct multi_system_compositor *msc = U_TYPED_CALLOC(struct multi_system_compositor);
|
struct multi_system_compositor *msc = U_TYPED_CALLOC(struct multi_system_compositor);
|
||||||
|
@ -654,8 +655,8 @@ comp_multi_create_system_compositor(struct xrt_compositor_native *xcn,
|
||||||
msc->base.info = *xsci;
|
msc->base.info = *xsci;
|
||||||
msc->upaf = upaf;
|
msc->upaf = upaf;
|
||||||
msc->xcn = xcn;
|
msc->xcn = xcn;
|
||||||
msc->sessions.state = MULTI_SYSTEM_STATE_STOPPED;
|
|
||||||
msc->sessions.active_count = 0;
|
msc->sessions.active_count = 0;
|
||||||
|
msc->sessions.state = do_warm_start ? MULTI_SYSTEM_STATE_INIT_WARM_START : MULTI_SYSTEM_STATE_STOPPED;
|
||||||
|
|
||||||
os_mutex_init(&msc->list_and_timing_lock);
|
os_mutex_init(&msc->list_and_timing_lock);
|
||||||
|
|
||||||
|
|
|
@ -589,5 +589,5 @@ null_compositor_create_system(struct xrt_device *xdev, struct xrt_system_composi
|
||||||
xrt_result_t xret = u_pa_factory_create(&upaf);
|
xrt_result_t xret = u_pa_factory_create(&upaf);
|
||||||
assert(xret == XRT_SUCCESS && upaf != NULL);
|
assert(xret == XRT_SUCCESS && upaf != NULL);
|
||||||
|
|
||||||
return comp_multi_create_system_compositor(&c->base.base, upaf, &c->sys_info, out_xsysc);
|
return comp_multi_create_system_compositor(&c->base.base, upaf, &c->sys_info, false, out_xsysc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -604,5 +604,5 @@ sdl_compositor_create_system(struct sdl_program *sp, struct xrt_system_composito
|
||||||
xrt_result_t xret = u_pa_factory_create(&upaf);
|
xrt_result_t xret = u_pa_factory_create(&upaf);
|
||||||
assert(xret == XRT_SUCCESS && upaf != NULL);
|
assert(xret == XRT_SUCCESS && upaf != NULL);
|
||||||
|
|
||||||
return comp_multi_create_system_compositor(&sp->c.base.base, upaf, &sp->c.sys_info, out_xsysc);
|
return comp_multi_create_system_compositor(&sp->c.base.base, upaf, &sp->c.sys_info, false, out_xsysc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue