Monado OpenXR Runtime
android_ahardwarebuffer_allocator.h
Go to the documentation of this file.
1// Copyright 2020-2025, Collabora, Ltd.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief Header exposing factory function for AHardwareBuffer backed image
6 buffer allocator.
7 * @author Rylie Pavlik <rylie.pavlik@collabora.com>
8 * @author Simon Zeni <simon.zeni@collabora.com>
9 * @ingroup aux_android
10 */
11
12#pragma once
13
14#include "xrt/xrt_compositor.h"
15#include "xrt/xrt_handles.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#ifdef XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER
22
24android_ahardwarebuffer_allocator_create(void);
25
27ahardwarebuffer_image_allocate(const struct xrt_swapchain_create_info *xsci, xrt_graphics_buffer_handle_t *out_image);
28
29bool
30ahardwarebuffer_is_supported(uint64_t format, enum xrt_swapchain_usage_bits xbits);
31
32#endif // XRT_GRAPHICS_BUFFER_HANDLE_IS_AHARDWAREBUFFER
33
34#ifdef __cplusplus
35}
36#endif
xrt_swapchain_usage_bits
Usage of the swapchain images.
Definition: xrt_compositor.h:511
enum xrt_result xrt_result_t
Result type used across Monado.
Allocator for system native images, in general you do not need to free the images as they will be con...
Definition: xrt_compositor.h:2635
Swapchain creation info.
Definition: xrt_compositor.h:881
Header declaring XRT graphics interfaces.
Native handle types.
int xrt_graphics_buffer_handle_t
The type underlying buffers shared between compositor clients and the main compositor.
Definition: xrt_handles.h:246