pub unsafe extern "C" fn OH_NativeImage_SetDropBufferMode(
image: *mut OH_NativeImage,
isOpen: bool,
) -> i32native_image and api-17 only.Expand description
Set the rendering in drop buffer mode of the OH_NativeImage.
In this mode, most of the buffers produced by the producer will be discarded, and the latest buffer will be selected for rending.
This mode can not simultaneously guarantee high frame rate requirements.
This interface suggest be called after the OH_NativeImage_Create call immediately.
This interface will only take effect when used together with the OH_NativeImage_UpdateSurfaceImage.
The listener callback set through OH-NativeImage_SetOnFrameAvailableListener will not decrease due to the frame loss mode being set.
This interface is a non-thread-safe type interface.
Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeImage
§Arguments
-
image- Indicates the pointer to a OH_NativeImage instance. -
isOpen- Indicates the switch of drop buffer mode.
§Returns
- [
NATIVE_ERROR_OK] 0 - Success. [NATIVE_ERROR_INVALID_ARGUMENTS] 40001000 - image is NULL.
Available since API-level: 17
Version: 1.0