From 29a2fd78c47bde7b9657d57b5ae8cf63a68e7e47 Mon Sep 17 00:00:00 2001 From: lin-jianwu Date: Sat, 18 Nov 2023 21:59:49 +0800 Subject: [PATCH 1/3] add graphic capi comment Signed-off-by: lin-jianwu --- graphic/graphic_2d/native_window/external_window.h | 1 + 1 file changed, 1 insertion(+) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index b076a9106c2..7f9c6d88e21 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -43,6 +43,7 @@ #ifdef __cplusplus extern "C" { #endif +typedef struct OH_NativeBuffer OH_NativeBuffer; /** * @brief native window. -- Gitee From bbd44e4e06ebaef8ea4440131ce5176d6d8a5923 Mon Sep 17 00:00:00 2001 From: lin-jianwu Date: Sun, 19 Nov 2023 14:28:11 +0800 Subject: [PATCH 2/3] add graphic capi comment Signed-off-by: lin-jianwu --- graphic/graphic_2d/native_buffer/libnative_buffer.ndk.json | 3 ++- graphic/graphic_2d/native_buffer/native_buffer.h | 2 +- graphic/graphic_2d/native_image/libnative_image.ndk.json | 3 +++ graphic/graphic_2d/native_window/libnative_window.ndk.json | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_buffer/libnative_buffer.ndk.json b/graphic/graphic_2d/native_buffer/libnative_buffer.ndk.json index 722ba7b087b..f9328400bf3 100644 --- a/graphic/graphic_2d/native_buffer/libnative_buffer.ndk.json +++ b/graphic/graphic_2d/native_buffer/libnative_buffer.ndk.json @@ -5,5 +5,6 @@ { "name": "OH_NativeBuffer_GetConfig" }, { "name": "OH_NativeBuffer_Map" }, { "name": "OH_NativeBuffer_Unmap" }, - { "name": "OH_NativeBuffer_GetSeqNum" } + { "name": "OH_NativeBuffer_GetSeqNum" }, + { "name": "OH_NativeBuffer_SetColorSpace" } ] \ No newline at end of file diff --git a/graphic/graphic_2d/native_buffer/native_buffer.h b/graphic/graphic_2d/native_buffer/native_buffer.h index 612b996f590..4c8f1971ecd 100644 --- a/graphic/graphic_2d/native_buffer/native_buffer.h +++ b/graphic/graphic_2d/native_buffer/native_buffer.h @@ -267,7 +267,7 @@ uint32_t OH_NativeBuffer_GetSeqNum(OH_NativeBuffer *buffer); * @syscap SystemCapability.Graphic.Graphic2D.NativeBuffer * @param buffer Indicates the pointer to a OH_NativeBuffer instance. * @param colorSpace Indicates the color space of native buffer, see OH_NativeBuffer_ColorSpace. - * @return Returns the sequence number, which is unique for each OH_NativeBuffer. + * @return Returns an error code, 0 is success, otherwise, failed. * @since 11 * @version 1.0 */ diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json index 537d83d3e5a..45bb3093e47 100644 --- a/graphic/graphic_2d/native_image/libnative_image.ndk.json +++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json @@ -6,5 +6,8 @@ { "name": "OH_NativeImage_UpdateSurfaceImage" }, { "name": "OH_NativeImage_GetTimestamp" }, { "name": "OH_NativeImage_GetTransformMatrix" }, + { "name": "OH_NativeImage_GetSurfaceId" }, + { "name": "OH_NativeImage_SetOnFrameAvailableListener" }, + { "name": "OH_NativeImage_UnsetOnFrameAvailableListener" }, { "name": "OH_NativeImage_Destroy" } ] \ No newline at end of file diff --git a/graphic/graphic_2d/native_window/libnative_window.ndk.json b/graphic/graphic_2d/native_window/libnative_window.ndk.json index 95e138ee2dd..12184c91d51 100644 --- a/graphic/graphic_2d/native_window/libnative_window.ndk.json +++ b/graphic/graphic_2d/native_window/libnative_window.ndk.json @@ -2,9 +2,11 @@ { "name": "OH_NativeWindow_CreateNativeWindow" }, { "name": "OH_NativeWindow_DestroyNativeWindow" }, { "name": "OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer" }, + { "name": "OH_NativeWindow_CreateNativeWindowBufferFromNativeBuffer" }, { "name": "OH_NativeWindow_DestroyNativeWindowBuffer" }, { "name": "OH_NativeWindow_NativeWindowRequestBuffer" }, { "name": "OH_NativeWindow_NativeWindowFlushBuffer" }, + { "name": "OH_NativeWindow_GetLastFlushedBuffer" }, { "name": "OH_NativeWindow_NativeWindowAbortBuffer" }, { "name": "OH_NativeWindow_NativeWindowHandleOpt" }, { "name": "OH_NativeWindow_GetBufferHandleFromNative" }, -- Gitee From 83608fadf912d5b5879f821b7f352ecb8b74ce17 Mon Sep 17 00:00:00 2001 From: lin-jianwu Date: Mon, 20 Nov 2023 18:31:19 +0800 Subject: [PATCH 3/3] add graphic capi comment Signed-off-by: lin-jianwu --- graphic/graphic_2d/native_window/external_window.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h index 7f9c6d88e21..1bcc71f4a77 100644 --- a/graphic/graphic_2d/native_window/external_window.h +++ b/graphic/graphic_2d/native_window/external_window.h @@ -356,12 +356,12 @@ int32_t OH_NativeWindow_NativeWindowFlushBuffer(OHNativeWindow *window, OHNative * * @syscap SystemCapability.Graphic.Graphic2D.NativeWindow * @param window Indicates the pointer to a OHNativeWindow instance. - * @param buffer Indicates the pointer to a OHNativeWindowBuffer instance. + * @param buffer Indicates the pointer to a OHNativeWindowBuffer pointer. * @return Returns an error code, 0 is success, otherwise, failed. * @since 11 * @version 1.0 */ -int32_t OH_NativeWindow_GetLastFlushedBuffer(OHNativeWindow *window, OHNativeWindowBuffer *buffer); +int32_t OH_NativeWindow_GetLastFlushedBuffer(OHNativeWindow *window, OHNativeWindowBuffer **buffer); /** * @brief Returns the OHNativeWindowBuffer to the buffer queue through a OHNativeWindow instance, without filling in any content. The OHNativeWindowBuffer can be used for another request. -- Gitee