Monado OpenXR Runtime
comp_main_interface.h
Go to the documentation of this file.
1// Copyright 2019-2022, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Header for the main compositor interface.
6 * @author Jakob Bornecrantz <jakob@collabora.com>
7 * @ingroup comp_main
8 *
9 * Formerly a header for defining an XRT graphics provider.
10 */
11
12#pragma once
13
14#include "xrt/xrt_device.h"
15#include "xrt/xrt_compositor.h"
16
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24
25/*!
26 * Creates the main compositor, it doesn't return itself but instead wraps
27 * itself with a system compositor. The main compositor is a native compositor.
28 *
29 * @ingroup comp_main
30 * @relates xrt_system_compositor
31 *
32 * @param xdev The head device
33 * @param ctf A compositor target factory to force the output device, must remain valid for the lifetime of the
34 * compositor. If NULL, factory is automatically selected
35 * @param upaf A pacing app factory to customize the application pacer, compositor takes ownership.
36 * If NULL, a default factory is used
37 * @param out_xsysc The output compositor
38 */
41 const struct comp_target_factory *ctf,
42 struct u_pacing_app_factory *upaf,
43 struct xrt_system_compositor **out_xsysc);
44
45
46#ifdef __cplusplus
47}
48#endif
xrt_result_t comp_main_create_system_compositor(struct xrt_device *xdev, const struct comp_target_factory *ctf, struct u_pacing_app_factory *upaf, struct xrt_system_compositor **out_xsysc)
Creates the main compositor, it doesn't return itself but instead wraps itself with a system composit...
Definition: comp_compositor.c:1006
enum xrt_result xrt_result_t
Result type used across Monado.
A factory of targets.
Definition: comp_target.h:682
Small helper that creates a app pacers, allows timing information to be collected and controlled to a...
Definition: u_pacing.h:619
A single HMD or input device.
Definition: xrt_device.h:282
The system compositor handles composition for a system.
Definition: xrt_compositor.h:2427
Header declaring XRT graphics interfaces.
Header defining an xrt display or controller device.