!1601 buffer按时间戳上屏

Merge pull request !1601 from 李辉/pts1026
This commit is contained in:
openharmony_ci 2024-10-28 08:07:41 +00:00 committed by Gitee
commit 506bd22161
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 78 additions and 64 deletions

View File

@ -290,7 +290,7 @@ typedef struct {
* A new <b>OH_NativeBuffer</b> instance is created each time this function is called.\n
* This interface needs to be used in conjunction with <b>OH_NativeBuffer_Unreference<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param config Indicates the pointer to a <b>BufferRequestConfig</b> instance.
@ -305,7 +305,7 @@ OH_NativeBuffer* OH_NativeBuffer_Alloc(const OH_NativeBuffer_Config* config);
* @brief Adds the reference count of a OH_NativeBuffer.\n
* This interface needs to be used in conjunction with <b>OH_NativeBuffer_Unreference<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -318,7 +318,7 @@ int32_t OH_NativeBuffer_Reference(OH_NativeBuffer *buffer);
/**
* @brief Decreases the reference count of a OH_NativeBuffer and, when the reference count reaches 0,
* destroys this OH_NativeBuffer.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -330,7 +330,7 @@ int32_t OH_NativeBuffer_Unreference(OH_NativeBuffer *buffer);
/**
* @brief Return a config of the OH_NativeBuffer in the passed OHNativeBufferConfig struct.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -344,7 +344,7 @@ void OH_NativeBuffer_GetConfig(OH_NativeBuffer *buffer, OH_NativeBuffer_Config*
/**
* @brief Provide direct cpu access to the OH_NativeBuffer in the process's address space.\n
* This interface needs to be used in conjunction with <b>OH_NativeBuffer_Unmap<\b>.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -358,7 +358,7 @@ int32_t OH_NativeBuffer_Map(OH_NativeBuffer *buffer, void **virAddr);
/**
* @brief Remove direct cpu access ability of the OH_NativeBuffer in the process's address space.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -370,7 +370,7 @@ int32_t OH_NativeBuffer_Unmap(OH_NativeBuffer *buffer);
/**
* @brief Get the systen wide unique sequence number of the OH_NativeBuffer.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -382,7 +382,7 @@ uint32_t OH_NativeBuffer_GetSeqNum(OH_NativeBuffer *buffer);
/**
* @brief Provide direct cpu access to the potentially multi-plannar OH_NativeBuffer in the process's address space.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -396,7 +396,7 @@ int32_t OH_NativeBuffer_MapPlanes(OH_NativeBuffer *buffer, void **virAddr, OH_Na
/**
* @brief Converts an <b>OHNativeWindowBuffer</b> instance to an <b>OH_NativeBuffer</b>.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param nativeWindowBuffer Indicates the pointer to a <b>OHNativeWindowBuffer</b> instance.
@ -409,7 +409,7 @@ int32_t OH_NativeBuffer_FromNativeWindowBuffer(OHNativeWindowBuffer *nativeWindo
/**
* @brief Set the color space of the OH_NativeBuffer.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -422,7 +422,7 @@ int32_t OH_NativeBuffer_SetColorSpace(OH_NativeBuffer *buffer, OH_NativeBuffer_C
/**
* @brief Get the color space of the OH_NativeBuffer.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -437,7 +437,7 @@ int32_t OH_NativeBuffer_GetColorSpace(OH_NativeBuffer *buffer, OH_NativeBuffer_C
/**
* @brief Set the metadata type of the OH_NativeBuffer.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.
@ -456,7 +456,7 @@ int32_t OH_NativeBuffer_SetMetadataValue(OH_NativeBuffer *buffer, OH_NativeBuffe
/**
* @brief Set the metadata type of the OH_NativeBuffer.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer
* @param buffer Indicates the pointer to a <b>OH_NativeBuffer</b> instance.

View File

@ -81,7 +81,7 @@ typedef struct OH_OnFrameAvailableListener {
* @brief Create a <b>OH_NativeImage</b> related to an Opengl ES texture and target. \n
* This interface needs to be used in conjunction with <b>OH_NativeImage_Destroy<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param textureId Indicates the id of the Opengl ES texture which the native image attached to.
@ -95,7 +95,7 @@ OH_NativeImage* OH_NativeImage_Create(uint32_t textureId, uint32_t textureTarget
/**
* @brief Acquire the OHNativeWindow for the OH_NativeImage.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -108,7 +108,7 @@ OHNativeWindow* OH_NativeImage_AcquireNativeWindow(OH_NativeImage* image);
/**
* @brief Attach the OH_NativeImage to Opengl ES context, and the Opengl ES texture is bound to the \n
* GL_TEXTURE_EXTERNAL_OES, which will update by the OH_NativeImage.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -121,7 +121,7 @@ int32_t OH_NativeImage_AttachContext(OH_NativeImage* image, uint32_t textureId);
/**
* @brief Detach the OH_NativeImage from the Opengl ES context.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -136,7 +136,7 @@ int32_t OH_NativeImage_DetachContext(OH_NativeImage* image);
* @brief Update the related Opengl ES texture with the OH_NativeImage acquired buffer.\n
* This interface needs to be called in the Opengl ES context thread.\n
* This interface needs to be called after receiving the <b>OH_OnFrameAvailableListener<\b> callback.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -148,7 +148,7 @@ int32_t OH_NativeImage_UpdateSurfaceImage(OH_NativeImage* image);
/**
* @brief Get the timestamp of the texture image set by the most recent call to OH_NativeImage_UpdateSurfaceImage.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -175,7 +175,7 @@ int32_t OH_NativeImage_GetTransformMatrix(OH_NativeImage* image, float matrix[16
/**
* @brief Return the native image's surface id.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -189,7 +189,7 @@ int32_t OH_NativeImage_GetSurfaceId(OH_NativeImage* image, uint64_t* surfaceId);
/**
* @brief Set the frame available callback.\n
* Not allow calling other interfaces in the callback function.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -202,7 +202,7 @@ int32_t OH_NativeImage_SetOnFrameAvailableListener(OH_NativeImage* image, OH_OnF
/**
* @brief Unset the frame available callback.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -215,7 +215,7 @@ int32_t OH_NativeImage_UnsetOnFrameAvailableListener(OH_NativeImage* image);
/**
* @brief Destroy the <b>OH_NativeImage</b> created by OH_NativeImage_Create, and the pointer to
* <b>OH_NativeImage</b> will be null after this operation.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> pointer.
@ -227,7 +227,7 @@ void OH_NativeImage_Destroy(OH_NativeImage** image);
/**
* @brief Obtains the transform matrix of the texture image by producer transform type.\n
* The matrix will not be update until <b>OH_NativeImage_UpdateSurfaceImage<\b> is called.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -250,7 +250,7 @@ int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[
* This interface needs to be used in conjunction with <b>OH_NativeImage_ReleaseNativeWindowBuffer<\b>,
* otherwise memory leaks will occur.\n
* When the fenceFd is used up, you need to close it.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -269,7 +269,7 @@ int32_t OH_NativeImage_AcquireNativeWindowBuffer(OH_NativeImage* image,
* @brief Release the <b>OHNativeWindowBuffer</b> to the buffer queue through an
* <b>OH_NativeImage</b> instance for reuse.\n
* The fenceFd will be close by system.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -290,7 +290,7 @@ int32_t OH_NativeImage_ReleaseNativeWindowBuffer(OH_NativeImage* image,
* This method can not be used at the same time with <b>OH_NativeImage_UpdateSurfaceImage</b>.\n
* This interface needs to be used in conjunction with <b>OH_NativeImage_Destroy<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @return Returns the pointer to the <b>OH_NativeImage</b> instance created if the operation is successful, \n
@ -298,11 +298,11 @@ int32_t OH_NativeImage_ReleaseNativeWindowBuffer(OH_NativeImage* image,
* @since 12
* @version 1.0
*/
OH_NativeImage* OH_ConsumerSurface_Create();
OH_NativeImage* OH_ConsumerSurface_Create(void);
/**
* @brief Set the default usage of the <b>OH_NativeImage</b>.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.
@ -316,7 +316,7 @@ int32_t OH_ConsumerSurface_SetDefaultUsage(OH_NativeImage* image, uint64_t usage
/**
* @brief Set the default size of the <b>OH_NativeImage</b>.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeImage
* @param image Indicates the pointer to a <b>OH_NativeImage</b> instance.

View File

@ -117,25 +117,25 @@ typedef enum NativeWindowOperation {
/**
* get native window buffer format,
* variable parameter in function is
* [out] int32_t *format
* [out] int32_t *format, the enumeration value refers to {@link OH_NativeBuffer_Format}.
*/
GET_FORMAT,
/**
* set native window buffer format,
* variable parameter in function is
* [in] int32_t format
* [in] int32_t format, the enumeration value refers to {@link OH_NativeBuffer_Format}.
*/
SET_FORMAT,
/**
* get native window buffer usage,
* variable parameter in function is
* [out] uint64_t *usage.
* [out] uint64_t *usage, the enumeration value refers to {@link OH_NativeBuffer_Usage}.
*/
GET_USAGE,
/**
* set native window buffer usage,
* variable parameter in function is
* [in] uint64_t usage.
* [in] uint64_t usage, the enumeration value refers to {@link OH_NativeBuffer_Usage}.
*/
SET_USAGE,
/**
@ -177,25 +177,25 @@ typedef enum NativeWindowOperation {
/**
* set native window buffer colorGamut,
* variable parameter in function is
* [in] int32_t colorGamut.
* [in] int32_t colorGamut, the enumeration value refers to {@link OH_NativeBuffer_ColorGamut}.
*/
SET_COLOR_GAMUT,
/**
* get native window buffer colorGamut,
* variable parameter in function is
* [out int32_t *colorGamut].
* [out int32_t *colorGamut], the enumeration value refers to {@link OH_NativeBuffer_ColorGamut}.
*/
GET_COLOR_GAMUT,
/**
* set native window buffer transform,
* variable parameter in function is
* [in] int32_t transform.
* [in] int32_t transform, the enumeration value refers to {@link OH_NativeBuffer_TransformType}.
*/
SET_TRANSFORM,
/**
* get native window buffer transform,
* variable parameter in function is
* [out] int32_t *transform.
* [out] int32_t *transform, the enumeration value refers to {@link OH_NativeBuffer_TransformType}.
*/
GET_TRANSFORM,
/**
@ -214,14 +214,14 @@ typedef enum NativeWindowOperation {
/**
* set surface source type,
* variable parameter in function is
* [in] int32_t sourceType.
* [in] int32_t sourceType, the enumeration value refers to {@link OHSurfaceSource}.
* @since 12
*/
SET_SOURCE_TYPE,
/**
* get surface source type,
* variable parameter in function is
* [out] int32_t *sourceType.
* [out] int32_t *sourceType, the enumeration value refers to {@link OHSurfaceSource}.
* @since 12
*/
GET_SOURCE_TYPE,
@ -253,6 +253,20 @@ typedef enum NativeWindowOperation {
* @since 12
*/
SET_SDR_WHITE_POINT_BRIGHTNESS,
/**
* Set native window buffer desiredPresentTimestamp, indicates the desired time to present the buffer.\n
* Which should be generated by std::chrono::steady_clock in nanoseconds.\n
* It is only effective when RenderService is the consumer.\n
* The buffer will wait until desiredPresentTimestamp is reached before being consumed and displayed.\n
* If multiple buffers reach desiredPresentTimestamp, the earlier buffer will be dropped.\n
* This Operation should be called before calling <b>OH_NativeWindow_NativeWindowFlushBuffer</b>.\n
* If desiredPresentTimestamp is greater than 1 second of the consumer-provided timestamp,
* the desiredPresentTimestamp will be ignored.\n
* Variable parameter in function is
* [in] int64_t desiredPresentTimestamp.
* @since 14
*/
SET_DESIRED_PRESENT_TIMESTAMP = 24,
} NativeWindowOperation;
/**
@ -401,7 +415,7 @@ OHNativeWindow* OH_NativeWindow_CreateNativeWindow(void* pSurface);
/**
* @brief Decreases the reference count of a <b>OHNativeWindow</b> instance by 1,
* and when the reference count reaches 0, destroys the instance.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -428,7 +442,7 @@ OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer(
* A new <b>OHNativeWindowBuffer</b> instance is created each time this function is called.\n
* This interface needs to be used in conjunction with <b>OH_NativeWindow_DestroyNativeWindowBuffer<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param nativeBuffer Indicates the pointer to a native buffer. The type is <b>OH_NativeBuffer*</b>.
@ -441,7 +455,7 @@ OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromNativeBuffer(O
/**
* @brief Decreases the reference count of a <b>OHNativeWindowBuffer</b> instance by 1 and,
* when the reference count reaches 0, destroys the instance.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param buffer Indicates the pointer to a <b>OHNativeWindowBuffer</b> instance.
@ -457,7 +471,7 @@ void OH_NativeWindow_DestroyNativeWindowBuffer(OHNativeWindowBuffer* buffer);
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeWindowFlushBuffer<\b>,
* otherwise buffer will be exhausted.\n
* When the fenceFd is used up, you need to close it.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -474,7 +488,7 @@ int32_t OH_NativeWindow_NativeWindowRequestBuffer(OHNativeWindow *window,
* @brief Flushes the <b>OHNativeWindowBuffer</b> filled with the content to the buffer queue
* through a <b>OHNativeWindow</b> instance for content consumption.\n
* The fenceFd will be close by system.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -508,7 +522,7 @@ int32_t OH_NativeWindow_GetLastFlushedBuffer(OHNativeWindow *window, OHNativeWin
/**
* @brief Returns the <b>OHNativeWindowBuffer</b> to the buffer queue through a <b>OHNativeWindow</b> instance,
* without filling in any content. The <b>OHNativeWindowBuffer</b> can be used for another request.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -521,7 +535,7 @@ int32_t OH_NativeWindow_NativeWindowAbortBuffer(OHNativeWindow *window, OHNative
/**
* @brief Sets or obtains the attributes of a native window, including the width, height, and content format.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -535,7 +549,7 @@ int32_t OH_NativeWindow_NativeWindowHandleOpt(OHNativeWindow *window, int code,
/**
* @brief Obtains the pointer to a <b>BufferHandle</b> of a <b>OHNativeWindowBuffer</b> instance.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param buffer Indicates the pointer to a <b>OHNativeWindowBuffer</b> instance.
@ -549,7 +563,7 @@ BufferHandle *OH_NativeWindow_GetBufferHandleFromNative(OHNativeWindowBuffer *bu
* @brief Adds the reference count of a native object.\n
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeObjectUnreference<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param obj Indicates the pointer to a <b>OHNativeWindow</b> or <b>OHNativeWindowBuffer</b> instance.
@ -562,7 +576,7 @@ int32_t OH_NativeWindow_NativeObjectReference(void *obj);
/**
* @brief Decreases the reference count of a native object and,
* when the reference count reaches 0, destroys this object.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param obj Indicates the pointer to a <b>OHNativeWindow</b> or <b>OHNativeWindowBuffer</b> instance.
@ -574,7 +588,7 @@ int32_t OH_NativeWindow_NativeObjectUnreference(void *obj);
/**
* @brief Obtains the magic ID of a native object.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param obj Indicates the pointer to a <b>OHNativeWindow</b> or <b>OHNativeWindowBuffer</b> instance.
@ -649,7 +663,7 @@ int32_t OH_NativeWindow_NativeWindowSetTunnelHandle(OHNativeWindow *window, cons
* @brief Attach a buffer to an <b>OHNativeWindow</b> instance.\n
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeWindowDetachBuffer<\b>,
* otherwise buffer management will be chaotic.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -662,7 +676,7 @@ int32_t OH_NativeWindow_NativeWindowAttachBuffer(OHNativeWindow *window, OHNativ
/**
* @brief Detach a buffer from an <b>OHNativeWindow</b> instance.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -675,7 +689,7 @@ int32_t OH_NativeWindow_NativeWindowDetachBuffer(OHNativeWindow *window, OHNativ
/**
* @brief Get surfaceId from native window.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -695,7 +709,7 @@ int32_t OH_NativeWindow_GetSurfaceId(OHNativeWindow *window, uint64_t *surfaceId
* <b>OH_NativeWindow_NativeObjectUnreference<\b>.\n
* If the surface obtained through surfaceId is created in this process, the surface cannot be obtained
* across processes.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param surfaceId Indicates the surfaceId to a surface.
@ -708,7 +722,7 @@ int32_t OH_NativeWindow_CreateNativeWindowFromSurfaceId(uint64_t surfaceId, OHNa
/**
* @brief Sets scalingMode of a native window.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -721,7 +735,7 @@ int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHS
/**
* @brief Set native window buffer hold.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -732,7 +746,7 @@ void OH_NativeWindow_SetBufferHold(OHNativeWindow *window);
/**
* @brief Write an OHNativeWindow to an OHIPCParcel.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -746,7 +760,7 @@ int32_t OH_NativeWindow_WriteToParcel(OHNativeWindow *window, OHIPCParcel *parce
/**
* @brief Read an OHNativeWindow from an OHIPCParcel.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param parcel Indicates the pointer to an <b>OHIPCParcel</b> instance.
@ -763,7 +777,7 @@ int32_t OH_NativeWindow_ReadFromParcel(OHIPCParcel *parcel, OHNativeWindow **win
* When the fenceFd is used up, you need to close it.\n
* This interface needs to be used in conjunction with <b>OH_NativeWindow_NativeObjectUnreference<\b>,
* otherwise memory leaks will occur.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to an <b>OHNativeWindow</b> instance.
@ -781,7 +795,7 @@ int32_t OH_NativeWindow_GetLastFlushedBufferV2(OHNativeWindow *window, OHNativeW
int *fenceFd, float matrix[16]);
/**
* @brief Set the color space of the native window.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -796,7 +810,7 @@ int32_t OH_NativeWindow_SetColorSpace(OHNativeWindow *window, OH_NativeBuffer_Co
/**
* @brief Get the color space of the native window.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -811,7 +825,7 @@ int32_t OH_NativeWindow_GetColorSpace(OHNativeWindow *window, OH_NativeBuffer_Co
/**
* @brief Set the metadata type of the native window.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.
@ -830,7 +844,7 @@ int32_t OH_NativeWindow_SetMetadataValue(OHNativeWindow *window, OH_NativeBuffer
/**
* @brief Set the metadata type of the native window.\n
* This interface dose not support concurrency.\n
* This interface is a non-thread-safe type interface.\n
*
* @syscap SystemCapability.Graphic.Graphic2D.NativeWindow
* @param window Indicates the pointer to a <b>OHNativeWindow</b> instance.