Skip to content

Commit

Permalink
Add documentation for HardwareBuffer::as_ptr()
Browse files Browse the repository at this point in the history
Co-authored-by: Marijn Suijten <[email protected]>
  • Loading branch information
zmerp and MarijnS95 authored Jan 5, 2022
1 parent a4bad4b commit 4d8ef35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ndk/src/hardware_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit 4d8ef35

Please sign in to comment.