From 222bf6e487ca07e3f2631aebc7afc1d60ebc35c8 Mon Sep 17 00:00:00 2001 From: gavin Date: Thu, 27 Apr 2023 19:16:18 +0800 Subject: [PATCH] =?UTF-8?q?frame=5Faware=5Fsched=20=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E5=8C=96=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gavin --- BUILD.gn | 6 +-- frameaware.gni | 5 --- interfaces/innerkits/BUILD.gn | 2 +- interfaces/innerkits/frameintf/BUILD.gn | 51 ++++++++++--------------- test/BUILD.gn | 20 +++++----- 5 files changed, 35 insertions(+), 49 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 8cbe837..4e4d6a2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,11 +12,11 @@ # limitations under the License. import("//build/ohos.gni") -import("//foundation/resourceschedule/frame_aware_sched/frameaware.gni") +import("frameaware.gni") group("libintellisensesched_intf") { public_deps = [ - "${innerkits_path}/frameintf:frame_msg_intf", - "${innerkits_path}/frameintf:frame_ui_intf", + "interfaces/innerkits/frameintf:frame_msg_intf", + "interfaces/innerkits/frameintf:frame_ui_intf", ] } diff --git a/frameaware.gni b/frameaware.gni index dfb2a18..ddd0108 100644 --- a/frameaware.gni +++ b/frameaware.gni @@ -11,8 +11,3 @@ # See the License for the specific language governing permissions and # limitations under the License. -frame_aware_path = "//foundation/resourceschedule/frame_aware_sched" -service_path = "${frame_aware_path}/services" -innerkits_path = "${frame_aware_path}/interfaces/innerkits" - -framework_path = "${frame_aware_path}/frameworks/core" diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn index be09daa..da305d1 100644 --- a/interfaces/innerkits/BUILD.gn +++ b/interfaces/innerkits/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/ohos.gni") -import("//foundation/resourceschedule/frame_aware_sched/frame_aware_sched.gni") +import("../../frame_aware_sched.gni") group("innerkits_target") { deps = [ diff --git a/interfaces/innerkits/frameintf/BUILD.gn b/interfaces/innerkits/frameintf/BUILD.gn index 75d75ed..dd03d1d 100644 --- a/interfaces/innerkits/frameintf/BUILD.gn +++ b/interfaces/innerkits/frameintf/BUILD.gn @@ -12,25 +12,21 @@ # limitations under the License. import("//build/ohos.gni") -import("//foundation/resourceschedule/frame_aware_sched/frameaware.gni") +import("../../../frameaware.gni") config("frame_ui_intf_config") { visibility = [ ":*" ] include_dirs = [ - "${innerkits_path}/frameintf", - "${frame_aware_path}/common/include", - "${framework_path}/frame_aware_collector/include", - "//commonlibrary/c_utils/base/include", - "//utils/system/safwk/native/include", - "//base/hiviewdfx/interfaces/innerkits/libhilog/include", - "//base/hiviewdfx/interfaces/innerkits/libhitrace/include", + "./", + "../../../common/include", + "../../../frameworks/core/frame_aware_collector/include", ] } config("frame_trace_intf_config") { visibility = [ ":*" ] - include_dirs = [ "${innerkits_path}/frameintf" ] + include_dirs = [ "./" ] } ohos_shared_library("frame_trace_intf") { @@ -46,12 +42,12 @@ ohos_shared_library("frame_trace_intf") { ohos_shared_library("frame_ui_intf") { sources = [ - "${frame_aware_path}/interfaces/innerkits/frameintf/rtg_interface.cpp", - "${framework_path}/frame_aware_collector/src/frame_msg_mgr.cpp", - "${framework_path}/frame_aware_collector/src/frame_window_mgr.cpp", - "${framework_path}/frame_aware_collector/src/rme_core_sched.cpp", - "${framework_path}/frame_aware_collector/src/rme_scene_sched.cpp", + "../../../frameworks/core/frame_aware_collector/src/frame_msg_mgr.cpp", + "../../../frameworks/core/frame_aware_collector/src/frame_window_mgr.cpp", + "../../../frameworks/core/frame_aware_collector/src/rme_core_sched.cpp", + "../../../frameworks/core/frame_aware_collector/src/rme_scene_sched.cpp", "frame_ui_intf.cpp", + "rtg_interface.cpp", ] cflags = [ @@ -61,10 +57,6 @@ ohos_shared_library("frame_ui_intf") { configs = [ ":frame_ui_intf_config" ] - deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ] - - public_deps = [ "//commonlibrary/c_utils/base:utils" ] - external_deps = [ "c_utils:utils", "hitrace_native:hitrace_meter", @@ -77,25 +69,23 @@ ohos_shared_library("frame_ui_intf") { config("frame_msg_intf_config") { visibility = [ ":*" ] - visibility += [ "//foundation/resourceschedule/frame_aware_sched/test/*" ] + visibility += [ "../../../test/*" ] include_dirs = [ - "${innerkits_path}/frameintf", + "./", + "../../../frameworks/core/frame_aware_policy/include", + "../../../common/include", "//third_party/libxml2/include", - "${framework_path}/frame_aware_policy/include", - "${frame_aware_path}/common/include", - "//base/hiviewdfx/interfaces/innerkits/libhilog/include", - "//base/hiviewdfx/interfaces/innerkits/libhitrace/include", ] } ohos_shared_library("frame_msg_intf") { sources = [ - "${frame_aware_path}/interfaces/innerkits/frameintf/rtg_interface.cpp", - "${framework_path}/frame_aware_policy/src/app_info.cpp", - "${framework_path}/frame_aware_policy/src/intellisense_server.cpp", - "${framework_path}/frame_aware_policy/src/para_config.cpp", + "../../../frameworks/core/frame_aware_policy/src/app_info.cpp", + "../../../frameworks/core/frame_aware_policy/src/intellisense_server.cpp", + "../../../frameworks/core/frame_aware_policy/src/para_config.cpp", "frame_msg_intf.cpp", + "rtg_interface.cpp", ] cflags = [ @@ -103,7 +93,7 @@ ohos_shared_library("frame_msg_intf") { "-fstack-protector-strong", ] - configs = [ ":frame_msg_intf_config" ] + public_configs = [ ":frame_msg_intf_config" ] deps = [ "//third_party/libxml2:xml2" ] @@ -127,7 +117,7 @@ ohos_shared_library("rtg_interface") { ] include_dirs = [ - "${frame_aware_path}/common/include", + "../../../common/include", "//third_party/bounds_checking_function/include", ] @@ -136,5 +126,6 @@ ohos_shared_library("rtg_interface") { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] install_enable = true + subsystem_name = "resourceschedule" part_name = "frame_aware_sched" } diff --git a/test/BUILD.gn b/test/BUILD.gn index 3d4e80b..eded3f2 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -14,23 +14,26 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") import("//build/test.gni") -import("//foundation/resourceschedule/frame_aware_sched/frameaware.gni") +import("../frameaware.gni") module_output_path = "frameawareschedtest/" frame_aware_sched_configs = - [ "${innerkits_path}/frameintf:frame_msg_intf_config" ] + [ "../interfaces/innerkits/frameintf:frame_msg_intf_config" ] -frame_aware_sched_deps = [ "${innerkits_path}/frameintf:frame_msg_intf" ] +frame_aware_sched_deps = [ "../interfaces/innerkits/frameintf:frame_msg_intf" ] frame_aware_sched_public_deps = [ "//third_party/googletest:gtest_main" ] ohos_unittest("frame_ui_intf_test") { module_out_path = module_output_path - configs = frame_aware_sched_configs sources = [ "unittest/phone/frame_ui_intf_test.cpp" ] + configs = frame_aware_sched_configs + + deps = [ "../interfaces/innerkits/frameintf:frame_ui_intf" ] + if (is_standard_system) { public_deps = frame_aware_sched_public_deps } @@ -43,13 +46,10 @@ ohos_unittest("frame_msg_intf_test") { sources = [ "unittest/phone/frame_msg_intf_test.cpp" ] - include_dirs = [ - "//base/hiviewdfx/hiview/adapter/utility/include/extra/", - "//base/notification/eventhandler/interfaces/inner_api/", - ] - configs = frame_aware_sched_configs + deps = frame_aware_sched_deps + if (is_standard_system) { public_deps = frame_aware_sched_public_deps } @@ -63,7 +63,7 @@ ohos_unittest("rtg_interface_test") { sources = [ "unittest/phone/rtg_interface_test.cpp" ] - include_dirs = [ "${frame_aware_path}/common/include" ] + include_dirs = [ "../common/include" ] deps = frame_aware_sched_deps -- Gitee