Monado OpenXR Runtime
Loading...
Searching...
No Matches
comp_multi_interface.h
Go to the documentation of this file.
1// Copyright 2021, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Interface for the multi-client layer code.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @ingroup comp_main
8 */
9
10#pragma once
11
12#include "xrt/xrt_compositor.h"
13
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
20
21
22typedef xrt_result_t (*comp_multi_view_config_callback_func_t)(struct xrt_compositor_native *xcn,
23 enum xrt_view_type view_type,
24 struct xrt_view_config *out_view_config);
25
26/*!
27 * Create a "system compositor" that can handle multiple clients (each
28 * through a "multi compositor") and that drives a single native compositor.
29 * Both the native compositor and the pacing factory is owned by the system
30 * compositor and destroyed by it.
31 *
32 * @param xcn Native compositor that client are multi-plexed to.
33 * @param upaf App pacing factory, one pacer created per client.
34 * @param xsci Information to be exposed.
35 * @param do_warm_start Should we always submit a frame at startup.
36 * @param out_xsysc Created @ref xrt_system_compositor.
37 *
38 * @public @memberof multi_system_compositor
39 */
42 struct u_pacing_app_factory *upaf,
43 comp_multi_view_config_callback_func_t get_view_config_callback,
44 const struct xrt_system_compositor_info *xsci,
45 bool do_warm_start,
46 struct xrt_system_compositor **out_xsysc);
47
48
49#ifdef __cplusplus
50}
51#endif
xrt_result_t comp_multi_create_system_compositor(struct xrt_compositor_native *xcn, struct u_pacing_app_factory *upaf, comp_multi_view_config_callback_func_t get_view_config_callback, const struct xrt_system_compositor_info *xsci, bool do_warm_start, struct xrt_system_compositor **out_xsysc)
Definition comp_multi_system.c:823
enum xrt_result xrt_result_t
Result type used across Monado.
Small helper that creates a app pacers, allows timing information to be collected and controlled to a...
Definition u_pacing.h:619
Main compositor server interface.
Definition xrt_compositor.h:2260
Capabilities and information about the system compositor (and its wrapped native compositor,...
Definition xrt_compositor.h:2363
The system compositor handles composition for a system.
Definition xrt_compositor.h:2488
Definition xrt_compositor.h:2340
Header declaring XRT graphics interfaces.
xrt_view_type
View type to be rendered to by the compositor.
Definition xrt_defines.h:2407