The open source OpenXR runtime
at prediction-2 36 lines 880 B view raw
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 23struct xrt_image_native_allocator * 24android_ahardwarebuffer_allocator_create(void); 25 26xrt_result_t 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