Monado OpenXR Runtime
xrt_system_compositor Struct Reference

The system compositor handles composition for a system. More...

#include <xrt/xrt_compositor.h>

Inheritance diagram for xrt_system_compositor:
Collaboration diagram for xrt_system_compositor:

Public Member Functions

static xrt_result_t xrt_syscomp_set_state (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, bool visible, bool focused)
 Sets the state of the compositor, generating any events to the client if the state is actually changed. More...
 
static xrt_result_t xrt_syscomp_set_z_order (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, int64_t z_order)
 Set the rendering Z order for rendering, visible has higher priority then z_order but is still saved until visible again. More...
 
static xrt_result_t xrt_syscomp_set_main_app_visibility (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, bool visible)
 Tell this client/session if the main application is visible or not. More...
 
static xrt_result_t xrt_syscomp_notify_loss_pending (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, uint64_t loss_time_ns)
 Notify this client/session if the compositor is going to lose the ability of rendering. More...
 
static xrt_result_t xrt_syscomp_notify_lost (struct xrt_system_compositor *xsc, struct xrt_compositor *xc)
 Notify this client/session if the compositor lost the ability of rendering. More...
 
static xrt_result_t xrt_syscomp_notify_display_refresh_changed (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, float from_display_refresh_rate_hz, float to_display_refresh_rate_hz)
 Notify this client/session if the display refresh rate has been changed. More...
 
static xrt_result_t xrt_syscomp_create_native_compositor (struct xrt_system_compositor *xsc, const struct xrt_session_info *xsi, struct xrt_session_event_sink *xses, struct xrt_compositor_native **out_xcn)
 Create a new native compositor. More...
 
static void xrt_syscomp_destroy (struct xrt_system_compositor **xsc_ptr)
 Teardown the system compositor. More...
 

Data Fields

struct xrt_multi_compositor_controlxmcc
 An optional aspect/additional interface, providing multi-app control. More...
 
struct xrt_system_compositor_info info
 Info regarding the system. More...
 
xrt_result_t(* create_native_compositor )(struct xrt_system_compositor *xsc, const struct xrt_session_info *xsi, struct xrt_session_event_sink *xses, struct xrt_compositor_native **out_xcn)
 Create a new native compositor. More...
 
void(* destroy )(struct xrt_system_compositor *xsc)
 Teardown the system compositor. More...
 

Related Functions

(Note that these are not member functions.)

xrt_result_t comp_main_create_system_compositor (struct xrt_device *xdev, const struct comp_target_factory *ctf, struct xrt_system_compositor **out_xsysc)
 Creates the main compositor, it doesn't return itself but instead wraps itself with a system compositor. More...
 

Detailed Description

The system compositor handles composition for a system.

It is not itself a "compositor" (as in xrt_compositor), but it can create/own compositors.

This is a long lived object: it has the same life time as an XrSystemID.

Field Documentation

◆ create_native_compositor

xrt_result_t(* xrt_system_compositor::create_native_compositor) (struct xrt_system_compositor *xsc, const struct xrt_session_info *xsi, struct xrt_session_event_sink *xses, struct xrt_compositor_native **out_xcn)

Create a new native compositor.

This signals that you want to start XR, and as such implicitly brings up a new session. Does not "call" xrBeginSession.

Some system compositors might only support one xrt_compositor active at a time, will return XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED if this is the case.

In a multi-session capable system compositor, this may return a "proxy" for feeding a single client's layers to a compositor or a layer merging mechanism, rather than a raw native compositor (not wrapping or forwarding) directly.

Referenced by multi_system_compositor::comp_multi_create_system_compositor(), and xrt_syscomp_create_native_compositor().

◆ destroy

void(* xrt_system_compositor::destroy) (struct xrt_system_compositor *xsc)

Teardown the system compositor.

The state tracker must make sure that no compositors are alive.

Referenced by xrt_syscomp_destroy().

◆ info

struct xrt_system_compositor_info xrt_system_compositor::info

Info regarding the system.

Referenced by oxr_d3d_get_requirements().

◆ xmcc

struct xrt_multi_compositor_control* xrt_system_compositor::xmcc

An optional aspect/additional interface, providing multi-app control.

Populated if this system compositor supports multi client controls.

Referenced by xrt_syscomp_notify_display_refresh_changed(), xrt_syscomp_notify_loss_pending(), xrt_syscomp_notify_lost(), xrt_syscomp_set_main_app_visibility(), xrt_syscomp_set_state(), and xrt_syscomp_set_z_order().


The documentation for this struct was generated from the following files: