1# Copyright (C) 2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//foundation/graphic/graphic_2d/graphic_config.gni") 16 17config("libhyper_graphic_manager_config") { 18 visibility = [ ":*" ] 19 20 include_dirs = [ 21 "core/config", 22 "core/frame_rate_manager", 23 "core/hgm_screen_manager", 24 "core/utils", 25 "$graphic_2d_root/rosen/modules/composer/hdi_backend/include", 26 "$graphic_2d_root/rosen/modules/platform/ipc_core", 27 "$graphic_2d_root/rosen/modules/render_service/core", 28 "$graphic_2d_root/rosen/modules/render_service_base/include", 29 "$graphic_2d_root/rosen/modules/composer/vsync/include", 30 "$graphic_2d_root/utils/log", 31 "$graphic_2d_root/interfaces/inner_api/composer", 32 "$graphic_2d_root/interfaces/inner_api/common", 33 "$graphic_2d_root/rosen/modules/render_frame_trace/include", 34 "$graphic_2d_root/utils/log", 35 "$graphic_2d_root/utils/sandbox", 36 "//third_party/libxml2/include", 37 ] 38 39 cflags = [ "-g3" ] 40 if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) { 41 cflags += [ "-flto=thin" ] 42 } 43} 44 45ohos_shared_library("libhyper_graphic_manager") { 46 public_configs = [ ":libhyper_graphic_manager_config" ] 47 48 sources = [ 49 "core/config/hgm_config_callback_manager.cpp", 50 "core/config/xml_parser.cpp", 51 "core/frame_rate_manager/hgm_frame_rate_manager.cpp", 52 "core/frame_rate_manager/hgm_task_handle_thread.cpp", 53 "core/frame_rate_manager/hgm_vsync_generator_controller.cpp", 54 "core/hgm_screen_manager/hgm_core.cpp", 55 "core/hgm_screen_manager/hgm_screen.cpp", 56 "core/utils/hgm_one_shot_timer.cpp", 57 ] 58 if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) { 59 cflags = [ 60 "-flto=thin", 61 "-fwhole-program-vtables", 62 ] 63 } 64 65 deps = [ 66 "$graphic_2d_root/rosen/modules/render_frame_trace:render_frame_trace", 67 "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base", 68 "//third_party/libxml2:xml2", 69 ] 70 71 external_deps = [ 72 "c_utils:utils", 73 "config_policy:configpolicy_util", 74 "eventhandler:libeventhandler", 75 "hitrace:hitrace_meter", 76 "init:libbeget_proxy", 77 "init:libbegetutil", 78 "ipc:ipc_core", 79 ] 80 81 part_name = "graphic_2d" 82 subsystem_name = "graphic" 83 84 if (is_standard_system) { 85 external_deps += [ "hilog:libhilog" ] 86 } else { 87 external_deps += [ "hilog:libhilog" ] 88 } 89} 90