Monado OpenXR Runtime
mock_compositor_swapchain Struct Reference

Mock implementation of xrt_swapchain_native. More...

#include <mock/mock_compositor.h>

Collaboration diagram for mock_compositor_swapchain:

Data Fields

struct xrt_swapchain_native base
 
uint32_t id
 A swapchain ID, assigned by create_swapchain/import_swapchain. More...
 
bool imported
 Set if this swapchain was created by import_swapchain. More...
 
xrt_swapchain_create_info info
 Populated by copying the create info passed to create_swapchain/import_swapchain. More...
 
xrt_graphics_buffer_handle_t handles [XRT_MAX_SWAPCHAIN_IMAGES]
 Native handles for images. More...
 
bool acquired [XRT_MAX_SWAPCHAIN_IMAGES]
 Modified by the default mock implementations of acquire_image and release_image. More...
 
bool waited [XRT_MAX_SWAPCHAIN_IMAGES]
 Modified by the default mock implementations of wait_image and release_image. More...
 
uint32_t next_to_acquire
 The image ID that will next be acquired. More...
 
struct mock_compositormc
 non-owning pointer to parent More...
 

Detailed Description

Mock implementation of xrt_swapchain_native.

Field Documentation

◆ acquired

bool mock_compositor_swapchain::acquired[XRT_MAX_SWAPCHAIN_IMAGES]

Modified by the default mock implementations of acquire_image and release_image.

◆ handles

xrt_graphics_buffer_handle_t mock_compositor_swapchain::handles[XRT_MAX_SWAPCHAIN_IMAGES]

Native handles for images.

Populated by the import_swapchain mock if not hooked. Will be released/unreferenced at destruction by default.

◆ id

uint32_t mock_compositor_swapchain::id

A swapchain ID, assigned by create_swapchain/import_swapchain.

Referenced by ipcproto.common.Call::__init__().

◆ imported

bool mock_compositor_swapchain::imported

Set if this swapchain was created by import_swapchain.

◆ info

xrt_swapchain_create_info mock_compositor_swapchain::info

Populated by copying the create info passed to create_swapchain/import_swapchain.

◆ mc

struct mock_compositor* mock_compositor_swapchain::mc

non-owning pointer to parent

◆ next_to_acquire

uint32_t mock_compositor_swapchain::next_to_acquire

The image ID that will next be acquired.

The default minimal mock implementation just increments this, modulo image count, regardless of acquire/wait/release status.

◆ waited

bool mock_compositor_swapchain::waited[XRT_MAX_SWAPCHAIN_IMAGES]

Modified by the default mock implementations of wait_image and release_image.


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