diff --git a/graphic/graphic_2d/native_image/libnative_image.ndk.json b/graphic/graphic_2d/native_image/libnative_image.ndk.json
index 45bb3093e470bc024fe79cce9a962fa8e6ed2d69..63f539f2c73d422bb2e282980ec4cb49e17f7252 100644
--- a/graphic/graphic_2d/native_image/libnative_image.ndk.json
+++ b/graphic/graphic_2d/native_image/libnative_image.ndk.json
@@ -9,5 +9,6 @@
{ "name": "OH_NativeImage_GetSurfaceId" },
{ "name": "OH_NativeImage_SetOnFrameAvailableListener" },
{ "name": "OH_NativeImage_UnsetOnFrameAvailableListener" },
- { "name": "OH_NativeImage_Destroy" }
+ { "name": "OH_NativeImage_Destroy" },
+ { "name": "OH_NativeImage_GetTransformMatrixV2" },
]
\ No newline at end of file
diff --git a/graphic/graphic_2d/native_image/native_image.h b/graphic/graphic_2d/native_image/native_image.h
index b344a332cc9e33aa21b19bcfebc898b2363433f9..77577ff3f6d342e5cee89f6568192dff2a487b08 100644
--- a/graphic/graphic_2d/native_image/native_image.h
+++ b/graphic/graphic_2d/native_image/native_image.h
@@ -201,6 +201,19 @@ int32_t OH_NativeImage_UnsetOnFrameAvailableListener(OH_NativeImage* image);
*/
void OH_NativeImage_Destroy(OH_NativeImage** image);
+/**
+ * @brief Obtains the transform matrix of the texture image by producer transform type.\n
+ *
+ * @syscap SystemCapability.Graphic.Graphic2D.NativeImage
+ * @param image Indicates the pointer to a OH_NativeImage instance.
+ * @param matrix Indicates the retrieved 4*4 transform matrix .
+ * @return 0 - Success.
+ * 40001000 - image is NULL.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_NativeImage_GetTransformMatrixV2(OH_NativeImage* image, float matrix[16]);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_window/external_window.h b/graphic/graphic_2d/native_window/external_window.h
index db6607b5f7f0719036c85dcc6a83c5eb309fa3cd..f851a3fee9bbd0af38687a9459e741223257a671 100644
--- a/graphic/graphic_2d/native_window/external_window.h
+++ b/graphic/graphic_2d/native_window/external_window.h
@@ -658,6 +658,24 @@ int32_t OH_NativeWindow_NativeWindowSetScalingModeV2(OHNativeWindow *window, OHS
* @version 1.0
*/
void OH_NativeWindow_SetBufferHold(OHNativeWindow *window);
+
+/**
+ * @brief Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.
+ *
+ * @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 0 - Success.
+ * 40001000 - window is NULL or buffer is NULL or fenceFd is NULL.
+ * 41207000 - buffer state is wrong.
+ * @since 12
+ * @version 1.0
+ */
+int32_t OH_NativeWindow_GetLastFlushedBufferV2(OHNativeWindow *window, OHNativeWindowBuffer **buffer,
+ int *fenceFd, float matrix[16]);
+
#ifdef __cplusplus
}
#endif
diff --git a/graphic/graphic_2d/native_window/libnative_window.ndk.json b/graphic/graphic_2d/native_window/libnative_window.ndk.json
index 668400ec62fe74cf45b78661410af4a7f0da5d9c..5707571dabdfb2206e27af8c288131ac6a4f1f5e 100644
--- a/graphic/graphic_2d/native_window/libnative_window.ndk.json
+++ b/graphic/graphic_2d/native_window/libnative_window.ndk.json
@@ -25,5 +25,6 @@
{ "name": "OH_NativeWindow_CreateNativeWindowFromSurfaceId"},
{ "name": "OH_NativeWindow_NativeWindowAttachBuffer" },
{ "name": "OH_NativeWindow_NativeWindowDetachBuffer" },
- { "name": "OH_NativeWindow_SetBufferHold" }
+ { "name": "OH_NativeWindow_SetBufferHold" },
+ { "name": "OH_NativeWindow_GetLastFlushedBufferV2" }
]
\ No newline at end of file