From e30d7b264d3ff8b1d356b8e4bd0ac940512b8f26 Mon Sep 17 00:00:00 2001 From: Riccardo Zaglia Date: Wed, 5 Jan 2022 15:13:25 +0100 Subject: [PATCH] Add documentation for HardwareBuffer::as_ptr() Co-authored-by: Marijn Suijten --- ndk/src/hardware_buffer.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ndk/src/hardware_buffer.rs b/ndk/src/hardware_buffer.rs index e93c170e..aed71ef4 100644 --- a/ndk/src/hardware_buffer.rs +++ b/ndk/src/hardware_buffer.rs @@ -131,6 +131,11 @@ impl HardwareBuffer { Self { inner: ptr } } + /// Returns the underlying [`ffi::AHardwareBuffer`] pointer + /// + /// The pointer can be used to import this hardware buffer into a Vulkan memory object using [`VK_ANDROID_external_memory_android_hardware_buffer`]. + /// + /// [`VK_ANDROID_external_memory_android_hardware_buffer`]: https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_ANDROID_external_memory_android_hardware_buffer.html pub fn as_ptr(&self) -> *mut ffi::AHardwareBuffer { self.inner.as_ptr() }