diff --git a/build/build.sh b/build/build.sh index 8b9587d2a0f871f5cb688a1e3f1b3b4427392111..1fe44012998ce2fa37f4a24968bd240dc706765a 100755 --- a/build/build.sh +++ b/build/build.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder.py b/build/builder.py index a474f8ca446de52aa5f1da17f6cd344cd56db39d..8863d29e81f935d7dd250f22a24d210ef32c9b98 100755 --- a/build/builder.py +++ b/build/builder.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/__init__.py b/build/builder/__init__.py index 8858d320ebb984d33d15583e8c87ced57f470729..b0d23215ca27c4653d413796514e67eecf61815c 100755 --- a/build/builder/__init__.py +++ b/build/builder/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/commands/build.py b/build/builder/commands/build.py index fb530b0aa656454f49e8a6f383880eb3dc28e099..42804ea11793962de005f3d1b22569c3699a9de3 100755 --- a/build/builder/commands/build.py +++ b/build/builder/commands/build.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/commands/format.py b/build/builder/commands/format.py index 40e725ae4a71edf1fa718680d647edd0d1ebad8e..048d31b28fc1fed6d86e9064870fe542ad551fc6 100755 --- a/build/builder/commands/format.py +++ b/build/builder/commands/format.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/commands/package.py b/build/builder/commands/package.py index fb93a96b52ee006080461cb1a08f8345339b6d2a..730d5d631db4524fd3cb96b0d3b7edb472eb704b 100755 --- a/build/builder/commands/package.py +++ b/build/builder/commands/package.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/common/env_checker.py b/build/builder/common/env_checker.py index 8ca0415623b911ffdad3b7d2acb71b8d3d7a0b5d..3f904f390e9b014d9502f9fecf50455f4b7d6c92 100755 --- a/build/builder/common/env_checker.py +++ b/build/builder/common/env_checker.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/common/logger.py b/build/builder/common/logger.py index 31f946379b9b477970eefe326811b8b4eb037022..79858c32698374ed2e4a6f26089464efe1901aa4 100755 --- a/build/builder/common/logger.py +++ b/build/builder/common/logger.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/builder/common/utils.py b/build/builder/common/utils.py index 8d8c9b0b4be2ded826f76a927047feabde5c94e7..f432d90a697801be2ce660a08c37052dbe144f1e 100755 --- a/build/builder/common/utils.py +++ b/build/builder/common/utils.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/configs/requirements.txt b/build/configs/requirements.txt index d2c14202b81a2bb9118e4139ee3c5020b2363ff0..42677269e40c9f461e4fb006a0d1014a9cde8ee3 100755 --- a/build/configs/requirements.txt +++ b/build/configs/requirements.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/configs/system_deps.toml b/build/configs/system_deps.toml index 6810f40fd1ba35745f0935f778cbe0272c2c5b99..24969f08316149b7978cb7414e0bcd52e7ccc039 100755 --- a/build/configs/system_deps.toml +++ b/build/configs/system_deps.toml @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 @@ -29,9 +29,9 @@ package_deps = [ "cmake", "ninja-build", "libxml2-devel", + "libpng-devel", + "libicu", # DRM Backend "libdrm-devel", "systemd-devel", - "mesa-libgbm-devel", - "libpng-devel", ] diff --git a/build/gn/BUILD.gn b/build/gn/BUILD.gn index 1d196285cfb1528931c43956a31ea42c8e27a859..61fb063a457a1cab4ad40d2d465429d4f677e900 100644 --- a/build/gn/BUILD.gn +++ b/build/gn/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 @@ -11,19 +11,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -group("ft_engine") { +group("ft_display_server") { deps = [ - "//display_server/utils/socketpair/ft_build:socketpair", - "//display_server/rosen/modules/composer/vsync/ft_build:libvsync", - "//display_server/drivers/hal/drm_backend:drm_backend", - "//display_server/utils/sync_fence/ft_build:sync_fence", - "//display_server/frameworks/surface/ft_build:surface", "//display_server/rosen/modules/render_service_base/ft_build:librender_service_base", - "//display_server/drivers/hdi_service/gralloc/client:hdi_gralloc_client", - "//display_server/rosen/modules/composer/ft_build:libcomposer", + "//display_server/rosen/modules/render_service/ft_build:render_service_group", "//display_server/rosen/modules/render_service_client/ft_build:librender_service_client", - "//display_server/rosen/modules/render_service/ft_build:librender_service", + ] +} +group("ft_window_manager") { + deps = [ "//window_manager/wmserver/ft_build:libwms", ] } @@ -32,6 +29,9 @@ group("ft_test") { testonly = true deps = [ - "//display_server/drivers/hal/test:drm_backend_test" + "//display_server/drivers/hal/test:drm_backend_test", + "//display_server/frameworks/surface/test/ft_build:test", + "//display_server/rosen/samples/composer/ft_build:hello_composer", + "//display_server/rosen/modules/render_service_client/test/ft_build:render_service_client_rs_demo" ] } diff --git a/build/gn/BUILDCONFIG.gn b/build/gn/BUILDCONFIG.gn index cb69f15823d007c75478f85cf40f42f076c3d8d8..1eaa3981dfef5ff4554401c3cb308c91d004b1da 100644 --- a/build/gn/BUILDCONFIG.gn +++ b/build/gn/BUILDCONFIG.gn @@ -11,8 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License -print("[GN INFO] host_os :", host_os) -print("[GN INFO] host_cpu :", host_cpu) +print("[GN INFO] host_os=$host_os, host_cpu=$host_cpu") if (target_os == "") { target_os = host_os diff --git a/build/gn/configs/compiler/BUILD.gn b/build/gn/configs/compiler/BUILD.gn index 2de69e565ba9ef5e645336239beea033dfd471a0..c56e8f9c872c667a24a624085a6d8f165eeb3a49 100755 --- a/build/gn/configs/compiler/BUILD.gn +++ b/build/gn/configs/compiler/BUILD.gn @@ -6,7 +6,7 @@ import("//build/gn/configs/compiler/compiler.gni") import("//build/gn/toolchain/toolchain.gni") if (current_cpu == "arm" || current_cpu == "arm64") { - import("//build/configs/arm.gni") + import("//build/gn/configs/fangtian/arm.gni") } declare_args() { diff --git a/build/gn/configs/fangtian/abi.gni b/build/gn/configs/fangtian/abi.gni index aa729f398d12a56130e8b5e31ec73ef2841b489b..c6b5696c6b0f1ec61cab27805b7d71e3a700d27d 100755 --- a/build/gn/configs/fangtian/abi.gni +++ b/build/gn/configs/fangtian/abi.gni @@ -30,7 +30,7 @@ assert(!devtools_instrumentation_dumping || use_order_profiling, if (current_cpu == "x86") { ft_app_abi = "x86" } else if (current_cpu == "arm") { - import("//build/config/arm.gni") + import("//build/gn/configs/fangtian/arm.gni") if (arm_version < 7) { ft_app_abi = "armeabi" } else { diff --git a/build/configs/arm.gni b/build/gn/configs/fangtian/arm.gni similarity index 100% rename from build/configs/arm.gni rename to build/gn/configs/fangtian/arm.gni diff --git a/build/gn/configs/system_libs/BUILD.gn b/build/gn/configs/system_libs/BUILD.gn index 672a80f832378c0e04b4f3c0ef863d1d8f8f7cc9..b485224a3ef0ba6898b7b2dd4fc1aba423cedddf 100644 --- a/build/gn/configs/system_libs/BUILD.gn +++ b/build/gn/configs/system_libs/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 @@ -12,60 +12,161 @@ # limitations under the License. config("c_utils_config") { - include_dirs = [ "${sys_inc}/c_utils" ] - libs = [ "utils", "sec_shared" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/c_utils" ] + libs = [ "utils", "sec_shared" ] } config("ipc_core_config") { - include_dirs = [ "${sys_inc}/ipc_core" ] - libs = [ "ipc_core" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/ipc_core" ] + libs = [ "ipc_core" ] } config("hilog_config") { - include_dirs = [ "${sys_inc}/hilog" ] - libs = [ "hilog" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/hilog" ] + libs = [ "hilog" ] } config("hitrace_meter_config") { - include_dirs = [ "${sys_inc}/hitrace_meter" ] - libs = [ "hitrace_meter" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/hitrace_meter" ] + libs = [ "hitrace_meter" ] } config("eventhandler_config") { - include_dirs = [ "${sys_inc}/eventhandler" ] - libs = [ "eventhandler" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/eventhandler" ] + libs = [ "eventhandler" ] } config("skia_config") { - include_dirs = [ - "${sys_inc}/skia", - "${sys_inc}/skia/include", - "${sys_inc}/skia/include/core" - ] - libs = [ "ace_skia_fangtian" ] + visibility = [ ":*" ] + + include_dirs = [ + "${sys_inc}/skia", + "${sys_inc}/skia/include", + "${sys_inc}/skia/include/core" + ] + libs = [ "ace_skia_fangtian" ] } config("samgr_config") { - include_dirs = [ "${sys_inc}/samgr" ] - libs = [ "samgr_proxy" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/samgr" ] + libs = [ "samgr_proxy" ] } config("image_config") { - include_dirs = [ "${sys_inc}/image" ] - libs = [ "image_native" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/image" ] + libs = [ "image_native" ] } config("mmi_config") { - include_dirs = [ "${sys_inc}/mmi" ] - libs = [ "mmi-client" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/mmi" ] + libs = [ "mmi-client" ] } config("syspara_config") { - include_dirs = [ "${sys_inc}/syspara" ] - libs = [ "beget_proxy", "begetutil" ] + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/syspara" ] + libs = [ "beget_proxy", "begetutil" ] } config("safwk_config") { - include_dirs = [ "${sys_inc}/safwk" ] - libs = [ "system_ability_fwk" ] -} \ No newline at end of file + visibility = [ ":*" ] + + include_dirs = [ "${sys_inc}/safwk" ] + libs = [ "system_ability_fwk" ] +} + +config("libz_config") { + visibility = [ ":*" ] + libs = [ "shared_libz" ] +} + +group("c_utils") { + public_configs = [ ":c_utils_config" ] +} + +group("hilog") { + public_configs = [ ":hilog_config" ] +} + +group("ipc_core") { + public_deps = [ ":c_utils" ] + public_configs = [ ":ipc_core_config" ] +} + +group("eventhandler") { + public_deps = [ + ":c_utils", + ":hilog", + ] + public_configs = [ ":eventhandler_config" ] +} + +group("hitrace_meter") { + public_deps = [ ":c_utils" ] + public_configs = [ ":hitrace_meter_config" ] +} + +group("samgr") { + public_deps = [ ":c_utils" ] + public_configs = [ ":samgr_config" ] +} + +group("image") { + public_deps = [ + ":hilog", + ":hitrace_meter", + ":c_utils", + ":ipc_core", + ] + public_configs = [ ":image_config" ] +} + +group("mmi") { + public_deps = [ + ":c_utils", + ":hilog", + ] + public_configs = [ ":mmi_config" ] +} + +group("syspara") { + public_deps = [ + ":c_utils", + ":hilog", + ] + public_configs = [ ":syspara_config" ] +} + +group("skia") { + public_configs = [ ":skia_config" ] +} + +group("safwk") { + public_deps = [ + ":c_utils", + ":ipc_core", + ":samgr" + ] + public_configs = [ ":safwk_config" ] +} + +group("libz") { + public_configs = [ ":libz_config" ] +} diff --git a/build/gn/fangtian.gni b/build/gn/fangtian.gni index 633f18a6451bd791a7ec303e82315d056262c4f0..66b38a0cb8c18d21fc7bd925f40e7248a5a1849e 100755 --- a/build/gn/fangtian.gni +++ b/build/gn/fangtian.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/templates/build_targets.gni b/build/gn/templates/build_targets.gni index 6e453a1b77d104adc891045b384272fda8de231b..a5d54932490e684fc89e7db7e01360c1049f1bea 100755 --- a/build/gn/templates/build_targets.gni +++ b/build/gn/templates/build_targets.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/templates/ft_executable.gni b/build/gn/templates/ft_executable.gni index 97c060e2d7d4cf2c6a453d8bdbd9d5c799128e4a..7024704aff112412f5359abd7478d4484f4c26ef 100755 --- a/build/gn/templates/ft_executable.gni +++ b/build/gn/templates/ft_executable.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/templates/ft_shared_library.gni b/build/gn/templates/ft_shared_library.gni index a3c0977226ec51d632a1973e7d0177a053375381..ed862dcace66b46a2c61c07df65ae691645417bc 100755 --- a/build/gn/templates/ft_shared_library.gni +++ b/build/gn/templates/ft_shared_library.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/templates/ft_source_set.gni b/build/gn/templates/ft_source_set.gni index 328fb01cde896491d802fe3332040ec1fa01f4bb..17b91deaf8c3d9429233dbba8c9a5ef6b00acd30 100755 --- a/build/gn/templates/ft_source_set.gni +++ b/build/gn/templates/ft_source_set.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/templates/ft_static_library.gni b/build/gn/templates/ft_static_library.gni index fd881792a478a5666f6c84c69497ad8d82ad7efc..5b4997a31ba5fba99cfc49c7241b87b022293aa3 100755 --- a/build/gn/templates/ft_static_library.gni +++ b/build/gn/templates/ft_static_library.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/toolchain/linux/BUILD.gn b/build/gn/toolchain/linux/BUILD.gn index 154a223ed76a5a538345a8cd3332506196770a18..2ba759d02521b700412f3b125fefe17e1fd513ae 100755 --- a/build/gn/toolchain/linux/BUILD.gn +++ b/build/gn/toolchain/linux/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 diff --git a/build/gn/toolchain/toolchain.gni b/build/gn/toolchain/toolchain.gni index e8a94acaa305f22a92f70bf1c64ee14c3775082a..42b2b68e76742c2b61e4963f67a0c048463c5752 100755 --- a/build/gn/toolchain/toolchain.gni +++ b/build/gn/toolchain/toolchain.gni @@ -108,6 +108,8 @@ template("clang_toolchain") { ar = "llvm-ar" } + print("[GN INFO] cc = ${cc}, cxx = ${cxx}, ld = ${ld}, asm = ${asm}, ar = ${ar}") + # Bring these into our scope for string interpolation with default values. if (defined(invoker.link_libs_section_prefix)) { link_libs_section_prefix = invoker.link_libs_section_prefix diff --git a/build/prebuild.sh b/build/prebuild.sh index 4b76d96011203023dac15016e86dbe140277c72a..2fd9ab126beefab7ea3270d75cbe0cbc3e19eabd 100755 --- a/build/prebuild.sh +++ b/build/prebuild.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 @@ -73,10 +73,18 @@ if [ ! -d ${PROJECT_DIR}/prebuilts/libs ]; then git clone https://gitee.com/yanansong/ft_engine_prebuild.git ${PROJECT_DIR}/prebuilts/libs fi -# copy prebuild library to /usr/lib64 ARCHNAME=`uname -m` cd ${PROJECT_DIR}/prebuilts/libs/library/${ARCHNAME} +# copy prebuild library to /usr/local/lib64 sudo cp -fr *.so /usr/local/lib64 +# copy prebuild binarys to /usr/local/bin +sudo cp -f hilog /usr/local/bin +sudo cp -f hilogd /usr/local/bin +if [ ARCHNAME = "x86_64" ]; then + sudo cp -f sa_main /usr/local/bin + sudo cp -f samgr /usr/local/bin +fi + cd ${PROJECT_DIR} rm -fr ${PROJECT_DIR}/prebuilts/libs diff --git a/display_server/drivers/hal/BUILD.gn b/display_server/drivers/hal/BUILD.gn index 737a62db389aedf16c5e171907e92104218d1425..1573a292518622eec2e2c5382747749490722571 100644 --- a/display_server/drivers/hal/BUILD.gn +++ b/display_server/drivers/hal/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/BUILD.gn b/display_server/drivers/hal/base/BUILD.gn index d5faf8e2066ce568987a8d524824659a307fe01a..b3b36f2968cc14abdac728f27bf3bc4c9294d76e 100644 --- a/display_server/drivers/hal/base/BUILD.gn +++ b/display_server/drivers/hal/base/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/current_thread.h b/display_server/drivers/hal/base/includes/current_thread.h index 60e3cbb405aaeaf310a8b1d3ca0dfb64d0cda4a9..95ba86a7c4e2633dbe6c4655768fb8ac302fe538 100644 --- a/display_server/drivers/hal/base/includes/current_thread.h +++ b/display_server/drivers/hal/base/includes/current_thread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/event_loop/event_channel.h b/display_server/drivers/hal/base/includes/event_loop/event_channel.h index 93a554f2e0552b69c6e33b7c13efe1d89e13813d..363d1437971e6bcb8bd4367ddc904ecbbbdae5e9 100644 --- a/display_server/drivers/hal/base/includes/event_loop/event_channel.h +++ b/display_server/drivers/hal/base/includes/event_loop/event_channel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -21,7 +21,7 @@ #include #include -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "timestamp.h" namespace oewm { diff --git a/display_server/drivers/hal/base/includes/event_loop/event_loop.h b/display_server/drivers/hal/base/includes/event_loop/event_loop.h index 12242c10e3df4d7c8ec2c3536ea3ccb9a3c53f80..4f01029c3cbecee8a59fbb0cb5fadfc5bcccc8f0 100644 --- a/display_server/drivers/hal/base/includes/event_loop/event_loop.h +++ b/display_server/drivers/hal/base/includes/event_loop/event_loop.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/event_loop/event_loop_thread.h b/display_server/drivers/hal/base/includes/event_loop/event_loop_thread.h index 78cd62de98cb32a45fcb625e4102b2296683c252..6121b0d1b169873038f119a03cd308eb778dd2c4 100644 --- a/display_server/drivers/hal/base/includes/event_loop/event_loop_thread.h +++ b/display_server/drivers/hal/base/includes/event_loop/event_loop_thread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/event_loop/event_poller.h b/display_server/drivers/hal/base/includes/event_loop/event_poller.h index 54f8b832ccc0035162045bc09495f1fec2ebd869..6342ffbb0be577f1c9483d1f983b6d82c5ebc7fa 100644 --- a/display_server/drivers/hal/base/includes/event_loop/event_poller.h +++ b/display_server/drivers/hal/base/includes/event_loop/event_poller.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/event_loop/timer.h b/display_server/drivers/hal/base/includes/event_loop/timer.h index 5a1641eb62613535f2fbf45b87cdc0b0c1305bca..564c7c7a41b98946f6cb51dbf43d6021de37207d 100644 --- a/display_server/drivers/hal/base/includes/event_loop/timer.h +++ b/display_server/drivers/hal/base/includes/event_loop/timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -17,7 +17,7 @@ #include -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "timestamp.h" namespace oewm { diff --git a/display_server/drivers/hal/base/includes/event_loop/timer_queue.h b/display_server/drivers/hal/base/includes/event_loop/timer_queue.h index e48fccf30d6aaf200ed7a2c4fb99acb8ecb39834..bc64de5c88c75c846253211ddd9cc007c9439519 100644 --- a/display_server/drivers/hal/base/includes/event_loop/timer_queue.h +++ b/display_server/drivers/hal/base/includes/event_loop/timer_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/log.h b/display_server/drivers/hal/base/includes/log.h index c5bd2c71522ef896dc2eb047252db249c4e684b7..0e95fe6b2deba601abe885e7be0cebefed5b1832 100644 --- a/display_server/drivers/hal/base/includes/log.h +++ b/display_server/drivers/hal/base/includes/log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/noncopyable.h b/display_server/drivers/hal/base/includes/noncopyable_hal.h similarity index 94% rename from display_server/drivers/hal/base/includes/noncopyable.h rename to display_server/drivers/hal/base/includes/noncopyable_hal.h index b73bbf50a765c5481c7d68bf1d0ab28602492f2c..bce0c5ba669461edcefc712bed95cef16dc9d9da 100644 --- a/display_server/drivers/hal/base/includes/noncopyable.h +++ b/display_server/drivers/hal/base/includes/noncopyable_hal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/timestamp.h b/display_server/drivers/hal/base/includes/timestamp.h index 88b8da02473205dffd8682c291646d254f9b871f..1c533f841726a08f25095da13f7c5f8ae0b701c7 100644 --- a/display_server/drivers/hal/base/includes/timestamp.h +++ b/display_server/drivers/hal/base/includes/timestamp.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/includes/types.h b/display_server/drivers/hal/base/includes/types.h index d425c4fa6dee7aca98bf5cc6bc4c874eae9ff68d..6113bc608cbc7b05607217b6b7c21b4892500ff1 100644 --- a/display_server/drivers/hal/base/includes/types.h +++ b/display_server/drivers/hal/base/includes/types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/current_thread.cpp b/display_server/drivers/hal/base/src/current_thread.cpp index 4c2e36b457dfb4454b07439f04ae8f64fb7604aa..6105fc4e0a154f41848eb6fac408245906ca4bcb 100644 --- a/display_server/drivers/hal/base/src/current_thread.cpp +++ b/display_server/drivers/hal/base/src/current_thread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/event_loop/BUILD.gn b/display_server/drivers/hal/base/src/event_loop/BUILD.gn index 94ff4995f704959950bc069414870e2f01fedbdf..e58135b1df4996385d7482a0bafa8a75c9ad951a 100644 --- a/display_server/drivers/hal/base/src/event_loop/BUILD.gn +++ b/display_server/drivers/hal/base/src/event_loop/BUILD.gn @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Technologies 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 @@ -23,7 +23,7 @@ ft_shared_library("hal_event_loop") { "timer_queue.cpp", ] configs = [ "//display_server/drivers/hal:hal_public_config" ] - deps = [ + public_deps = [ "//display_server/drivers/hal/base:hal_base", ] } diff --git a/display_server/drivers/hal/base/src/event_loop/event_channel.cpp b/display_server/drivers/hal/base/src/event_loop/event_channel.cpp index 54901a1483c34602ad98d1439ba8c8ce8d9ea9aa..f8486fe34a09aacedeefd51d3a9171ea6eff06db 100644 --- a/display_server/drivers/hal/base/src/event_loop/event_channel.cpp +++ b/display_server/drivers/hal/base/src/event_loop/event_channel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/event_loop/event_loop.cpp b/display_server/drivers/hal/base/src/event_loop/event_loop.cpp index 97e72736ea842d5ef04c14856903e4e7f034485a..e9b66c9158ccde5cb5e4025302c6f5619b81996a 100644 --- a/display_server/drivers/hal/base/src/event_loop/event_loop.cpp +++ b/display_server/drivers/hal/base/src/event_loop/event_loop.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/event_loop/event_loop_thread.cpp b/display_server/drivers/hal/base/src/event_loop/event_loop_thread.cpp index d7078ae973d0ab8218dc12408bbe6f1d2481d872..e52dfb27888676d0840f28b6f333bee1b927621b 100644 --- a/display_server/drivers/hal/base/src/event_loop/event_loop_thread.cpp +++ b/display_server/drivers/hal/base/src/event_loop/event_loop_thread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/event_loop/event_poller.cpp b/display_server/drivers/hal/base/src/event_loop/event_poller.cpp index d17ba626860ea4860d9b331c013dbd55e270e076..5c055bc820b2522cd2a4b1feeeb9cdb6af817633 100644 --- a/display_server/drivers/hal/base/src/event_loop/event_poller.cpp +++ b/display_server/drivers/hal/base/src/event_loop/event_poller.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/event_loop/timer.cpp b/display_server/drivers/hal/base/src/event_loop/timer.cpp index 3eec2962f45c1ed7aa8628d43eafad5fcffb3830..71d59aff97dc6e923a36be419b4fa3884ec12e59 100644 --- a/display_server/drivers/hal/base/src/event_loop/timer.cpp +++ b/display_server/drivers/hal/base/src/event_loop/timer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/event_loop/timer_queue.cpp b/display_server/drivers/hal/base/src/event_loop/timer_queue.cpp index 7966dab8a0a690cbb3d91d5e4f7132b6805b2fe2..aaab9c850abb162080f5b3eb21fb525828e10487 100644 --- a/display_server/drivers/hal/base/src/event_loop/timer_queue.cpp +++ b/display_server/drivers/hal/base/src/event_loop/timer_queue.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/base/src/timestamp.cpp b/display_server/drivers/hal/base/src/timestamp.cpp index 9e48ca9e0887d9140b030f7927758142015a1934..1104417e3f677fffd5dfb85be40a80f4c7d34d3c 100644 --- a/display_server/drivers/hal/base/src/timestamp.cpp +++ b/display_server/drivers/hal/base/src/timestamp.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/BUILD.gn b/display_server/drivers/hal/drm_backend/BUILD.gn index 203b33e36c7b1f9564b293000db111a0ea5f7ec7..e5ba22fe778c2f3e2245c70b545b7be6af2e67e3 100644 --- a/display_server/drivers/hal/drm_backend/BUILD.gn +++ b/display_server/drivers/hal/drm_backend/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/BUILD.gn b/display_server/drivers/hal/drm_backend/display_device/BUILD.gn index 48ea1fdc77c5e24660053c4cb4a5764b86d9db91..44acd008ed796344e6925a1634842558f10fa603 100644 --- a/display_server/drivers/hal/drm_backend/display_device/BUILD.gn +++ b/display_server/drivers/hal/drm_backend/display_device/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Technologies 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 @@ -41,10 +41,7 @@ ft_shared_library("display_device") { "hdi_session.cpp", ] - configs = [ - "//build/gn/configs/system_libs:ipc_core_config", - "//display_server/drivers/hal:hal_public_config", - ] + configs = [ "//display_server/drivers/hal:hal_public_config" ] public_configs = [ ":display_device_public_config", "//display_server/drivers/hal/drm_backend:import_system_gbm_config" @@ -53,9 +50,10 @@ ft_shared_library("display_device") { public_deps = [ "//display_server/drivers/hal/drm_backend:display_drm_dep", "//display_server/drivers/hal/base:hal_base", + "//display_server/utils/sync_fence/ft_build:sync_fence", ] deps = [ - "//display_server/utils/sync_fence/ft_build:sync_fence", + "//build/gn/configs/system_libs:ipc_core", ] } diff --git a/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.cpp b/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.cpp index 592f0fcb10cda38153997eb3b2681996ab191ea1..68037ab993945fde4d9d7ad796c07175bbaf63e9 100644 --- a/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.h b/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.h index 51386d3c4d72d4af4f5160d7432e1483e5ffea35..1da7a03c8e3ffb07c6dd35cb4def8473cda545eb 100644 --- a/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.h +++ b/display_server/drivers/hal/drm_backend/display_device/device_event_monitor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.cpp index 025154f4d651b61be301338f7837ea3813ed6e2a..0c8adf4d778ff6179508c7f3f1ec58b2b6b79eee 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.h b/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.h index 852fd153722bb02669ae3dca51dac84ca63fe553..a2c467e6352164ef4c2c9ef87c9665783b289330 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_atomic_committer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_common.h b/display_server/drivers/hal/drm_backend/display_device/drm_common.h index 0a64ec0c171729e1b4ebd46bccda1341ec9d9447..3638d6058aa115fde3ad348505786cee43c1d61a 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_common.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -20,7 +20,7 @@ #include #include -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "types.h" namespace oewm { diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_connector.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_connector.cpp index 3137808bcff53dc0979d12a0c08f314d77c78642..895a35b74e275b8587a3e9e7d2b4b0c229af81bd 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_connector.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_connector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_connector.h b/display_server/drivers/hal/drm_backend/display_device/drm_connector.h index db242f3813a7415ff478765dd6b023f606515426..233a0803d8574cafdccbd4b1f751cda78c21d7b3 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_connector.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_connector.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_crtc.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_crtc.cpp index 2368336fd92a87647bcd930f3b14e1330e8442db..b1099cd77ca6cced5f08de9fe0b4fe657e61076b 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_crtc.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_crtc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_crtc.h b/display_server/drivers/hal/drm_backend/display_device/drm_crtc.h index 7efbd46c01a97669e8da284d95a412e334f349f1..82c76348294ce317d7bbb521692cbcea9d315917 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_crtc.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_crtc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -15,7 +15,7 @@ #pragma once -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "drm_common.h" #include "drm_property.h" #include "hdi_display.h" diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_device.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_device.cpp index 4666672444e819f1539243ec4dbc4c5ce783fedb..327b6e6d3b985693f4f536ddc72ba381cbf2d6a3 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_device.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_device.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_device.h b/display_server/drivers/hal/drm_backend/display_device/drm_device.h index 0e2e2be06f010d93d07662278c8d8c292fdf31c1..bb1365d67f8e8b3dc13c45edc0a92a2d817ca81e 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_device.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_device.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_display.h b/display_server/drivers/hal/drm_backend/display_device/drm_display.h index 1a320106b3a18f39e7b98eb4d3cb9e31f759af64..40ac4ece644ecae260939d3010a620714b8cf780 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_display.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_display.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_encoder.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_encoder.cpp index 3552715e8d75f991eb220724ac974562ece7c537..a051af7653c2940068bc409b3190b1818ba3df9c 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_encoder.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_encoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_encoder.h b/display_server/drivers/hal/drm_backend/display_device/drm_encoder.h index ab566e073663de36f4f550d1b9fadb7a133888ab..2671b84793ed284e9536236cb475a9136d07aee3 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_encoder.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_encoder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -15,7 +15,7 @@ #pragma once -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "drm_common.h" #include "drm_crtc.h" diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.cpp index 85d65bcb3538e5cdb17d0398e804009f9aa021d6..56b538ae3cca9282715abfeba2d4df21684c4874 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.h b/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.h index 1efd184c0e49567a8cfa8310596e3bce62f2e3aa..6cee6d9acdb7548c441d3e83bcdeabee07d285ed 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_frame_buffer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_layer.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_layer.cpp index e14b04ad086f0c7eda8c8cbf491617e31c294166..b47d15407116470845a075db4f73c0ef1e1fe56e 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_layer.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_layer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_layer.h b/display_server/drivers/hal/drm_backend/display_device/drm_layer.h index 6e370fe678eace3ef129e31648d13e9c10bd8c26..9a91cdc6871b02834df85d15de01212767ffd7ac 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_layer.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_layer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.cpp index 0362ac540edd65ba1a48699c8c2afa30bd264bbf..72bbc1a84f500af0ea5f53a54fe73c97a7853cee 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.h b/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.h index 8e20a44ed2d401d705fe36c8ef9c6003420482ca..055aadb315ed5d3309d217e9ff0da8b8cc1b5b83 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_mode_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -15,7 +15,7 @@ #pragma once -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "display_type.h" #include "drm_common.h" diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_plane.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_plane.cpp index 485129fe40ed278f007d216767bcd3f1877e6620..0c64842c11af80934de7f0ec0014e78bed48538a 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_plane.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_plane.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_plane.h b/display_server/drivers/hal/drm_backend/display_device/drm_plane.h index 35c396162c1cee99ee99b1f2e7627ef8edb02a60..49a258123c8409885748f66a82c9595554e392d0 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_plane.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_plane.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -15,7 +15,7 @@ #pragma once -#include "noncopyable.h" +#include "noncopyable_hal.h" #include "drm_common.h" #include "drm_property.h" diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_property.cpp b/display_server/drivers/hal/drm_backend/display_device/drm_property.cpp index a50fc7b44351bf3ad97c12192b91e93076f13ede..541f65e1cd27f71dc6bfe5beab58bbfd3a1c7881 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_property.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/drm_property.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/drm_property.h b/display_server/drivers/hal/drm_backend/display_device/drm_property.h index c940a416ccf8161b926c223793fdf9ef7f69ed02..1a351f0ae69bd3abb4eccd2d1244fcf0f729a064 100644 --- a/display_server/drivers/hal/drm_backend/display_device/drm_property.h +++ b/display_server/drivers/hal/drm_backend/display_device/drm_property.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp b/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp index fd7f1e5c411420c185efc60aacf50b497d71a60e..18adad65300748471d2f1a461e6fa04c78a9c566 100644 --- a/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/hdi_layer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/hdi_layer.h b/display_server/drivers/hal/drm_backend/display_device/hdi_layer.h index ee1de049fc9375025f5b47d79aa072a4ae5f7a1a..291c922fb862a6690eb47e2c08669477cdc323b0 100644 --- a/display_server/drivers/hal/drm_backend/display_device/hdi_layer.h +++ b/display_server/drivers/hal/drm_backend/display_device/hdi_layer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Technologies 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 @@ -21,7 +21,7 @@ #include "unique_fd.h" #include "buffer_handle.h" #include "display_type.h" -#include "noncopyable.h" +#include "noncopyable_hal.h" namespace oewm { namespace HDI { diff --git a/display_server/drivers/hal/drm_backend/display_device/hdi_session.cpp b/display_server/drivers/hal/drm_backend/display_device/hdi_session.cpp index a839a5dda416560c160ae4db035a019bfa9e9d8f..0545acaef1ba35dc37948ebead968b45958e187b 100644 --- a/display_server/drivers/hal/drm_backend/display_device/hdi_session.cpp +++ b/display_server/drivers/hal/drm_backend/display_device/hdi_session.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/hdi_session.h b/display_server/drivers/hal/drm_backend/display_device/hdi_session.h index 716c4a9bfc0f851ecd55d43345ae9c7fcdf97ceb..ef5bf7d7e3626175882d327966a7f33ae9d4fc7e 100644 --- a/display_server/drivers/hal/drm_backend/display_device/hdi_session.h +++ b/display_server/drivers/hal/drm_backend/display_device/hdi_session.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_device/udev_object_helper.h b/display_server/drivers/hal/drm_backend/display_device/udev_object_helper.h index 3adbc7d3bc6ef4976627ba57333ddcdd87f17aae..7e388c0ccf8d5659c6ae5e2f5c48494e21460ab8 100644 --- a/display_server/drivers/hal/drm_backend/display_device/udev_object_helper.h +++ b/display_server/drivers/hal/drm_backend/display_device/udev_object_helper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/BUILD.gn b/display_server/drivers/hal/drm_backend/display_gralloc/BUILD.gn index 5e7ca58ac52dfabd222492ca84343b3645f41724..c962b325645f40319868c3c44dc26a7b1ec97b33 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/BUILD.gn +++ b/display_server/drivers/hal/drm_backend/display_gralloc/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2022 Huawei Device Co., Ltd. +# Copyright (c) 2022 Huawei Technologies 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 @@ -46,9 +46,7 @@ ft_shared_library("display_gralloc") { public_deps = [ "//display_server/drivers/hal/drm_backend:display_drm_dep", - "//display_server/drivers/hal/base:hal_base" - ] - deps = [ + "//display_server/drivers/hal/base:hal_base", "//display_server/drivers/hal/drm_backend/display_device:display_device", ] } diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/allocator.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/allocator.cpp index 1afc5fb851d5ffe80267213f624d6f0698e0e2da..399faadc77aeccacc172e0c302c1ba05003fd692 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/allocator.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/allocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/allocator.h b/display_server/drivers/hal/drm_backend/display_gralloc/allocator.h index 90c527375bb56fe7c043cef879fdb98897cc9b1d..b566893b4033ad3a623eada125f86438067f7f23 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/allocator.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/allocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.cpp index 9bb9f4311add27ed372ac6b30efe3918690a4735..3e8d1e1f1be73d47268cb64d74b104a04fd1b80e 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.cpp @@ -58,9 +58,12 @@ std::shared_ptr AllocatorController::GetAllocator(uint64_t usage) // * DRM: Dumb Buffer for CPU Rendering (when usage include `CPU_WRITE`) // * GBM: Smart Buffer for GPU Rendering (other case) if (usage & HBM_USE_MEM_DMA) { - if (usage & HBM_USE_CPU_WRITE) { + if ((usage & HBM_USE_CPU_WRITE) && (usage & HBM_USE_MEM_FB)) { LOG_DEBUG("[Gralloc::AllocatorController::GetAllocator] Choose Dumb Allocator."); return dumbAllocator_; + } else if (usage & HBM_USE_CPU_WRITE) { + LOG_ERROR("[Gralloc::AllocatorController::GetAllocator] DRM Backend not support CPU_WRITE flag without FB flag."); + return nullptr; } else { #ifdef DRM_BACKEND_USE_GBM LOG_DEBUG("[Gralloc::AllocatorController::GetAllocator] Choose GBM Allocator."); @@ -73,7 +76,8 @@ std::shared_ptr AllocatorController::GetAllocator(uint64_t usage) } // If user need CPU buffer for CPU Rendering, we will provide shared memory. - if (!(usage & HBM_USE_MEM_DMA) && (usage & HBM_USE_CPU_WRITE)) { + if (!(usage & HBM_USE_MEM_FB) && (usage & HBM_USE_CPU_WRITE)) { + LOG_DEBUG("[Gralloc::AllocatorController::GetAllocator] Choose Shm Allocator."); return shmAllocator_; } diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.h b/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.h index 962436e35583c058c3e06292ebe48a6ab7e51ee2..db129d5d852367bdb61db6fb0cd7bff5172e48dc 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/allocator_controller.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc.cpp index 564b37a2ad6f909c33fd0bdd0f95316aed41718d..e2b6e76264601fab09051bec952f03d75a05867a 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.cpp index 9f17e51ada31fff97802d43f2bd1e631bfd32b64..8ed65775b5a4e52fc97df77eb1a50aad9b4ef8c4 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.h b/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.h index be4302c427da7b34b40371a73fc87e313b33783d..15dc875b4c836e86d1229f1267616a1f1cdccb27 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/display_gralloc_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp index 4151108a9444d37a4ddb4d35b0e6c89854533e07..75226d8e64c963d2a4036a6f3c78a6ad7c06bbbb 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -38,6 +38,8 @@ namespace DISPLAY { int32_t DumbAllocator::Init() { + LOG_DEBUG("[Gralloc::DumbAllocator::Init] Initing..."); + // Get DRM fd from HDI Session int drmFd = GrallocUtils::GetDrmFdFromSession(); if (IsInvalidFd(drmFd)) { @@ -54,6 +56,8 @@ int32_t DumbAllocator::Init() // } // drmFd_ = newFd; + LOG_DEBUG("[Gralloc::DumbAllocator::Init] Init done."); + return DISPLAY_SUCCESS; } @@ -182,7 +186,7 @@ void *DumbAllocator::Mmap(BufferHandle &buffer) } /* Prepare buffer for mmap */ - LOG_DEBUG("[Gralloc::DumbAllocator::Mmap] prepare buffer for mmap"); + LOG_DEBUG("[Gralloc::DumbAllocator::Mmap] prepare buffer for mmap. handle = %{public}u", handle); struct drm_mode_map_dumb map {}; map.handle = handle; if (drmIoctl(drmFd_, DRM_IOCTL_MODE_MAP_DUMB, &map) != 0) { diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.h b/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.h index af36a1a16ef9425c1b37647d17ba6979712ff58a..1444a2595699ac07f6aa87c1bca69bee68be124d 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/dumb_allocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.cpp index 949de1d74a64275d744b488c836fbd7264c669f0..6b81bbf39085a12cfbfeb657669f6f501ba2d8fe 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.h b/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.h index 3db681e79d7ea5f28ac3f346936292d2f6931d95..2d470d4a6c0d01613ed3b5d39422f90d6035b6d8 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/gbm_allocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp index f95c9ad0b491334c7988597295c22ec642659ed8..78ab398a35ef9483d050d194048fb9221dd786c7 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.h b/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.h index a6f98b901c87fd943f8c7dbea2b3173144250c8c..8c577eda9abf7b477b9a50a1d37ed3c81a7756c7 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/hi_drm_format.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.cpp index 7c785e0e828ccd328b8b12c561e74cf14e6a17a1..dbc2f287f2a1d765e791645585fdfda6814e43be 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.h b/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.h index d2a531740fa1591af96489dbf29de5c62eec9bb3..e3a8b21ea88639d4b7ef8def519e1626585003a2 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/hi_gbm_format.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.cpp b/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.cpp index ee979b7f97bac572d677f91d31a772ddd0160993..f370f1b2d45437ad1ae1bb2bea8d71d578ff21a4 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.cpp +++ b/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 @@ -28,7 +28,7 @@ namespace oewm { namespace HDI { namespace DISPLAY { -#define RANDNAME_PATTERN "/oewm-shm-XXXXXX" +#define RANDNAME_PATTERN "/ft-shm-XXXXXX" int32_t ShmAllocator::AllocMem(const AllocInfo &info, BufferHandle **bufferPtr) { @@ -152,14 +152,14 @@ int32_t ShmAllocator::FlushCache(BufferHandle &buffer) { // TODO: FlushCache is not supported yet. UNUSED(buffer); - return DISPLAY_FAILURE; + return DISPLAY_SUCCESS; } int32_t ShmAllocator::InvalidateCache(BufferHandle &buffer) { // TODO: InvalidateCache is not supported yet. UNUSED(buffer); - return DISPLAY_FAILURE; + return DISPLAY_SUCCESS; } void ShmAllocator::Randname(char *buf) @@ -177,7 +177,7 @@ int ShmAllocator::ExclShmOpen(char *name) { int retries = 100; do { - Randname(name + strlen(RANDNAME_PATTERN) - 6); + Randname(name + (strlen(RANDNAME_PATTERN) - 6)); --retries; // CLOEXEC is guaranteed to be set by shm_open diff --git a/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.h b/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.h index f31bd1c438fc75a7cdffbde2e3c4420285b62ede..a0654f6ff230490ced798098de41efb11c6db822 100644 --- a/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.h +++ b/display_server/drivers/hal/drm_backend/display_gralloc/shm_allocator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Technologies 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 diff --git a/display_server/drivers/hal/test/BUILD.gn b/display_server/drivers/hal/test/BUILD.gn index b78bd5cb1893b8ffdcfbbb991f17b58e6fd51d5a..c4dc77158035ceaf8fd1c09eefbaa2097cfde356 100644 --- a/display_server/drivers/hal/test/BUILD.gn +++ b/display_server/drivers/hal/test/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Huawei Device Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 @@ -14,20 +14,21 @@ import("//build/gn/fangtian.gni") ft_executable("drm_backend_test") { - testonly = true + testonly = true - sources = [ - "system_test/main.cpp" - ] + sources = [ + "system_test/main.cpp" + ] - deps = [ - "//display_server/drivers/hal/drm_backend:drm_backend", - "//display_server/drivers/hal/base:hal_base", - "//display_server/utils/sync_fence/ft_build:sync_fence", - ] + deps = [ + "//display_server/drivers/hal/drm_backend:drm_backend", + "//display_server/drivers/hal/base:hal_base", + "//display_server/utils/sync_fence/ft_build:sync_fence", - configs = [ - "//build/gn/configs/system_libs:ipc_core_config", - "//display_server/drivers/hal:hal_public_config" - ] + "//build/gn/configs/system_libs:ipc_core", + ] + + configs = [ + "//display_server/drivers/hal:hal_public_config" + ] } diff --git a/display_server/drivers/hal/test/system_test/main.cpp b/display_server/drivers/hal/test/system_test/main.cpp index 785bc8d3c884aadb77b5e1d74bacf05f690db621..5dd0cea7334cf3a4420ed1e95f868f751e547dfd 100644 --- a/display_server/drivers/hal/test/system_test/main.cpp +++ b/display_server/drivers/hal/test/system_test/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Technologies 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 diff --git a/display_server/drivers/hdi_service/gralloc/client/BUILD.gn b/display_server/drivers/hdi_service/gralloc/client/BUILD.gn index cb5a0331c57568823b3de1e4ce439b57e0436e6d..5268a4f56aa331a6c7f6b5114e54c5f838b2979d 100755 --- a/display_server/drivers/hdi_service/gralloc/client/BUILD.gn +++ b/display_server/drivers/hdi_service/gralloc/client/BUILD.gn @@ -20,23 +20,13 @@ config("gralloc_client_public_config") { ] } -declare_args() { - drivers_peripheral_display_hdi_gralloc_client = - ":libhdi_display_gralloc_client" -} - group("hdi_gralloc_client") { - deps = [ drivers_peripheral_display_hdi_gralloc_client ] + public_deps = [ ":libhdi_display_gralloc_client" ] public_configs = [ ":gralloc_client_public_config" ] } ft_shared_library("libhdi_display_gralloc_client") { - configs = [ - ":gralloc_client_public_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:c_utils_config", - ] + configs = [ ":gralloc_client_public_config" ] sources = [ "allocator_adapter.cpp", @@ -49,6 +39,9 @@ ft_shared_library("libhdi_display_gralloc_client") { ] deps = [ - "//display_server/utils/buffer_handle/ft_build:buffer_handle" + "//display_server/utils/buffer_handle/ft_build:buffer_handle", + + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:ipc_core", ] } diff --git a/display_server/drivers/hdi_service/gralloc/client/mapper_adapter.cpp b/display_server/drivers/hdi_service/gralloc/client/mapper_adapter.cpp index 960bc515b35316164b004a28915f4383cf51712d..7753e5076220f9766420919506ed59e61433eb10 100644 --- a/display_server/drivers/hdi_service/gralloc/client/mapper_adapter.cpp +++ b/display_server/drivers/hdi_service/gralloc/client/mapper_adapter.cpp @@ -44,9 +44,11 @@ bool MapperAdapter::IsReady() const int32_t MapperAdapter::MapBuffer(const BufferHandle& handle, void*& outData) const { - int32_t ret = 0; outData = mapperFuncs_->Mmap(const_cast(&handle)); - return ret; + if (outData == nullptr) { + return DISPLAY_FAILURE; + } + return DISPLAY_SUCCESS; } int32_t MapperAdapter::UnmapBuffer(const BufferHandle& handle) const diff --git a/display_server/frameworks/surface/ft_build/BUILD.gn b/display_server/frameworks/surface/ft_build/BUILD.gn index 354bb306b11c12c8ec8fbf4a21501aff009be7b6..e639b0b6a96efed70f49de60640307243b8ff52f 100644 --- a/display_server/frameworks/surface/ft_build/BUILD.gn +++ b/display_server/frameworks/surface/ft_build/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") config("surface_config") { visibility = [ ":*" ] @@ -24,22 +24,18 @@ config("surface_config") { "-Wno-error=deprecated-declarations", "-Wno-c++11-narrowing", ] +} +config("surface_public_config") { include_dirs = [ "../include", "$display_server_root/interfaces/inner_api/surface", "$display_server_root/interfaces/inner_api/common", "$display_server_root/utils/sandbox", "$display_server_root/utils/buffer_handle/export", - "mock", ] - defines = [] - if (enable_gpu) { - defines = [ "ACE_ENABLE_GPU" ] - } - defines += gpu_defines - + defines = gpu_defines } ft_shared_library("surface") { @@ -60,23 +56,21 @@ ft_shared_library("surface") { "../src/surface_delegate.cpp", "../src/surface_tunnel_handle.cpp", "../src/surface_utils.cpp", - "mock/display_gralloc_client.cpp", ] configs = [ ":surface_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:hitrace_meter_config", ] + public_configs = [ ":surface_public_config" ] - - deps = [ - "$display_server_root/utils/sync_fence/ft_build:sync_fence", - "$display_server_root/utils/buffer_handle/ft_build:buffer_handle", - "$display_server_root/utils/sandbox/ft_build:sandbox_utils", - "$display_server_root/utils/scoped_bytrace/ft_build:scoped_bytrace", + deps = [ + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:hitrace_meter", + ] + public_deps = [ + "$display_server_root/utils/ft_build:libgraphic_utils", + "$display_server_root/drivers/hdi_service/gralloc/client:hdi_gralloc_client" ] } diff --git a/display_server/frameworks/surface/ft_build/mock/display_gralloc_client.cpp b/display_server/frameworks/surface/ft_build/mock/display_gralloc_client.cpp deleted file mode 100644 index 82236b1281a7467416a84319dd288d244e4a48dd..0000000000000000000000000000000000000000 --- a/display_server/frameworks/surface/ft_build/mock/display_gralloc_client.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include "idisplay_gralloc.h" - -namespace OHOS { -namespace HDI { -namespace Display { -namespace V1_0 { -IDisplayGralloc *IDisplayGralloc::Get(){ - return nullptr; -} -} -} -} -} diff --git a/display_server/frameworks/surface/ft_build/mock/idisplay_gralloc.h b/display_server/frameworks/surface/ft_build/mock/idisplay_gralloc.h deleted file mode 100644 index 7eb39652ac1a522d8d7a96917b168f8b80cf416d..0000000000000000000000000000000000000000 --- a/display_server/frameworks/surface/ft_build/mock/idisplay_gralloc.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2021 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. - */ - -#ifndef HDI_IDISPLAY_GRALLOC_V1_0_H -#define HDI_IDISPLAY_GRALLOC_V1_0_H - -#include -#include "display_type.h" -#include "buffer_handle.h" - -namespace OHOS { -namespace HDI { -namespace Display { -namespace V1_0 { -using AllocatorDeathCallback = void (*)(void *); -class IDisplayGralloc { -public: - virtual ~IDisplayGralloc() = default; - - virtual int32_t RegAllocatorDeathCallback(AllocatorDeathCallback func, void* data) = 0; - - /** - * @brief Obtains all interfaces of IDisplayGralloc. - * - * @return Returns IDisplayGralloc* if the operation is successful; returns an null point otherwise. - * @since 1.0 - * @version 1.0 - */ - static IDisplayGralloc* Get(); - - /** - * @brief Allocates memory based on the parameters passed by the GUI. - * - * @param info Indicates the description of the memory to allocate. - * - * @param handle Indicates the pointer to the buffer of the memory to allocate. - * - * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} - * otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual int32_t AllocMem(const AllocInfo &info, BufferHandle *&handle) const = 0; - - /** - * @brief Releases memory. - * - * @param handle Indicates the reference to the buffer of the memory to release. - * - * @since 1.0 - * @version 1.0 - */ - virtual void FreeMem(const BufferHandle &handle) const = 0; - - /** - * @brief Maps memory to memory without cache in the process's address space. - * - * @param handle Indicates the reference to the buffer of the memory to map. - * - * @return Returns the pointer to a valid address if the operation is successful; returns NULL otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual void *Mmap(const BufferHandle &handle) const = 0; - - /** - * @brief Maps memory to memory with cache in the process's address space. - * - * @param handle Indicates the reference to the buffer of the memory to map. - * - * @return Returns the pointer to a valid address if the operation is successful; returns NULL otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual void *MmapCache(const BufferHandle &buffer) const = 0; - - /** - * @brief Unmaps memory, that is, removes mappings from the process's address space. - * - * @param handle Indicates the reference to the buffer of the memory to unmap. - * - * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} - * otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual int32_t Unmap(const BufferHandle &handle) const = 0; - - /** - * @brief Flushes data from the cache to memory and invalidates the data in the cache. - * - * @param handle Indicates the reference to the buffer of the cache to flush. - * - * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} - * otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual int32_t FlushCache(const BufferHandle &handle) const = 0; - - /** - * @brief Flushes data from the cache mapped via {@link Mmap} to memory and invalidates the data in the cache. - * - * @param handle Indicates the reference to the buffer of the cache to flush. - * - * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} - * otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual int32_t FlushMCache(const BufferHandle &buffer) const = 0; - - /** - * @brief Invalidates the cache to update it from memory. - * - * @param handle Indicates the reference to the buffer of the cache, which will be invalidated. - * - * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} - * otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual int32_t InvalidateCache(const BufferHandle &handle) const = 0; - - /** - * @brief Checks whether the given VerifyAllocInfo array is allocatable. - * - * @param infos Indicates the VerifyAllocInfo array. - * @param supporteds Indicates whether the array is allocatable. - * - * @return Returns 0 if the operation is successful; returns an error code defined in {@link DispErrCode} - * otherwise. - * @since 1.0 - * @version 1.0 - */ - virtual int32_t IsSupportedAlloc(const std::vector &infos, - std::vector &supporteds) const = 0; -}; -} // namespace V1_0 -} // namespace Display -} // namespace HDI -} // namespace OHOS - -#endif // HDI_IDISPLAY_GRALLOC_V1_0_H diff --git a/display_server/frameworks/surface/src/buffer_queue.cpp b/display_server/frameworks/surface/src/buffer_queue.cpp index fb90a4b558ebd539f730abc0ace44d82d6c4c55e..c2af3863093a1ba97ae1a692be2a2aeb16fdd952 100644 --- a/display_server/frameworks/surface/src/buffer_queue.cpp +++ b/display_server/frameworks/surface/src/buffer_queue.cpp @@ -397,7 +397,7 @@ GSError BufferQueue::FlushBuffer(uint32_t sequence, const sptr void BufferQueue::DumpToFile(uint32_t sequence) { - if (access("/data/bq_dump", F_OK) == -1) { + if (access("/tmp/bq_enable_dump", F_OK) == -1) { return; } @@ -408,7 +408,7 @@ void BufferQueue::DumpToFile(uint32_t sequence) int64_t nowVal = (int64_t)now.tv_sec * secToUsec + (int64_t)now.tv_usec; std::stringstream ss; - ss << "/data/bq_" << GetRealPid() << "_" << name_ << "_" << nowVal << ".raw"; + ss << "/tmp/bq_dumps/bq_" << GetRealPid() << "_" << name_ << "_" << nowVal << ".raw"; sptr& buffer = bufferQueueCache_[sequence].buffer; std::ofstream rawDataFile(ss.str(), std::ofstream::binary); @@ -418,6 +418,8 @@ void BufferQueue::DumpToFile(uint32_t sequence) } rawDataFile.write(static_cast(buffer->GetVirAddr()), buffer->GetSize()); rawDataFile.close(); + + BLOGND("DumpToFile: %{public}s", ss.str().c_str()); } GSError BufferQueue::DoFlushBuffer(uint32_t sequence, const sptr &bedata, diff --git a/display_server/frameworks/surface/test/ft_build/BUILD.gn b/display_server/frameworks/surface/test/ft_build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..e33a59d846f3d50d12e2750ffceffbd844cd0c54 --- /dev/null +++ b/display_server/frameworks/surface/test/ft_build/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright (c) 2023 Huawei Technologies 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/gn/fangtian.gni") + +group("test") { + testonly = true + + deps = [ + ":native_window_buffer_test_oe", + ] +} + +ft_executable("native_window_buffer_test_oe") { + testonly = true + + sources = [ "../systemtest/native_window_buffer_test_oe.cpp" ] + + cflags = [ + "-Wall", + "-Werror", + "-g3", + "-Dprivate=public", + "-Dprotected=public", + ] + + deps = [ + "//display_server/frameworks/surface/ft_build:surface", + "//display_server/utils/sync_fence/ft_build:sync_fence", + + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:samgr", + ] +} \ No newline at end of file diff --git a/display_server/frameworks/surface/test/systemtest/native_window_buffer_test_oe.cpp b/display_server/frameworks/surface/test/systemtest/native_window_buffer_test_oe.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a580eddfc7ec4cc78c335838886bd8067e23ede9 --- /dev/null +++ b/display_server/frameworks/surface/test/systemtest/native_window_buffer_test_oe.cpp @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2021 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "external_window.h" + +using namespace OHOS::HiviewDFX; + +namespace OHOS::Rosen { +class NativeWindowBufferTest : public IBufferConsumerListenerClazz { +public: + static void SetUpTestCase(); + void OnBufferAvailable() override; + int32_t SetData(NativeWindowBuffer *nativeWindowBuffer, NativeWindow *nativeWindow); + bool GetData(sptr &buffer); + pid_t ChildProcessMain(); + + void DoTest(); + + static inline sptr cSurface = nullptr; + static inline int32_t pipeFd[2] = {}; + static inline int32_t ipcSystemAbilityID = 34156; +}; + +void NativeWindowBufferTest::SetUpTestCase() {} + +void NativeWindowBufferTest::OnBufferAvailable() {} + +int32_t NativeWindowBufferTest::SetData(NativeWindowBuffer *nativeWindowBuffer, NativeWindow *nativeWindow) +{ + nativeWindowBuffer->sfbuffer->GetExtraData()->ExtraSet("123", 0x123); + nativeWindowBuffer->sfbuffer->GetExtraData()->ExtraSet("345", (int64_t)0x345); + nativeWindowBuffer->sfbuffer->GetExtraData()->ExtraSet("567", "567"); + + // alloc OHExtDataHandle + uint32_t reserveInts = 1; + size_t handleSize = sizeof(OHExtDataHandle) + (sizeof(int32_t) * reserveInts); + OHExtDataHandle *handle = static_cast(malloc(handleSize)); + if (handle == nullptr) { + return -1; + } + int32_t ret = memset_s(handle, handleSize, 0, handleSize); + if (ret != EOK) { + return -1; + } + handle->fd = -1; + handle->reserveInts = reserveInts; + for (uint32_t i = 0; i < reserveInts; i++) { + handle->reserve[i] = 1; + } + + ret = OH_NativeWindow_NativeWindowSetTunnelHandle(nativeWindow, handle); + // free OHExtDataHandle + if (handle->fd >= 0) { + close(handle->fd); + handle->fd = -1; + } + free(handle); + handle = nullptr; + return ret; +} + +bool NativeWindowBufferTest::GetData(sptr &buffer) +{ + int32_t int32; + int64_t int64; + std::string str; + buffer->GetExtraData()->ExtraGet("123", int32); + buffer->GetExtraData()->ExtraGet("345", int64); + buffer->GetExtraData()->ExtraGet("567", str); + if ((int32 != 0x123) || (int64 != 0x345) || (str != "567")) { + return false; + } + + sptr handleGet = nullptr; + handleGet = cSurface->GetTunnelHandle(); + if ((handleGet == nullptr) || (handleGet->GetHandle()->fd != -1) || + (handleGet->GetHandle()->reserveInts != 1) || (handleGet->GetHandle()->reserve[0] != 1)) { + return false; + } + return true; +} + +pid_t NativeWindowBufferTest::ChildProcessMain() +{ + pipe(pipeFd); + pid_t pid = fork(); + if (pid != 0) { + return pid; + } + + int64_t data; + read(pipeFd[0], &data, sizeof(data)); + + sptr robj = nullptr; + while (true) { + auto sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); + robj = sam->GetSystemAbility(ipcSystemAbilityID); + if (robj != nullptr) { + break; + } + sleep(0); + } + + auto producer = iface_cast(robj); + sptr pSurface = Surface::CreateSurfaceAsProducer(producer); + + struct NativeWindow *nativeWindow = OH_NativeWindow_CreateNativeWindow(&pSurface); + struct NativeWindowBuffer *nativeWindowBuffer = nullptr; + + int code = SET_USAGE; + uint64_t usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE | BUFFER_USAGE_MEM_DMA; + OH_NativeWindow_NativeWindowHandleOpt(nativeWindow, code, usage); + + code = SET_BUFFER_GEOMETRY; + int32_t height = 0x100; + int32_t width = 0x100; + OH_NativeWindow_NativeWindowHandleOpt(nativeWindow, code, height, width); + + code = SET_FORMAT; + int32_t format = GRAPHIC_PIXEL_FMT_RGBA_8888; + OH_NativeWindow_NativeWindowHandleOpt(nativeWindow, code, format); + + code = SET_STRIDE; + int32_t stride = 0x8; + OH_NativeWindow_NativeWindowHandleOpt(nativeWindow, code, stride); + + int32_t fenceFd = -1; + auto ret = OH_NativeWindow_NativeWindowRequestBuffer(nativeWindow, &nativeWindowBuffer, &fenceFd); + if (ret != OHOS::GSERROR_OK) { + data = ret; + write(pipeFd[1], &data, sizeof(data)); + exit(0); + return -1; + } + ret = SetData(nativeWindowBuffer, nativeWindow); + if (ret != OHOS::GSERROR_OK) { + data = ret; + write(pipeFd[1], &data, sizeof(data)); + exit(0); + return -1; + } + + struct OHNativeWindowRegion *region = new OHNativeWindowRegion(); + struct OHNativeWindowRegion::Rect *rect = new OHNativeWindowRegion::Rect(); + rect->w = 0x100; + rect->h = 0x100; + region->rects = rect; + ret = OH_NativeWindow_NativeWindowFlushBuffer(nativeWindow, nativeWindowBuffer, -1, *region); + if (ret != OHOS::GSERROR_OK) { + data = ret; + write(pipeFd[1], &data, sizeof(data)); + exit(0); + return -1; + } + data = ret; + write(pipeFd[1], &data, sizeof(data)); + usleep(1000); // sleep 1000 microseconds (equals 1 milliseconds) + read(pipeFd[0], &data, sizeof(data)); + close(pipeFd[0]); + close(pipeFd[1]); + exit(0); + return 0; +} + +/* +* Function: produce and consumer surface of nativewindow +* Type: Function +* Rank: Important(2) +* EnvConditions: N/A +* CaseDescription: 1. produce surface by nativewindow interface, fill buffer +* 2. consume surface and check buffer +* @tc.require: issueI5GMZN issueI5IWHW + */ +void NativeWindowBufferTest::DoTest() +{ + auto pid = ChildProcessMain(); + assert(pid > 0); + + std::cout << "[-] Create Consumer Surface." << std::endl; + HiviewDFX::HiLog::Error({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Create Consumer Surface"); + cSurface = Surface::CreateSurfaceAsConsumer("test"); + cSurface->RegisterConsumerListener(this); + auto producer = cSurface->GetProducer(); + std::cout << "[-] Create Consumer Surface done." << std::endl; + + std::cout << "[-] Add SA." << std::endl; + HiviewDFX::HiLog::Error({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Add SA."); + auto sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); + sam->AddSystemAbility(ipcSystemAbilityID, producer->AsObject()); + std::cout << "[-] Add SA done." << std::endl; + + int64_t data = 0; + write(pipeFd[1], &data, sizeof(data)); + usleep(1000); // sleep 1000000 microseconds (equals 1 second) + read(pipeFd[0], &data, sizeof(data)); + assert(data == OHOS::GSERROR_OK); + + std::cout << "[-] Acquire Buffer." << std::endl; + HiviewDFX::HiLog::Info({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Acquire Buffer"); + OHOS::sptr buffer = nullptr; + int32_t fence = -1; + int64_t timestamp; + Rect damage; + auto ret = cSurface->AcquireBuffer(buffer, fence, timestamp, damage); + assert(ret == OHOS::GSERROR_OK); + assert(buffer != nullptr); + assert(GetData(buffer) == true); + std::cout << "[-] Acquire Buffer done." << std::endl; + + std::cout << "[-] Release Buffer." << std::endl; + HiviewDFX::HiLog::Info({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Release Buffer"); + ret = cSurface->ReleaseBuffer(buffer, -1); + assert(ret == OHOS::GSERROR_OK); + std::cout << "[-] Release Buffer done." << std::endl; + + write(pipeFd[1], &data, sizeof(data)); + close(pipeFd[0]); + close(pipeFd[1]); + + std::cout << "[-] Remove SA." << std::endl; + HiviewDFX::HiLog::Info({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Remove SA."); + sam->RemoveSystemAbility(ipcSystemAbilityID); + waitpid(pid, nullptr, 0); + std::cout << "[-] Remove SA done." << std::endl; +} +} + +int main() { + std::cout << "[-] Test Start." << std::endl; + OHOS::HiviewDFX::HiLog::Info({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Test Start."); + + auto tester = OHOS::Rosen::NativeWindowBufferTest(); + tester.DoTest(); + + std::cout << "[-] Test Done." << std::endl; + OHOS::HiviewDFX::HiLog::Info({ LOG_CORE, 0xC01400, "SurfaceTest" }, "Test Done."); +} diff --git a/display_server/ft_configs/ds_config.gni b/display_server/ft_build/BUILD.gn similarity index 53% rename from display_server/ft_configs/ds_config.gni rename to display_server/ft_build/BUILD.gn index 32b5fcad7eb20ba7540d47ec28eaaf52371d9c3a..eaa04252ed34064284d6520063f0414d57921d60 100644 --- a/display_server/ft_configs/ds_config.gni +++ b/display_server/ft_build/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Huawei Technologies Co., Ltd. +# Copyright (c) 2023 Huawei Technologies 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 @@ -11,23 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -declare_args() { - feature_enable_gpu = false +import("//build/gn/fangtian.gni") +import("ds_config.gni") + +group("libsurface") { + public_deps = [ "frameworks/surface:surface" ] } -if (feature_enable_gpu) { - enable_gpu = true - rs_enable_eglimage = true - gpu_defines = [ - "ACE_ENABLE_GL", - "RS_ENABLE_GL", - "RS_ENABLE_EGLIMAGE", - "RS_ENABLE_EGLQUERYSURFACE", - ] -} else { - enable_gpu = false - rs_enable_eglimage = false - gpu_defines = [] + +group("libfence") { + public_deps = [ "frameworks/fence:libfence" ] } -display_server_root = "//display_server" -rosen_root = "//display_server/rosen" +group("libgl") { + public_deps = libgl +} diff --git a/display_server/ft_build/ds_config.gni b/display_server/ft_build/ds_config.gni new file mode 100644 index 0000000000000000000000000000000000000000..60dc3dce3ed0e34c948ee0023df79a9502ca6194 --- /dev/null +++ b/display_server/ft_build/ds_config.gni @@ -0,0 +1,53 @@ +# Copyright (c) 2023 Huawei Technologies 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. + +declare_args() { + graphic_standard_feature_ace_enable_gpu = false + graphic_standard_feature_rs_enable_eglimage = false + graphic_standard_feature_rs_enable_uni_render = false + graphic_standard_feature_enable_afbc = false + rs_main_executable = false +} + +if (graphic_standard_feature_ace_enable_gpu) { + gpu_defines = [ + "ACE_ENABLE_GL", + "RS_ENABLE_GL", + ] + ds_enable_gpu = true +} else { + gpu_defines = [ "ACE_DISABLE_GL" ] + ds_enable_gpu = false +} + +if (graphic_standard_feature_rs_enable_eglimage) { + gpu_defines += [ + "RS_ENABLE_EGLIMAGE", + "RS_ENABLE_EGLQUERYSURFACE", + ] + rs_enable_eglimage = true +} else { + gpu_defines += [ "RS_DISABLE_EGLIMAGE" ] + rs_enable_eglimage = false +} + +if (graphic_standard_feature_rs_enable_uni_render) { + gpu_defines += [ "RS_ENABLE_UNI_RENDER" ] +} + +if (graphic_standard_feature_enable_afbc) { + gpu_defines += [ "RS_ENABLE_AFBC" ] +} + +display_server_root = "//display_server" +rosen_root = "//display_server/rosen" diff --git a/display_server/interfaces/inner_api/common/graphic_common.h b/display_server/interfaces/inner_api/common/graphic_common.h index ad2b97573f442668bf8905c21b5fe99d3933bc4a..8ea9ff0e25f65f7e48a31a4d689f90f1121a56ad 100644 --- a/display_server/interfaces/inner_api/common/graphic_common.h +++ b/display_server/interfaces/inner_api/common/graphic_common.h @@ -59,7 +59,7 @@ static const std::map GSErrorStrs = { static inline std::string LowErrorStrSpecial(GSError err) { if (err == LOWERROR_INVALID) { - char num[] = {err / 0x64 % 0xa, err / 0xa % 0xa, err % 0xa, 0}; // int to string (in 1000) + char num[] = {static_cast(err / 0x64 % 0xa), static_cast(err / 0xa % 0xa), static_cast(err % 0xa), 0}; // int to string (in 1000) return std::string("with low error <") + num + ">"; } else if (err == LOWERROR_FAILURE) { return "with low error "; diff --git a/display_server/rosen/modules/animation/window_animation/ft_build/BUILD.gn b/display_server/rosen/modules/animation/window_animation/ft_build/BUILD.gn index a349e50e3b73ca1c9d82238008615d4e4c66a2df..dbc75cea7a26e517358ed4e86a0391e5bb8c1ebd 100644 --- a/display_server/rosen/modules/animation/window_animation/ft_build/BUILD.gn +++ b/display_server/rosen/modules/animation/window_animation/ft_build/BUILD.gn @@ -12,9 +12,9 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") -config("window_animation_config") { +config("window_animation_public_config") { cflags = [ "-Wno-c++11-narrowing" ] include_dirs = [ @@ -33,16 +33,16 @@ ft_shared_library("window_animation") { "../src/rs_window_animation_target.cpp", ] - public_configs = [ ":window_animation_config" ] + public_configs = [ ":window_animation_public_config" ] cflags_cc = [ "-std=c++17" ] public_deps = [ "$display_server_root/rosen/modules/render_service_client/ft_build:librender_service_client" ] - configs = [ - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:skia_config", + deps = [ + "//build/gn/configs/system_libs:c_utils", + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:skia", ] } diff --git a/display_server/rosen/modules/composer/ft_build/BUILD.gn b/display_server/rosen/modules/composer/ft_build/BUILD.gn index 13804e5cf144bece7d92c5d4e049f96881897a51..bd8ab0774eb13c12d36ca4c9bcc137f34746c778 100644 --- a/display_server/rosen/modules/composer/ft_build/BUILD.gn +++ b/display_server/rosen/modules/composer/ft_build/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") config("composer_config") { visibility = [ ":*" ] @@ -54,32 +54,25 @@ ft_shared_library("libcomposer") { "$display_server_root/utils/log", ] - configs = [ - ":composer_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:c_utils_config", - ] + defines = gpu_defines - defines = [] - defines += gpu_defines + configs = [ ":composer_config" ] - public_configs = [ - ":composer_public_config", - ] + public_configs = [ ":composer_public_config" ] deps = [ - "$display_server_root/frameworks/surface/ft_build:surface", - "$display_server_root/rosen/modules/render_frame_trace/ft_build:render_frame_trace", - "$display_server_root/rosen/modules/render_service_base/ft_build:librender_service_base", + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:ipc_core", ] public_deps = [ "../vsync/ft_build:libvsync", + "$display_server_root/utils/buffer_handle/ft_build:buffer_handle", "$display_server_root/utils/scoped_bytrace/ft_build:scoped_bytrace", "$display_server_root/utils/sync_fence/ft_build:sync_fence", - "$display_server_root/drivers/hal/drm_backend/display_device:display_device", - "$display_server_root/drivers/hal/drm_backend/display_gralloc:display_gralloc", + "$display_server_root/drivers/hal/drm_backend:drm_backend", + "$display_server_root/frameworks/surface/ft_build:surface", + "$display_server_root/rosen/modules/render_frame_trace/ft_build:render_frame_trace", ] } \ No newline at end of file diff --git a/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn b/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn index c233ffec403906e1fcf680f698e752b951af6c22..79787c4e75c58abec6509069b6dae32fb9367e1d 100644 --- a/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn +++ b/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") config("vsync_config") { visibility = [ ":*" ] @@ -50,24 +50,21 @@ ft_shared_library("libvsync") { "../src/vsync_sampler.cpp", ] - configs = [ - ":vsync_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:hilog_config", - ] + configs = [ ":vsync_config" ] public_configs = [ ":vsync_public_config", ] deps = [ - "//display_server/utils/sandbox/ft_build:sandbox_utils", - "//display_server/utils/socketpair/ft_build:socketpair", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:hilog", ] public_deps = [ + "//display_server/utils/sandbox/ft_build:sandbox_utils", + "//display_server/utils/socketpair/ft_build:socketpair", "//display_server/utils/scoped_bytrace/ft_build:scoped_bytrace", ] } diff --git a/display_server/rosen/modules/composer/vsync/src/vsync_distributor.cpp b/display_server/rosen/modules/composer/vsync/src/vsync_distributor.cpp index 74734c3b0924e47a4057cc563223328e717e9d0b..af87314b4d172375a936bad63129755b7839191b 100644 --- a/display_server/rosen/modules/composer/vsync/src/vsync_distributor.cpp +++ b/display_server/rosen/modules/composer/vsync/src/vsync_distributor.cpp @@ -187,7 +187,10 @@ void VSyncDistributor::ThreadMain() continue; } } + ScopedBytrace func(name_ + "_SendVsync"); + VLOGI("VSyncDistributor::ThreadMain: Conns size: %{public}zu, timestamp: %{public}ld", conns.size(), timestamp); + for (uint32_t i = 0; i < conns.size(); i++) { int32_t ret = conns[i]->PostEvent(timestamp); VLOGD("Distributor name:%{public}s, connection name:%{public}s, ret:%{public}d", @@ -196,6 +199,7 @@ void VSyncDistributor::ThreadMain() RemoveConnection(conns[i]); } else if (ret == ERRNO_EAGAIN) { std::unique_lock locker(mutex_); + VLOGI("VSyncDistributor::ThreadMain: EAGAIN"); // Exclude SetVSyncRate if (conns[i]->rate_ < 0) { conns[i]->rate_ = 0; @@ -211,6 +215,7 @@ void VSyncDistributor::EnableVSync() vsyncEnabled_ = true; controller_->SetCallback(this); controller_->SetEnable(true); + VLOGI("Disable VSync."); } } diff --git a/display_server/rosen/modules/composer/vsync/src/vsync_sampler.cpp b/display_server/rosen/modules/composer/vsync/src/vsync_sampler.cpp index 3b222ed344545564f751c5e6c0e174a68f8f3130..815a8570c1b74f69d06b7ee9054d0de2a0672c87 100644 --- a/display_server/rosen/modules/composer/vsync/src/vsync_sampler.cpp +++ b/display_server/rosen/modules/composer/vsync/src/vsync_sampler.cpp @@ -81,6 +81,7 @@ void VSyncSampler::SetHardwareVSyncStatus(bool enabled) { std::lock_guard lock(mutex_); hardwareVSyncStatus_ = enabled; + VLOGI("VSyncSampler::SetHardwareVSyncStatus: enabled: %{public}d", enabled); } bool VSyncSampler::GetHardwareVSyncStatus() const diff --git a/display_server/rosen/modules/frame_analyzer/ft_build/BUILD.gn b/display_server/rosen/modules/frame_analyzer/ft_build/BUILD.gn index d85e407717d7e4a13ecc87f95ad51b7f5d726007..716d5038eb5e400825ea1669f434269bf5410176 100644 --- a/display_server/rosen/modules/frame_analyzer/ft_build/BUILD.gn +++ b/display_server/rosen/modules/frame_analyzer/ft_build/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") config("libframe_analyzer_config") { visibility = [ ":*" ] @@ -43,15 +43,16 @@ ft_shared_library("libframe_analyzer") { deps = [ "$display_server_root/utils/sandbox/ft_build:sandbox_utils", + + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:c_utils", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:syspara", ] configs = [ ":libframe_analyzer_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:syspara_config", ] public_configs = [ ":libframe_analyzer_public_config" ] diff --git a/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.cpp b/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.cpp index e858f53f8a883f7f7399d58ebb188e6c2cfb603b..bbebaea82b74d8c69b3c0d2693176b17b8e6d790 100644 --- a/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.cpp +++ b/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.cpp @@ -81,6 +81,15 @@ bool RSRenderService::Init() RS_LOGE("RSRenderService wait SAMGR error, return value [%d].", status); } +#ifdef RS_MAIN_EXECUTABLE + auto samgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); + if (samgr == nullptr) { + RS_LOGE("RSRenderService GetSystemAbilityManager fail."); + return false; + } + samgr->AddSystemAbility(RENDER_SERVICE, this); +#endif // RS_MAIN_EXECUTABLE + return true; } diff --git a/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.h b/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.h index 00c298c3bddebb260c9caa89bdd47cc2fcff8e9b..9b2f3bc93083039ec411fbae76879e78f321658c 100644 --- a/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.h +++ b/display_server/rosen/modules/render_service/core/pipeline/rs_render_service.h @@ -33,9 +33,19 @@ class RSSyncTask; class RSRenderServiceConnection; class RSRenderService : public SystemAbility, public RSRenderServiceStub { +#ifndef RS_MAIN_EXECUTABLE DECLARE_DELAYED_SINGLETON(RSRenderService); +#endif // RS_MAIN_EXECUTABLE DECLARE_SYSTEM_ABILITY(RSRenderService); public: +#ifdef RS_MAIN_EXECUTABLE + RSRenderService(); + ~RSRenderService() noexcept; + + RSRenderService(const RSRenderService&) = delete; + RSRenderService& operator=(const RSRenderService&) = delete; +#endif // RS_MAIN_EXECUTABLE + bool Init(); void Run(); diff --git a/display_server/rosen/modules/render_service/core/screen_manager/rs_screen.cpp b/display_server/rosen/modules/render_service/core/screen_manager/rs_screen.cpp index 6c2e1730dbf39a87e534da32cc5ba8a0e04be291..6ade5f3bf238dcb055aa319e5e66fb9d1729b252 100644 --- a/display_server/rosen/modules/render_service/core/screen_manager/rs_screen.cpp +++ b/display_server/rosen/modules/render_service/core/screen_manager/rs_screen.cpp @@ -298,7 +298,7 @@ void RSScreen::ModeInfoDump(std::string& dumpString) void RSScreen::CapabilityTypeDump(InterfaceType capabilityType, std::string& dumpString) { dumpString += "type="; - switch (capability_.type) { + switch (static_cast(capability_.type)) { case DISP_INTF_HDMI: { dumpString += "DISP_INTF_HDMI, "; break; @@ -347,7 +347,7 @@ void RSScreen::PropDump(std::string& dumpString) void RSScreen::PowerStatusDump(std::string& dumpString) { dumpString += "powerstatus="; - switch (powerStatus_) { + switch (static_cast(powerStatus_)) { case POWER_STATUS_ON: { dumpString += "POWER_STATUS_ON"; break; diff --git a/display_server/rosen/modules/render_service/ft_build/BUILD.gn b/display_server/rosen/modules/render_service/ft_build/BUILD.gn index c90b0b78e7490f98839ff49ab18066a38375a876..9b26976a199025927a80d06fc7461ed49a9166a0 100644 --- a/display_server/rosen/modules/render_service/ft_build/BUILD.gn +++ b/display_server/rosen/modules/render_service/ft_build/BUILD.gn @@ -12,18 +12,34 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") # On the openEuler platform, display_server and window_manager are in the same process # Use sa_main.bin instead of render_service.bin -ft_shared_library("librender_service") { - defines = [] - defines += gpu_defines +config("render_service_config") { + if (rs_main_executable) { + defines += [ "RS_MAIN_EXECUTABLE" ] + } +} + +group("render_service_group") { + deps = [ ":librender_service" ] + + if (rs_main_executable) { + print("[GN INFO] Enable RS exec building.") + deps += [ ":render_service" ] + } +} +ft_shared_library("librender_service") { + defines = gpu_defines if (use_musl) { defines += [ "FRAME_AWARE_TRACE" ] } + + cflags = [ "-Wno-c++11-narrowing" ] + sources = [ "../core/pipeline/rs_base_render_engine.cpp", "../core/pipeline/rs_base_render_util.cpp", @@ -69,19 +85,6 @@ ft_shared_library("librender_service") { "$display_server_root/utils/socketpair/export", ] - configs = [ - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:syspara_config", - "//build/gn/configs/system_libs:safwk_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:samgr_config", - "//build/gn/configs/system_libs:image_config", - ] - deps = [ "$display_server_root/frameworks/surface/ft_build:surface", "$display_server_root/rosen/modules/composer/ft_build:libcomposer", @@ -89,7 +92,33 @@ ft_shared_library("librender_service") { "$display_server_root/rosen/modules/render_service_base/ft_build:librender_service_base", ] + public_deps = [ + "//build/gn/configs/system_libs:samgr", + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:syspara", + "//build/gn/configs/system_libs:safwk", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:image", + ] + + public_configs = [ ":render_service_config" ] + libs = ["png"] +} - cflags = [ "-Wno-c++11-narrowing" ] -} \ No newline at end of file +if (rs_main_executable) { + ft_executable("render_service") { + sources = [ "../core/main.cpp" ] + + include_dirs = [ "../core" ] + + deps = [ + ":librender_service", + "//display_server/rosen/modules/composer/ft_build:libcomposer", + "//display_server/rosen/modules/render_service_base/ft_build:librender_service_base", + ] + + configs = [ ":render_service_config" ] + } +} diff --git a/display_server/rosen/modules/render_service_base/ft_build/BUILD.gn b/display_server/rosen/modules/render_service_base/ft_build/BUILD.gn index db4109ac160ac0b058c4f6b63620c2b589a8220a..8c298f094bcb0f9df9da3c97a2c0b6cfb58bf60e 100644 --- a/display_server/rosen/modules/render_service_base/ft_build/BUILD.gn +++ b/display_server/rosen/modules/render_service_base/ft_build/BUILD.gn @@ -12,12 +12,12 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") rs_common_define = [ "ROSEN_OHOS" ] enable_export_macro = true -config("export_config") { +config("render_service_base_public_config") { cflags_cc = [ "-std=c++17" ] include_dirs = [ "../include" ] @@ -156,7 +156,7 @@ ft_source_set("render_service_base_src") { ] public_configs = [ - ":export_config", + ":render_service_base_public_config", ] deps = [ "../src/platform/fangtian:rosen_fangtian_sources", @@ -167,21 +167,13 @@ ft_source_set("render_service_base_src") { defines += [ "ENABLE_EXPORT_MACRO" ] } - if (enable_gpu) { + if (ds_enable_gpu) { sources += [ "../src/common/rs_shared_context.cpp" ] defines += [ "GR_TEST_UTILS=1", ] } - configs = [ - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:skia_config", - ] - include_dirs = [ "$rosen_root/modules/render_service_base/src", "$rosen_root/modules/platform/image_native", @@ -193,15 +185,21 @@ ft_source_set("render_service_base_src") { ] deps += [ - "$display_server_root/utils/buffer_handle/ft_build:buffer_handle", + "//build/gn/configs/system_libs:c_utils", + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:skia", + ] + + public_deps = [ "$display_server_root/utils/sandbox/ft_build:sandbox_utils", "$display_server_root/utils/sync_fence/ft_build:sync_fence", ] - } ft_shared_library("librender_service_base") { - deps = [ + public_deps = [ ":render_service_base_src", "../src/platform/fangtian:rosen_fangtian_sources", ] diff --git a/display_server/rosen/modules/render_service_base/ft_build/mock/BUILD.gn b/display_server/rosen/modules/render_service_base/ft_build/mock/BUILD.gn index fdd9c150aa2463c6da1651b4a592a6f55b179610..ffed25d7045db163afb106c619522c6495129fde 100644 --- a/display_server/rosen/modules/render_service_base/ft_build/mock/BUILD.gn +++ b/display_server/rosen/modules/render_service_base/ft_build/mock/BUILD.gn @@ -12,13 +12,12 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") ft_source_set("mock_image_native") { - - configs = [ - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:skia_config", + deps = [ + "//build/gn/configs/system_libs:c_utils", + "//build/gn/configs/system_libs:skia", ] sources = [ diff --git a/display_server/rosen/modules/render_service_base/include/common/rs_obj_geometry.h b/display_server/rosen/modules/render_service_base/include/common/rs_obj_geometry.h index 79ae428386be70c6b4ae8d52e0ce3d6e46b291c9..83691a88323e72de093478f865129190637578a6 100644 --- a/display_server/rosen/modules/render_service_base/include/common/rs_obj_geometry.h +++ b/display_server/rosen/modules/render_service_base/include/common/rs_obj_geometry.h @@ -44,7 +44,8 @@ public: class RSObjGeometry { public: RSObjGeometry() - : x_(-INFINITY), y_(-INFINITY), z_(0), width_(-INFINITY), height_(-INFINITY), trans_(nullptr) + // : x_(-INFINITY), y_(-INFINITY), z_(0), width_(-INFINITY), height_(-INFINITY), trans_(nullptr) + : x_(0), y_(0), z_(0), width_(0), height_(0), trans_(nullptr) {} virtual ~RSObjGeometry() {} diff --git a/display_server/rosen/modules/render_service_base/src/platform/fangtian/BUILD.gn b/display_server/rosen/modules/render_service_base/src/platform/fangtian/BUILD.gn index 83b9e41bc896fb25f7106ae6536d2ed67a084527..1ea79bd319eebf389ba2b1c328503fea5b615791 100644 --- a/display_server/rosen/modules/render_service_base/src/platform/fangtian/BUILD.gn +++ b/display_server/rosen/modules/render_service_base/src/platform/fangtian/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") config("platform_config") { include_dirs = [ @@ -25,13 +25,6 @@ config("platform_config") { ft_source_set("rosen_fangtian_sources") { configs = [ ":platform_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:samgr_config", ] cflags_cc = [ @@ -79,7 +72,7 @@ ft_source_set("rosen_fangtian_sources") { "$display_server_root/utils/log", "$display_server_root/interfaces/inner_api/composer", ] - if (enable_gpu) { + if (ds_enable_gpu) { defines += [ "GR_TEST_UTILS=1", ] @@ -104,12 +97,20 @@ ft_source_set("rosen_fangtian_sources") { libs = [ "crypto", "EGL", "GLESv2" ] } - deps = [ + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:samgr", + ] + + public_deps = [ + "$display_server_root/utils/buffer_handle/ft_build:buffer_handle", "$display_server_root/frameworks/surface/ft_build:surface", "$rosen_root/modules/composer/vsync/ft_build:libvsync", "$display_server_root/utils/sync_fence/ft_build:sync_fence", - "$display_server_root/utils/buffer_handle/ft_build:buffer_handle", "$display_server_root/utils/sandbox/ft_build:sandbox_utils", ] } diff --git a/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_frame_raster.h b/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_frame_raster.h index 2d44d10325e209ccf56b09661fe4ddfdfe8d5535..b0af0b54d533ca8e6aadd1580670f9b0e74a22e5 100644 --- a/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_frame_raster.h +++ b/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_frame_raster.h @@ -50,7 +50,7 @@ private: .height = 0x100, .strideAlignment = 0x8, .format = PIXEL_FMT_RGBA_8888, - .usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE | BUFFER_USAGE_MEM_DMA, + .usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE | BUFFER_USAGE_MEM_DMA | BUFFER_USAGE_MEM_FB, .timeout = 0, }; BufferFlushConfig flushConfig_ = { diff --git a/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_raster.cpp b/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_raster.cpp index fb9ffbb38d98e3bc5c70b5e918a1da4d9120251a..223f3dcfdeb42cf91bcc0eb480faf579a38418bc 100644 --- a/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_raster.cpp +++ b/display_server/rosen/modules/render_service_base/src/platform/fangtian/backend/rs_surface_raster.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2023 Huawei Technologies Co., Ltd. + * Copyright (c) 2021-2022 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 @@ -23,8 +23,10 @@ namespace OHOS { namespace Rosen { -RSSurfaceOhosRaster::RSSurfaceOhosRaster(const sptr& producer) : RSSurfaceOhos(producer) {} - +RSSurfaceOhosRaster::RSSurfaceOhosRaster(const sptr& producer) : RSSurfaceOhos(producer) +{ + bufferUsage_ = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE; +} void RSSurfaceOhosRaster::SetSurfaceBufferUsage(uint64_t usage) { @@ -53,7 +55,6 @@ std::unique_ptr RSSurfaceOhosRaster::RequestFrame(int32_t width, return nullptr; } - sptr tempFence = new SyncFence(frame->releaseFence_); int res = tempFence->Wait(3000); if (res < 0) { diff --git a/display_server/rosen/modules/render_service_client/ft_build/BUILD.gn b/display_server/rosen/modules/render_service_client/ft_build/BUILD.gn index 8cc0381274909958ce8022f49cdb7df93265dc6a..b3d4a3c0206804dcff9736c5494e8310228422e9 100644 --- a/display_server/rosen/modules/render_service_client/ft_build/BUILD.gn +++ b/display_server/rosen/modules/render_service_client/ft_build/BUILD.gn @@ -12,15 +12,16 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") -config("render_service_client_config") { +config("render_service_client_public_config") { include_dirs = [ "$rosen_root/modules", "$rosen_root/modules/render_service_client/core", "$rosen_root/modules/render_service_base/include", "$rosen_root/modules/render_service_base/src/platform/fangtian/include", "$rosen_root/modules/platform/image_native", + "$rosen_root/modules/2d_graphics/src", "$display_server_root/interfaces/inner_api/common", "$display_server_root/interfaces/inner_api/surface", "$display_server_root/interfaces/inner_api/composer", @@ -33,7 +34,6 @@ ft_source_set("render_service_client_src") { defines += gpu_defines defines += [ "MODULE_RSC" ] include_dirs = [ - "$rosen_root/modules/2d_graphics/src", "$rosen_root/modules/render_frame_trace/include", "$rosen_root/modules/render_service_base/src", "$display_server_root/utils/log", @@ -107,7 +107,7 @@ ft_source_set("render_service_client_src") { "-fvisibility-inlines-hidden", ] - deps = [ + public_deps = [ "$rosen_root/modules/composer/vsync/ft_build:libvsync", "$rosen_root/modules/frame_analyzer/ft_build:libframe_analyzer", "$rosen_root/modules/render_frame_trace/ft_build:render_frame_trace", @@ -115,17 +115,14 @@ ft_source_set("render_service_client_src") { "$display_server_root/utils/buffer_handle/ft_build:buffer_handle", "$display_server_root/utils/sync_fence/ft_build:sync_fence", "$display_server_root/utils/sandbox/ft_build:sandbox_utils", - ] - - public_configs = [ ":render_service_client_config" ] - configs = [ - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:hitrace_meter_config", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:ipc_core", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:hitrace_meter", ] + + public_configs = [ ":render_service_client_public_config" ] } ft_shared_library("librender_service_client") { diff --git a/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn b/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..f364f5e35c7ff3303dec8eab93a55a9890fbd717 --- /dev/null +++ b/display_server/rosen/modules/render_service_client/test/ft_build/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright (c) 2023 Huawei Technologies 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/gn/fangtian.gni") + +ft_executable("render_service_client_rs_demo") { + sources = [ "../render_service_client_rs_demo.cpp" ] + + include_dirs = [ + "//display_server/rosen/modules/render_service_base/src", + "//display_server/rosen/include", + "//display_server/drivers/interfaces", + ] + + deps = [ + "//display_server/rosen/modules/render_service_client/ft_build:librender_service_client", + + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:libz", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:image", + ] +} diff --git a/display_server/rosen/modules/render_service_client/test/render_service_client_rs_demo.cpp b/display_server/rosen/modules/render_service_client/test/render_service_client_rs_demo.cpp index 0f4f746de9f2d664f8678095d0a0685f534ca9ac..77aceae6ee9b42162774a36d8977611546842ba9 100644 --- a/display_server/rosen/modules/render_service_client/test/render_service_client_rs_demo.cpp +++ b/display_server/rosen/modules/render_service_client/test/render_service_client_rs_demo.cpp @@ -31,9 +31,6 @@ #include "ui/rs_display_node.h" #include "ui/rs_surface_node.h" #include "render_context/render_context.h" -// temporary debug -#include "foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/platform/ohos/rs_surface_frame_ohos.h" -#include "foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/platform/ohos/rs_surface_ohos.h" using namespace OHOS; using namespace OHOS::Rosen; @@ -337,6 +334,7 @@ public: RSDisplayNodeConfig config; RSDisplayNode::SharedPtr displayNode = RSDisplayNode::Create(config); + displayNode->SetBounds(0, 0, screenWidth_, screenheight_); displayNode->AddChild(surfaceNode1, -1); displayNode->AddChild(surfaceNode2, -1); diff --git a/display_server/rosen/samples/composer/ft_build/BUILD.gn b/display_server/rosen/samples/composer/ft_build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..0a4fdeee1637a2de47bb3104dbb887ee73a1b25d --- /dev/null +++ b/display_server/rosen/samples/composer/ft_build/BUILD.gn @@ -0,0 +1,48 @@ +# Copyright (c) 2023 Huawei Technologies 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/gn/fangtian.gni") + +ft_executable("hello_composer") { + cflags = [ + "-Wall", + "-Werror", + "-g3", + ] + + sources = [ + "../hello_composer.cpp", + "../layer_context.cpp", + "../main.cpp", + ] + + include_dirs = [ + "//display_server/rosen/modules/composer/hdi_backend/include", + "//display_server/rosen/include/common", + "//display_server/rosen/modules/composer/vsync/include", + "//display_server/rosen/modules/render_service_base/src", + "//display_server/interfaces/inner_api/composer", + ] + + deps = [ + "//display_server/frameworks/surface/ft_build:surface", + "//display_server/rosen/modules/composer/ft_build:libcomposer", + "//display_server/utils/ft_build:sync_fence", + ] + + deps += [ + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:ipc_core", + ] +} \ No newline at end of file diff --git a/display_server/rosen/samples/composer/hello_composer.cpp b/display_server/rosen/samples/composer/hello_composer.cpp index 43eb8fd8511007a5c69f6eea9af3fad8f0b19435..f99c41d26ce5084f858809c37ce9416e55bce8eb 100644 --- a/display_server/rosen/samples/composer/hello_composer.cpp +++ b/display_server/rosen/samples/composer/hello_composer.cpp @@ -52,6 +52,7 @@ void HelloComposer::Run(const std::vector &runArgs) return; } + // Step1: Register Hotplug callback and Wait callback done. backend_->RegScreenHotplug(HelloComposer::OnScreenPlug, this); while (1) { if (!outputMap_.empty()) { @@ -61,6 +62,7 @@ void HelloComposer::Run(const std::vector &runArgs) if (!initDeviceFinished_) { if (deviceConnected_) { + // Step2: Create Hdi Screen for all Output (Reg VSync callback) and init Layers CreateLayers(); } initDeviceFinished_ = true; @@ -72,6 +74,7 @@ void HelloComposer::Run(const std::vector &runArgs) ParseArgs(runArgs); sleep(1); + // Create main loop & Register virtual vsync callback std::shared_ptr runner = OHOS::AppExecFwk::EventRunner::Create(false); mainThreadHandler_ = std::make_shared(runner); g_receiver = new VSyncReceiver(vsyncConnection, mainThreadHandler_); @@ -105,6 +108,8 @@ void HelloComposer::OnScreenPlug(std::shared_ptr &output, bool connec void HelloComposer::OnPrepareCompleted( sptr &surface, const struct PrepareCompleteParam ¶m, void* data) { + LOGI("HelloComposer::OnPrepareCompleted"); + if (!param.needFlushFramebuffer) { return; } @@ -153,14 +158,14 @@ void HelloComposer::RequestSync() void HelloComposer::InitLayers(uint32_t screenId) { LOGI("Init layers, screenId is %{public}d", screenId); - uint32_t displayWidth = displayWidthsMap_[screenId]; - uint32_t displayHeight = displayHeightsMap_[screenId]; + int32_t displayWidth = displayWidthsMap_[screenId]; + int32_t displayHeight = displayHeightsMap_[screenId]; std::vector> &drawLayers = drawLayersMap_[screenId]; - uint32_t statusHeight = displayHeight / 10; // statusHeight is 1 / 10 displayHeight - uint32_t launcherHeight = displayHeight - statusHeight * 2; // index 1, cal launcher height 2 - uint32_t navigationY = displayHeight - statusHeight; + int32_t statusHeight = displayHeight / 10; // statusHeight is 1 / 10 displayHeight + int32_t launcherHeight = displayHeight - statusHeight * 2; // index 1, cal launcher height 2 + int32_t navigationY = displayHeight - statusHeight; LOGI("displayWidth[%{public}d], displayHeight[%{public}d], statusHeight[%{public}d], " "launcherHeight[%{public}d], navigationY[%{public}d]", displayWidth, displayHeight, statusHeight, launcherHeight, navigationY); @@ -183,10 +188,10 @@ void HelloComposer::InitLayers(uint32_t screenId) IRect { 0, 0, displayWidth, statusHeight }, 1, LayerType::LAYER_NAVIGATION)); - uint32_t layerWidth = displayWidth / 4; // layer width is 1/4 displayWidth - uint32_t layerHeight = displayHeight / 4; // layer height is 1/4 of displayHeight - uint32_t layerPositionX = displayWidth / 2 - layerWidth / 2; // x is (displayWidth - layerWidth) / 2 - uint32_t layerPositionY = displayHeight / 2 - layerHeight / 2; // y is (displayHeight - layerHeight) / 2 + int32_t layerWidth = displayWidth / 4; // layer width is 1/4 displayWidth + int32_t layerHeight = displayHeight / 4; // layer height is 1/4 of displayHeight + int32_t layerPositionX = displayWidth / 2 - layerWidth / 2; // x is (displayWidth - layerWidth) / 2 + int32_t layerPositionY = displayHeight / 2 - layerHeight / 2; // y is (displayHeight - layerHeight) / 2 LOGI("Layer position is: [x, y, w, h: [%{public}d, %{public}d, %{public}d, %{public}d]]", layerPositionX, layerPositionY, layerWidth, layerHeight); @@ -199,21 +204,24 @@ void HelloComposer::InitLayers(uint32_t screenId) void HelloComposer::Sync(int64_t, void *data) { + LOGI("VSync come."); + VSyncReceiver::FrameCallback fcb = { .userData_ = data, .callback_ = std::bind(&HelloComposer::Sync, this, ::std::placeholders::_1, ::std::placeholders::_2), }; - if (g_receiver != nullptr) { - g_receiver->RequestNextVSync(fcb); - } - if (!ready_) { LOGE("hdi screen is not ready"); return; } + // Do repaint Draw(); + + if (g_receiver != nullptr) { + g_receiver->RequestNextVSync(fcb); + } } void HelloComposer::SetRunArgs(const std::unique_ptr &drawLayer) const @@ -300,8 +308,8 @@ uint32_t HelloComposer::CreatePhysicalScreen() displayModeInfos[i].height, displayModeInfos[i].freshRate); if (displayModeInfos[i].id == static_cast(currentModeIndex)) { freq_ = 30; // 30 freq - displayWidthsMap_[screenId] = static_cast(displayModeInfos[i].width); - displayHeightsMap_[screenId] = static_cast(displayModeInfos[i].height); + displayWidthsMap_[screenId] = displayModeInfos[i].width; + displayHeightsMap_[screenId] = displayModeInfos[i].height; break; } } @@ -311,16 +319,16 @@ uint32_t HelloComposer::CreatePhysicalScreen() DispPowerStatus powerState; screen->GetScreenPowerStatus(powerState); - LOGI("get poweState:%{public}d", powerState); + LOGI("Get powerState:%{public}d", powerState); } DisplayCapability info; screen->GetScreenCapability(info); - LOGI("ScreenCapability: name(%{public}s), type(%{public}d), phyWidth(%{public}d), " - "phyHeight(%{public}d)", info.name, info.type, info.phyWidth, info.phyHeight); - LOGI("ScreenCapability: supportLayers(%{public}d), virtualDispCount(%{public}d), " - "supportWriteBack(%{public}d), propertyCount(%{public}d)", info.supportLayers, - info.virtualDispCount, info.supportWriteBack, info.propertyCount); + LOGI("ScreenCapability: name(%{public}s), type(%{public}d), phyWidth(%{public}d), phyHeight(%{public}d)", + info.name, info.type, info.phyWidth, info.phyHeight); + LOGI("ScreenCapability: supportLayers(%{public}d), virtualDispCount(%{public}d), supportWriteBack(%{public}d), " + "propertyCount(%{public}d)", + info.supportLayers, info.virtualDispCount, info.supportWriteBack, info.propertyCount); ready_ = true; @@ -424,15 +432,48 @@ void HelloComposer::RemoveOffScreenData(uint32_t offScreenId) } namespace { +class Color { +public: + uint32_t GetNextColor() { + r = NextByteColor(&r_up, r, 10); + g = NextByteColor(&g_up, g, 10); + b = NextByteColor(&b_up, b, 10); + return (r << 24) | (g << 16) | (b << 8) | a; + } + +private: + uint8_t NextByteColor(bool *up, uint8_t cur, unsigned int step) + { + uint8_t next; + + next = cur + (*up ? 1 : -1) * (rand() % step); + if ((*up && next < cur) || (!*up && next > cur)) { + *up = !*up; + next = cur; + } + + return next; + } + +private: + uint8_t r = rand() % 0xff; + uint8_t g = rand() % 0xff; + uint8_t b = rand() % 0xff; + const uint8_t a = 0xff; + bool r_up = true; + bool g_up = true; + bool b_up = true; +}; + void DrawFrameBufferData(void *image, uint32_t width, uint32_t height) { - static uint32_t value = 0x00; - value++; + static Color color; + auto current_color = color.GetNextColor(); uint32_t *pixel = static_cast(image); for (uint32_t x = 0; x < width; x++) { for (uint32_t y = 0; y < height; y++) { - *pixel++ = value; + *pixel++ = current_color; } } } @@ -441,15 +482,17 @@ void DrawFrameBufferData(void *image, uint32_t width, uint32_t height) void HelloComposer::DoPrepareCompleted(sptr surface, const struct PrepareCompleteParam ¶m) { uint32_t screenId = curOutput_->GetScreenId(); - uint32_t displayWidth = displayWidthsMap_[screenId]; - uint32_t displayHeight = displayHeightsMap_[screenId]; + int32_t displayWidth = displayWidthsMap_[screenId]; + int32_t displayHeight = displayHeightsMap_[screenId]; + // Request buffer from buffer queue BufferRequestConfig requestConfig = { .width = displayWidth, // need display width .height = displayHeight, // need display height .strideAlignment = 0x8, .format = GRAPHIC_PIXEL_FMT_BGRA_8888, - .usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE | BUFFER_USAGE_MEM_DMA, + // .usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE | BUFFER_USAGE_MEM_DMA, + .usage = BUFFER_USAGE_CPU_READ | BUFFER_USAGE_CPU_WRITE | BUFFER_USAGE_MEM_DMA | BUFFER_USAGE_MEM_FB, .timeout = 0, }; @@ -474,6 +517,7 @@ void HelloComposer::DoPrepareCompleted(sptr surface, const struct Prepa } } + // Fill buffer with color auto addr = static_cast(fbBuffer->GetVirAddr()); if (hasClient) { DrawFrameBufferData(addr, static_cast(fbBuffer->GetWidth()), @@ -485,6 +529,7 @@ void HelloComposer::DoPrepareCompleted(sptr surface, const struct Prepa } } + // Flush buffer BufferFlushConfig flushConfig = { .damage = { .w = displayWidth, diff --git a/display_server/rosen/samples/composer/hello_composer.h b/display_server/rosen/samples/composer/hello_composer.h index 573d38d2d0961216ca3d484de4afff5097562721..755bf12f50f9c3c651c26365037eee3cf7a228f0 100644 --- a/display_server/rosen/samples/composer/hello_composer.h +++ b/display_server/rosen/samples/composer/hello_composer.h @@ -35,6 +35,25 @@ public: void Init(); void Run(const std::vector &runArgs); +private: + void InitLayers(uint32_t screenId); + void RequestSync(); + void CreateLayers(); + void CreateShowLayers(); + void Draw(); + void Sync(int64_t, void *data); + void DoPrepareCompleted(sptr surface, const struct PrepareCompleteParam ¶m); + void OnHotPlug(std::shared_ptr &output, bool connected); + void OnHotPlugEvent(std::shared_ptr &output, bool connected); + void ParseArgs(const std::vector &runArgs); + void SetRunArgs(const std::unique_ptr &drawLayer) const; + void RemoveOffScreenData(uint32_t offScreenId); + uint32_t CreatePhysicalScreen(); + + static void OnScreenPlug(std::shared_ptr &output, bool connected, void* data); + static void OnPrepareCompleted( + sptr &surface, const struct PrepareCompleteParam ¶m, void* data); + private: uint32_t freq_ = 30; uint32_t currScreenId_ = 0; @@ -54,29 +73,11 @@ private: std::shared_ptr mainThreadHandler_; /* map: key is screenId */ - std::unordered_map displayWidthsMap_; - std::unordered_map displayHeightsMap_; + std::unordered_map displayWidthsMap_; + std::unordered_map displayHeightsMap_; std::unordered_map> outputMap_; std::unordered_map> screensMap_; std::unordered_map>> drawLayersMap_; - - void InitLayers(uint32_t screenId); - void RequestSync(); - void CreateLayers(); - void CreateShowLayers(); - void Draw(); - void Sync(int64_t, void *data); - void DoPrepareCompleted(sptr surface, const struct PrepareCompleteParam ¶m); - void OnHotPlug(std::shared_ptr &output, bool connected); - void OnHotPlugEvent(std::shared_ptr &output, bool connected); - void ParseArgs(const std::vector &runArgs); - void SetRunArgs(const std::unique_ptr &drawLayer) const; - void RemoveOffScreenData(uint32_t offScreenId); - uint32_t CreatePhysicalScreen(); - - static void OnScreenPlug(std::shared_ptr &output, bool connected, void* data); - static void OnPrepareCompleted( - sptr &surface, const struct PrepareCompleteParam ¶m, void* data); }; } // namespace Rosen } // namespace OHOS diff --git a/display_server/rosen/samples/composer/layer_context.cpp b/display_server/rosen/samples/composer/layer_context.cpp index e887b15924063c52e27065e9ae106e98b1cca62e..9d14f97f3b4f5a1c38ff3a7b2c3b875e81ff4b0c 100644 --- a/display_server/rosen/samples/composer/layer_context.cpp +++ b/display_server/rosen/samples/composer/layer_context.cpp @@ -167,6 +167,7 @@ SurfaceError LayerContext::FillHDILayer() prevBuffer_ = buffer; prevFence_ = acquireSyncFence; + ret = cSurface_->ReleaseBuffer(buffer, acquireFence); return ret; } diff --git a/display_server/rosen/samples/composer/main.cpp b/display_server/rosen/samples/composer/main.cpp index c83381d14ff1da30f9e4916e9b4720e4de33c6c1..3cdaef77c2e52eeb5b3682e7b2a56faf0c986dbb 100644 --- a/display_server/rosen/samples/composer/main.cpp +++ b/display_server/rosen/samples/composer/main.cpp @@ -27,8 +27,8 @@ int32_t main(int32_t argc, const char *argv[]) runArgs[i] = argv[i]; } - OHOS::Rosen::HelloComposer m; - m.Run(runArgs); + OHOS::Rosen::HelloComposer hello_composer; + hello_composer.Run(runArgs); return 0; } \ No newline at end of file diff --git a/display_server/utils/buffer_handle/ft_build/BUILD.gn b/display_server/utils/buffer_handle/ft_build/BUILD.gn index 1a72a0210c5cef616b4a7797c6ac29221b165b01..ea69a94de19aea54f8a15a6347d0062583e398fb 100644 --- a/display_server/utils/buffer_handle/ft_build/BUILD.gn +++ b/display_server/utils/buffer_handle/ft_build/BUILD.gn @@ -18,6 +18,7 @@ config("buffer_handle_public") { "../export", ] } + ft_static_library("buffer_handle") { include_dirs = [ "${sys_inc}/c_utils", diff --git a/display_server/utils/ft_build/BUILD.gn b/display_server/utils/ft_build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..7207480fe89e81bfff0bc159be39d2540de2f114 --- /dev/null +++ b/display_server/utils/ft_build/BUILD.gn @@ -0,0 +1,54 @@ +# Copyright (c) 2021 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/gn/fangtian.gni") +import("//display_server/ft_build/ds_config.gni") + +utils_dir = "//display_server/utils" + +group("buffer_handle") { + public_deps = [ "${utils_dir}/buffer_handle/ft_build:buffer_handle" ] +} + +group("scoped_bytrace") { + public_deps = [ "${utils_dir}/scoped_bytrace/ft_build:scoped_bytrace" ] +} + +group("socketpair") { + public_deps = [ "${utils_dir}/socketpair/ft_build:socketpair" ] +} + +group("sync_fence") { + public_deps = [ "${utils_dir}/sync_fence/ft_build:sync_fence" ] +} + +group("sandbox_utils") { + public_deps = [ "${utils_dir}/sandbox/ft_build:sandbox_utils" ] +} + +config("libgraphic_utils_public_config") { + include_dirs = + [ "//foundation/graphic/graphic_2d/interfaces/inner_api/common" ] +} + +ft_shared_library("libgraphic_utils") { + public_configs = [ ":libgraphic_utils_public_config" ] + + public_deps = [ + ":buffer_handle", + ":scoped_bytrace", + ":socketpair", + ":sync_fence", + ":sandbox_utils", + ] +} diff --git a/display_server/utils/scoped_bytrace/ft_build/BUILD.gn b/display_server/utils/scoped_bytrace/ft_build/BUILD.gn index 66f7f5b7e5a09b2482744018071c588cc48f448f..82cf4ebd95a1f0027ccd31504ff3ff092f479c7a 100644 --- a/display_server/utils/scoped_bytrace/ft_build/BUILD.gn +++ b/display_server/utils/scoped_bytrace/ft_build/BUILD.gn @@ -35,6 +35,4 @@ ft_static_library("scoped_bytrace") { sources = [ "../src/scoped_bytrace.cpp" ] configs = [ ":scoped_bytrace_config" ] public_configs = [ ":scoped_bytrace_public_config" ] - subsystem_name = "graphic" - part_name = "graphic_standard" -} \ No newline at end of file +} diff --git a/display_server/utils/socketpair/ft_build/BUILD.gn b/display_server/utils/socketpair/ft_build/BUILD.gn index c0b7a0b33aaa750c614c0a8152ac7c5a99375882..f05a0aa0b68ec219883d328928231231949a8857 100644 --- a/display_server/utils/socketpair/ft_build/BUILD.gn +++ b/display_server/utils/socketpair/ft_build/BUILD.gn @@ -20,6 +20,10 @@ config("socketpair_config") { "-Werror", "-g3", ] +} + +config("socketpair_public_config") { + visibility = [ ":socketpair" ] include_dirs = [ "../export", ] @@ -28,12 +32,14 @@ config("socketpair_config") { ft_shared_library("socketpair") { sources = [ "../src/local_socketpair.cpp" ] - configs = [ - ":socketpair_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:ipc_core_config", - ] + configs = [ ":socketpair_config" ] + + public_configs = [ ":socketpair_public_config" ] - deps = [ "//display_server/utils/scoped_bytrace/ft_build:scoped_bytrace" ] + deps = [ + "//display_server/utils/scoped_bytrace/ft_build:scoped_bytrace", + + "//build/gn/configs/system_libs:hilog", + "//build/gn/configs/system_libs:ipc_core", + ] } diff --git a/display_server/utils/sync_fence/ft_build/BUILD.gn b/display_server/utils/sync_fence/ft_build/BUILD.gn index 1cb670eda529133b3c62a2fd5f6a679d42fc9fac..c474ddc39a45b97b43df9392e04b02afaa6df403 100644 --- a/display_server/utils/sync_fence/ft_build/BUILD.gn +++ b/display_server/utils/sync_fence/ft_build/BUILD.gn @@ -12,7 +12,7 @@ # limitations under the License. import("//build/gn/fangtian.gni") -import("//display_server/ft_configs/ds_config.gni") +import("//display_server/ft_build/ds_config.gni") config("sync_fence_config") { visibility = [ ":sync_fence" ] @@ -45,16 +45,15 @@ ft_shared_library("sync_fence") { "../src/sync_fence_tracker.cpp", ] - configs = [ - ":sync_fence_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:ipc_core_config", - ] + configs = [ ":sync_fence_config" ] public_configs = [ ":sync_fence_public_config", ] + + deps = [ + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:ipc_core", + ] } diff --git a/window_manager/dm/ft_build/BUILD.gn b/window_manager/dm/ft_build/BUILD.gn index bc1ee331f5b3c142199e439d5f2a67d2840ba62a..61b7db93a01e27eef0dec07991cabd48909451e8 100644 --- a/window_manager/dm/ft_build/BUILD.gn +++ b/window_manager/dm/ft_build/BUILD.gn @@ -47,13 +47,6 @@ ft_shared_library("libdm") { configs = [ ":libdm_private_config", "$window_manager_path/resources/config/build:coverage_flags", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:image_config", - "//build/gn/configs/system_libs:samgr_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:eventhandler_config", ] public_configs = [ ":libdm_public_config" ] @@ -61,5 +54,10 @@ ft_shared_library("libdm") { deps = [ "$display_server_path/rosen/modules/render_service_client/ft_build:librender_service_client", "$window_manager_path/utils/ft_build:libwmutil", + + "//build/gn/configs/system_libs:image", + "//build/gn/configs/system_libs:samgr", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:eventhandler", ] } diff --git a/window_manager/dmserver/ft_build/BUILD.gn b/window_manager/dmserver/ft_build/BUILD.gn index 1e630e85c92031342f61913c570548fef04e67a3..83cff8f362476562711cd351e1c132b7fd0acdad 100644 --- a/window_manager/dmserver/ft_build/BUILD.gn +++ b/window_manager/dmserver/ft_build/BUILD.gn @@ -52,14 +52,6 @@ ft_shared_library("libdms") { configs = [ ":libdms_private_config", "$window_manager_path/resources/config/build:coverage_flags", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:samgr_config", - "//build/gn/configs/system_libs:safwk_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:skia_config", ] public_configs = [ ":libdms_public_config" ] @@ -71,5 +63,10 @@ ft_shared_library("libdms") { "$display_server_path/rosen/modules/render_service_base/ft_build:librender_service_base", "$display_server_path/rosen/modules/render_service_client/ft_build:librender_service_client", "$window_manager_path/utils/ft_build:libwmutil", + + "//build/gn/configs/system_libs:hitrace_meter", + "//build/gn/configs/system_libs:safwk", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:skia", ] } diff --git a/window_manager/utils/ft_build/BUILD.gn b/window_manager/utils/ft_build/BUILD.gn index 189b479a1be308157daf675352be8a4b899b1710..8ec7b3ef493ee39ef37f046fe32294ab73334640 100644 --- a/window_manager/utils/ft_build/BUILD.gn +++ b/window_manager/utils/ft_build/BUILD.gn @@ -58,14 +58,6 @@ ft_shared_library("libwmutil") { configs = [ ":libwmutil_private_config", "$window_manager_path/resources/config/build:coverage_flags", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:samgr_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:image_config", - "//build/gn/configs/system_libs:mmi_config", ] public_configs = [ ":libwmutil_public_config" ] @@ -73,5 +65,11 @@ ft_shared_library("libwmutil") { deps = [ "$display_server_path/frameworks/surface/ft_build:surface", "$display_server_path/rosen/modules/render_service_client/ft_build:librender_service_client", + + "//build/gn/configs/system_libs:samgr", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:image", + "//build/gn/configs/system_libs:mmi", + "//build/gn/configs/system_libs:skia", ] } diff --git a/window_manager/wm/ft_build/BUILD.gn b/window_manager/wm/ft_build/BUILD.gn index a236077ced91e7d327137f6ed257b21946abb77a..ec47a135ffc9f9c7faf7af7ec11629ee372785bd 100644 --- a/window_manager/wm/ft_build/BUILD.gn +++ b/window_manager/wm/ft_build/BUILD.gn @@ -58,14 +58,6 @@ ft_shared_library("libwm") { configs = [ ":libwm_private_config", "$window_manager_path/resources/config/build:coverage_flags", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:image_config", - "//build/gn/configs/system_libs:samgr_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:mmi_config", - "//build/gn/configs/system_libs:skia_config", ] public_configs = [ ":libwm_public_config" ] @@ -76,5 +68,11 @@ ft_shared_library("libwm") { "$display_server_path/rosen/modules/render_service_client/ft_build:librender_service_client", "$window_manager_path/dm/ft_build:libdm", "$window_manager_path/utils/ft_build:libwmutil", + + "//build/gn/configs/system_libs:image", + "//build/gn/configs/system_libs:samgr", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:mmi", + "//build/gn/configs/system_libs:skia", ] } diff --git a/window_manager/wmserver/ft_build/BUILD.gn b/window_manager/wmserver/ft_build/BUILD.gn index 0cd85a1a781843b98fce8ffcb30b62e645a743ab..3b851da2d92209350e533d74070719f95811aead 100644 --- a/window_manager/wmserver/ft_build/BUILD.gn +++ b/window_manager/wmserver/ft_build/BUILD.gn @@ -78,16 +78,6 @@ ft_shared_library("libwms") { configs = [ ":libwms_config", "$window_manager_path/resources/config/build:coverage_flags", - "//build/gn/configs/system_libs:hilog_config", - "//build/gn/configs/system_libs:hitrace_meter_config", - "//build/gn/configs/system_libs:c_utils_config", - "//build/gn/configs/system_libs:ipc_core_config", - "//build/gn/configs/system_libs:samgr_config", - "//build/gn/configs/system_libs:safwk_config", - "//build/gn/configs/system_libs:eventhandler_config", - "//build/gn/configs/system_libs:skia_config", - "//build/gn/configs/system_libs:image_config", - "//build/gn/configs/system_libs:mmi_config", ] libs = [ "xml2" ] @@ -99,5 +89,11 @@ ft_shared_library("libwms") { "$window_manager_path/dmserver/ft_build:libdms", "$window_manager_path/utils/ft_build:libwmutil", "$window_manager_path/wm/ft_build:libwm", + + "//build/gn/configs/system_libs:safwk", + "//build/gn/configs/system_libs:eventhandler", + "//build/gn/configs/system_libs:skia", + "//build/gn/configs/system_libs:image", + "//build/gn/configs/system_libs:mmi", ] }