Function gvr_sys::gvr_frame_get_hardware_buffer
[−]
[src]
pub unsafe extern "C" fn gvr_frame_get_hardware_buffer(
frame: *const gvr_frame,
index: i32
) -> *mut AHardwareBuffer
Gets the hardware buffer backing the specified frame buffer.
Hardware buffers (Android NDK type AHardwareBuffer) are used to back frames if asynchronous reprojection is enabled and GVR_FEATURE_HARDWARE_BUFFERS is supported (currently on Android O and later Android versions). See the documentation for the feature enum value for further information.
There is no need to acquire or release the AHardwareBuffer. The swap chain maintains a reference to it while the frame is acquired.
@param frame The gvr_frame from which to obtain the buffer. @param index Index of the pixel buffer. @return Pointer to AHardwareBuffer backing the frame's pixel buffer where available, or NULL otherwise.