The open source OpenXR runtime
at prediction-2 48 lines 1.4 kB view raw
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 17struct comp_target_factory; 18struct u_pacing_app_factory; 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 */ 39xrt_result_t 40comp_main_create_system_compositor(struct xrt_device *xdev, 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