Skip to main content

OH_NativeWindow_GetLastFlushedBufferV2

Function OH_NativeWindow_GetLastFlushedBufferV2 

Source
pub unsafe extern "C" fn OH_NativeWindow_GetLastFlushedBufferV2(
    window: *mut OHNativeWindow,
    buffer: *mut *mut OHNativeWindowBuffer,
    fenceFd: *mut c_int,
    matrix: *mut f32,
) -> i32
Expand description

@brief Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.\n When the fenceFd is used up, you need to close it.\n This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference, otherwise memory leaks will occur.\n This interface is a non-thread-safe type interface.\n

@syscap SystemCapability.Graphic.Graphic2D.NativeWindow @param window Indicates the pointer to an OHNativeWindow instance. @param buffer Indicates the pointer to an OHNativeWindowBuffer pointer. @param fenceFd Indicates the pointer to a file descriptor handle. @param matrix Indicates the retrieved 4*4 transform matrix. @return {@link NATIVE_ERROR_OK} 0 - Success. {@link NATIVE_ERROR_INVALID_ARGUMENTS} 40001000 - window is NULL or buffer is NULL or fenceFd is NULL. {@link NATIVE_ERROR_BUFFER_STATE_INVALID} 41207000 - buffer state is wrong. @since 12 @version 1.0