From 69945fcb0e506f9ce2b0668d9b8da769acb6208f Mon Sep 17 00:00:00 2001 From: lihui Date: Fri, 13 Jun 2025 09:55:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=84=E8=93=9D=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lihui --- .../kit_sub_system/c_file_kit_sub_system.json | 5 - graphic/graphic_2d/native_fence/BUILD.gn | 29 ----- .../native_fence/libnative_fence.ndk.json | 18 --- .../graphic_2d/native_fence/native_fence.h | 110 ------------------ ndk_targets.gni | 2 - 5 files changed, 164 deletions(-) delete mode 100755 graphic/graphic_2d/native_fence/BUILD.gn delete mode 100755 graphic/graphic_2d/native_fence/libnative_fence.ndk.json delete mode 100755 graphic/graphic_2d/native_fence/native_fence.h diff --git a/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json b/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json index 34518ef90..2e7636057 100644 --- a/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json +++ b/build-tools/capi_parser/src/coreImpl/parser/kit_sub_system/c_file_kit_sub_system.json @@ -129,11 +129,6 @@ "kitName": "ArkGraphicsD", "subSystem": "图形图像" }, - { - "filePath": "graphic/graphic_2d/native_fence/native_fence.h", - "kitName": "ArkGraphicsD", - "subSystem": "图形图像" - }, { "filePath": "graphic/graphic_2d/native_drawing/drawing_bitmap.h", "kitName": "ArkGraphicsD", diff --git a/graphic/graphic_2d/native_fence/BUILD.gn b/graphic/graphic_2d/native_fence/BUILD.gn deleted file mode 100755 index 920b8d47d..000000000 --- a/graphic/graphic_2d/native_fence/BUILD.gn +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2025 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build/ohos.gni") -import("//build/ohos/ndk/ndk.gni") - -ohos_ndk_headers("native_fence_header") { - dest_dir = "$ndk_headers_out_dir/native_fence" - sources = - [ "//interface/sdk_c/graphic/graphic_2d/native_fence/native_fence.h" ] -} - -ohos_ndk_library("libnative_fence_ndk") { - output_name = "native_fence" - output_extension = "so" - ndk_description_file = "./libnative_fence.ndk.json" - system_capability = "SystemCapability.Graphic.Graphic2D.NativeFence" - system_capability_headers = [ "native_fence/native_fence.h" ] -} diff --git a/graphic/graphic_2d/native_fence/libnative_fence.ndk.json b/graphic/graphic_2d/native_fence/libnative_fence.ndk.json deleted file mode 100755 index b29686ae5..000000000 --- a/graphic/graphic_2d/native_fence/libnative_fence.ndk.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "first_introduced": "20", - "name": "OH_NativeFence_IsValid" - }, - { - "first_introduced": "20", - "name": "OH_NativeFence_Wait" - }, - { - "first_introduced": "20", - "name": "OH_NativeFence_WaitForever" - }, - { - "first_introduced": "20", - "name": "OH_NativeFence_Close" - } -] \ No newline at end of file diff --git a/graphic/graphic_2d/native_fence/native_fence.h b/graphic/graphic_2d/native_fence/native_fence.h deleted file mode 100755 index e0d6dd9a7..000000000 --- a/graphic/graphic_2d/native_fence/native_fence.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2025 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @addtogroup NativeFence - * @{ - * - * @brief Provides the native fence capability - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeFence - * @since 20 - * @version 1.0 - */ - -/** - * @file native_fence.h - * - * @brief Defines the functions for using native fence. - * - * @kit ArkGraphics2D - * @library libnative_fence.so - * @syscap SystemCapability.Graphic.Graphic2D.NativeFence - * @since 20 - * @version 1.0 - */ - -#ifndef NDK_INCLUDE_NATIVE_FENCE_H_ -#define NDK_INCLUDE_NATIVE_FENCE_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Checks if the fenceFd is valid. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeFence - * @param fenceFd Indicates a file descriptor handle, which is used for timing synchronization. - * @return Returns true if the fenceFd is valid. - * Returns false if the fenceFd is a negative integer. - * @since 20 - * @version 1.0 - */ -bool OH_NativeFence_IsValid(int fenceFd); - -/** - * @brief Waits for a fence signal. The maximum waiting time is determined by the timeout parameter. - * The incoming fenceFd needs to be closed by the user themselves. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeFence - * @param fenceFd Indicates a file descriptor handle, which is used for timing synchronization. - * @param timeout Indicates the timeout duration. - * The unit is milliseconds, -1 represents permanent waiting, 0 represents immediate return. - * @return Returns true if the fence signaled. - * Returns false in the following cases: - * 1.if the fenceFd is a negative integer. - * 2.no event occurred within the specified timeout period. - * 3.the underlying poll interface call failed. - * 4.the timeout value is 0. - * 5.failed to duplicate the file descriptor. - * @since 20 - * @version 1.0 - */ -bool OH_NativeFence_Wait(int fenceFd, uint32_t timeout); - -/** - * @brief Waits forever for a fence signal. - * The incoming fenceFd needs to be closed by the user themselves. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeFence - * @param fenceFd Indicates a file descriptor handle, which is used for timing synchronization. - * @return Returns true if the fence signaled. - * Returns false in the following cases: - * 1.if the fenceFd is a negative integer. - * 2.no incidents have occurred, permanent waiting. - * 3.failed to duplicate the file descriptor. - * @since 20 - * @version 1.0 - */ -bool OH_NativeFence_WaitForever(int fenceFd); - -/** - * @brief Close the fenceFd. - * - * @syscap SystemCapability.Graphic.Graphic2D.NativeFence - * @param fenceFd Indicates a file descriptor handle, which is used for timing synchronization. - * This value is a non negative integer. - * @since 20 - * @version 1.0 - */ -void OH_NativeFence_Close(int fenceFd); -#ifdef __cplusplus -} -#endif -/** @} */ -#endif \ No newline at end of file diff --git a/ndk_targets.gni b/ndk_targets.gni index 6609db3e1..116c203b4 100644 --- a/ndk_targets.gni +++ b/ndk_targets.gni @@ -88,8 +88,6 @@ _ndk_library_targets = [ "//interface/sdk_c/graphic/graphic_2d/native_image:native_image_header", "//interface/sdk_c/graphic/graphic_2d/native_vsync:libnative_vsync_ndk", "//interface/sdk_c/graphic/graphic_2d/native_vsync:native_vsync_header", - "//interface/sdk_c/graphic/graphic_2d/native_fence:libnative_fence_ndk", - "//interface/sdk_c/graphic/graphic_2d/native_fence:native_fence_header", "//interface/sdk_c/graphic/graphic_2d/native_color_space_manager:libnative_color_space_manager_ndk", "//interface/sdk_c/graphic/graphic_2d/native_color_space_manager:native_color_space_manager_header", "//interface/sdk_c/graphic/graphic_2d/native_drawing:libnative_drawing_ndk", -- Gitee