diff --git a/build/gn/BUILD.gn b/build/gn/BUILD.gn index 03018232124f5bef01834ecdf555f8639a69e99e..cc6bf28ed0f8cb5e8df2fdad44f7d29e26e34f9a 100644 --- a/build/gn/BUILD.gn +++ b/build/gn/BUILD.gn @@ -14,5 +14,6 @@ group("ft_engine") { deps = [ "//display_server/utils/socketpair/ft_build:socketpair", + "//display_server/rosen/modules/composer/vsync/ft_build:libvsync", ] } diff --git a/build/gn/fangtian.gni b/build/gn/fangtian.gni index a345c67959b1b757825f7a7e9b27e5d8e6292c3f..e1b2f443d092b14a20f31b2ae72c37e093f88d89 100755 --- a/build/gn/fangtian.gni +++ b/build/gn/fangtian.gni @@ -18,4 +18,4 @@ declare_args() { } -sys_inc = "/usr/include" +sys_inc = "/usr/local/include" diff --git a/build/prebuild.sh b/build/prebuild.sh index 91e0b3c1f4e0dd95f89e1952769a3dfb9df996a7..74fab2dbfe775dbb6321128bfbc9ac4aa738e118 100755 --- a/build/prebuild.sh +++ b/build/prebuild.sh @@ -67,7 +67,7 @@ fi # copy prebuild library to /usr/lib64 ARCHNAME=`uname -m` cd ${PROJECT_DIR}/prebuilts/libs/library/${ARCHNAME} -sudo cp -fr *.so /usr/lib64 +sudo cp -fr *.so /usr/local/lib64 cd ${PROJECT_DIR} rm -fr ${PROJECT_DIR}/prebuilts/libs @@ -78,7 +78,7 @@ fi # copy include files to /usr/include. delete download files cd ${PROJECT_DIR}/prebuilts/inc -sudo cp -fr * /usr/include +sudo cp -fr * /usr/local/include cd ${PROJECT_DIR} rm -fr ${PROJECT_DIR}/prebuilts/inc diff --git a/display_server/interfaces/inner_api/composer/vsync_receiver.h b/display_server/interfaces/inner_api/composer/vsync_receiver.h index 848f17d6d820dddcca8dba0fcbef3e73f783f310..d1ed14336a992b699106356f4e523afc8ca1c7d0 100644 --- a/display_server/interfaces/inner_api/composer/vsync_receiver.h +++ b/display_server/interfaces/inner_api/composer/vsync_receiver.h @@ -57,7 +57,7 @@ private: std::mutex mtx_; }; -#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__gnu_linux__) +#ifndef ROSEN_CROSS_PLATFORM class VSyncReceiver : public RefBase { public: // check diff --git a/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn b/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..f05185ec23f9c52612897726613fc6dfd0b6a1b6 --- /dev/null +++ b/display_server/rosen/modules/composer/vsync/ft_build/BUILD.gn @@ -0,0 +1,71 @@ +# 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") + +config("vsync_config") { + visibility = [ ":*" ] + include_dirs = [ + "${sys_inc}/c_utils", + "${sys_inc}/ipc_core", + "${sys_inc}/eventhandler", + "${sys_inc}/hilog", + "//display_server/utils/log", + "//display_server/interfaces/inner_api/common", + "//display_server/rosen/modules/composer/vsync/include", + ] + cflags = [ + "-Wall", + "-Werror", + "-g3", + "-Wno-c++11-narrowing" + ] + libs = ["ipc_core", "eventhandler", "hilog", "utils"] +} + +config("vsync_public_config") { + include_dirs = [ + "//display_server/interfaces/inner_api/composer", + "//display_server/rosen/include/common", + "//display_server/rosen/modules/composer/vsync/include", + "//display_server/utils/sandbox", + "//display_server/utils/socketpair/export", + ] +} + +ft_shared_library("libvsync") { + sources = [ + "../src/vsync_connection_proxy.cpp", + "../src/vsync_connection_stub.cpp", + "../src/vsync_controller.cpp", + "../src/vsync_distributor.cpp", + "../src/vsync_generator.cpp", + "../src/vsync_receiver.cpp", + "../src/vsync_sampler.cpp", + ] + + configs = [ ":vsync_config" ] + + public_configs = [ + ":vsync_public_config", + ] + + deps = [ + "//display_server/utils/sandbox/ft_build:sandbox_utils", + "//display_server/utils/socketpair/ft_build:socketpair", + ] + + public_deps = [ + "//display_server/utils/scoped_bytrace/ft_build:scoped_bytrace", + ] +} diff --git a/display_server/utils/sandbox/ft_build/BUILD.gn b/display_server/utils/sandbox/ft_build/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..d663f0cd5761159e5e0abf2af42a508510eaf504 --- /dev/null +++ b/display_server/utils/sandbox/ft_build/BUILD.gn @@ -0,0 +1,23 @@ +# 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") + +config("sandbox_utils_config") { + include_dirs = [ "../." ] +} + +ft_static_library("sandbox_utils") { + sources = [ "../sandbox_utils.cpp" ] + public_configs = [ ":sandbox_utils_config" ] +}