From 22698f8762c14d7981ac4d8ab31559d5893c2324 Mon Sep 17 00:00:00 2001 From: libo0729 Date: Tue, 3 Feb 2026 14:51:27 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#IDOGC8]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-fast-image,react-native-svg-capi,reat-nat?= =?UTF-8?q?ive-linear-gradient,react-native-SmartRefreshLayout,shopify-fla?= =?UTF-8?q?sh-list,react-native-masked-view=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: libo0729 --- en/react-native-SmartRefreshLayout.md | 52 ++++++++++++++++++ en/react-native-fast-image.md | 53 +++++++++++++++++++ en/react-native-linear-gradient.md | 52 ++++++++++++++++++ en/react-native-masked-view-masked-view.md | 52 ++++++++++++++++++ en/react-native-svg-capi.md | 52 ++++++++++++++++++ en/shopify-flash-list.md | 52 ++++++++++++++++++ zh-cn/react-native-SmartRefreshLayout.md | 53 +++++++++++++++++++ zh-cn/react-native-fast-image.md | 52 ++++++++++++++++++ zh-cn/react-native-linear-gradient.md | 53 +++++++++++++++++++ zh-cn/react-native-masked-view-masked-view.md | 53 +++++++++++++++++++ zh-cn/react-native-svg-capi.md | 52 ++++++++++++++++++ zh-cn/shopify-flash-list.md | 53 +++++++++++++++++++ 12 files changed, 629 insertions(+) diff --git a/en/react-native-SmartRefreshLayout.md b/en/react-native-SmartRefreshLayout.md index a45cc9d6..b6df0ec5 100644 --- a/en/react-native-SmartRefreshLayout.md +++ b/en/react-native-SmartRefreshLayout.md @@ -340,6 +340,58 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### Method for enabling the parallelization whitelist + +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +Open the `entry/src/main/ets/pages/Index.ets` file and add the following code: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## Properties > [!Tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/en/react-native-fast-image.md b/en/react-native-fast-image.md index 7fc22365..a2e9a223 100644 --- a/en/react-native-fast-image.md +++ b/en/react-native-fast-image.md @@ -269,6 +269,59 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### Method for enabling the parallelization whitelist + +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +Open the `entry/src/main/ets/pages/Index.ets` file and add the following code: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + + ## Properties > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/en/react-native-linear-gradient.md b/en/react-native-linear-gradient.md index 9cb6c9f5..bd7ec46c 100644 --- a/en/react-native-linear-gradient.md +++ b/en/react-native-linear-gradient.md @@ -200,6 +200,58 @@ Then build and run the code. Check the release version information in the release address of the third-party library: [@react-native-ohos/react-native-linear-gradient Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-linear-gradient/releases) +### 3.2 Method for enabling the parallelization whitelist + +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +Open the `entry/src/main/ets/pages/Index.ets` file and add the following code: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## Properties > [!TIP] The Platform column indicates the platform where the properties are supported in the original third-party library. diff --git a/en/react-native-masked-view-masked-view.md b/en/react-native-masked-view-masked-view.md index d220ffbf..09668e5d 100644 --- a/en/react-native-masked-view-masked-view.md +++ b/en/react-native-masked-view-masked-view.md @@ -271,6 +271,58 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### Method for enabling the parallelization whitelist + +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +Open the `entry/src/main/ets/pages/Index.ets` file and add the following code: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## Properties > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/en/react-native-svg-capi.md b/en/react-native-svg-capi.md index 047dcd7c..26f89f44 100644 --- a/en/react-native-svg-capi.md +++ b/en/react-native-svg-capi.md @@ -282,6 +282,58 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### Method for enabling the parallelization whitelist + +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +Open the `entry/src/main/ets/pages/Index.ets` file and add the following code: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## Properties diff --git a/en/shopify-flash-list.md b/en/shopify-flash-list.md index 5721184d..56050231 100644 --- a/en/shopify-flash-list.md +++ b/en/shopify-flash-list.md @@ -215,6 +215,58 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### Method for enabling the parallelization whitelist + +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +Open the `entry/src/main/ets/pages/Index.ets` file and add the following code: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## Properties > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/zh-cn/react-native-SmartRefreshLayout.md b/zh-cn/react-native-SmartRefreshLayout.md index e7bd36cd..d1c8532b 100644 --- a/zh-cn/react-native-SmartRefreshLayout.md +++ b/zh-cn/react-native-SmartRefreshLayout.md @@ -341,6 +341,59 @@ ohpm install 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### 并行化白名单启用方法 + +要使用此功能,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +打开 `entry/src/main/ets/pages/Index.ets`,添加: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + + ## 属性 > [!Tip] "Platform"列表示该属性在原三方库上支持的平台。 diff --git a/zh-cn/react-native-fast-image.md b/zh-cn/react-native-fast-image.md index f5d1e773..c92dfbb6 100644 --- a/zh-cn/react-native-fast-image.md +++ b/zh-cn/react-native-fast-image.md @@ -270,6 +270,58 @@ ohpm install 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### 并行化白名单启用方法 + +要使用此功能,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +打开 `entry/src/main/ets/pages/Index.ets`,添加: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## 属性 diff --git a/zh-cn/react-native-linear-gradient.md b/zh-cn/react-native-linear-gradient.md index 1714be42..93f24da0 100644 --- a/zh-cn/react-native-linear-gradient.md +++ b/zh-cn/react-native-linear-gradient.md @@ -200,6 +200,59 @@ ohpm install 请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/react-native-linear-gradient Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-linear-gradient/releases) +### 3.2 并行化白名单启用方法 + +要使用此功能,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +打开 `entry/src/main/ets/pages/Index.ets`,添加: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + + ## 4. 属性 > [!TIP] "Platform" 列表示这些属性在原始第三方库中支持的平台。 diff --git a/zh-cn/react-native-masked-view-masked-view.md b/zh-cn/react-native-masked-view-masked-view.md index 85a6ac54..90c997f7 100644 --- a/zh-cn/react-native-masked-view-masked-view.md +++ b/zh-cn/react-native-masked-view-masked-view.md @@ -275,6 +275,59 @@ ohpm install 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### 并行化白名单启用方法 + +要使用此功能,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +打开 `entry/src/main/ets/pages/Index.ets`,添加: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + + ## 属性 > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 diff --git a/zh-cn/react-native-svg-capi.md b/zh-cn/react-native-svg-capi.md index 95d090c2..eb7b5bad 100644 --- a/zh-cn/react-native-svg-capi.md +++ b/zh-cn/react-native-svg-capi.md @@ -286,6 +286,58 @@ ohpm install 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### 并行化白名单启用方法 + +要使用此功能,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +打开 `entry/src/main/ets/pages/Index.ets`,添加: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + ## 属性 diff --git a/zh-cn/shopify-flash-list.md b/zh-cn/shopify-flash-list.md index e04bd9b4..1ee3810f 100644 --- a/zh-cn/shopify-flash-list.md +++ b/zh-cn/shopify-flash-list.md @@ -218,6 +218,59 @@ ohpm install 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +### 并行化白名单启用方法 + +要使用此功能,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.101; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; +2. RNOH: 0.77.34; SDK: HarmonyOS 6.0.2 Release SDK; IDE: DevEco Studio 6.0.2 Release; ROM: 6.0.0.129; + + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) ++ set(PARALLELIZATION_ENABLE 1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) +``` + +打开 `entry/src/main/ets/pages/Index.ets`,添加: + +```diff +@Entry +@Component +struct Index { + @StorageLink('RNOHCoreContext') private rnohCoreContext: RNOHCoreContext | undefined = undefined + @State shouldShow: boolean = false + private logger!: RNOHLogger + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; + aboutToAppear() { + this.logger = this.rnohCoreContext!.logger.clone("Index") + const stopTracing = this.logger.clone("aboutToAppear").startTracing() + for (const customFont of fonts) { + font.registerFont(customFont) + } + + this.shouldShow = true ++ this.rnohCoreContext?.setParallelizationEnabled(true); + stopTracing() + } +``` + + ## 属性 > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 -- Gitee