pub unsafe extern "C" fn OH_NativeWindow_NativeWindowRequestBuffer(
window: *mut NativeWindow,
buffer: *mut *mut NativeWindowBuffer,
fenceFd: *mut i32,
) -> i32Available on crate feature
native_window only.Expand description
Requests a OHNativeWindowBuffer through a OHNativeWindow instance for content production.
Before calling this interface, you need to set the width and height of OHNativeWindow through SET_BUFFER_GEOMETRY.
This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowFlushBuffer, otherwise buffer will be exhausted.
When the fenceFd is used up, you need to close it.
This interface is a non-thread-safe type interface.
Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeWindow
§Arguments
-
window- Indicates the pointer to a OHNativeWindow instance. -
buffer- Indicates the double pointer to a OHNativeWindowBuffer instance. -
fenceFd- Indicates the pointer to a file descriptor handle.
§Returns
- Returns an error code, 0 is success, otherwise, failed.
Available since API-level: 8
Version: 1.0