# Copyright (C) 2023 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/ohos.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") config("libhyper_graphic_manager_config") { visibility = [ ":*" ] include_dirs = [ "core/config", "core/frame_rate_manager", "core/hgm_screen_manager", "core/utils", "$graphic_2d_root/rosen/modules/composer/hdi_backend/include", "$graphic_2d_root/rosen/modules/platform/ipc_core", "$graphic_2d_root/rosen/modules/render_service/core", "$graphic_2d_root/rosen/modules/render_service_base/include", "$graphic_2d_root/rosen/modules/composer/vsync/include", "$graphic_2d_root/utils/log", "$graphic_2d_root/interfaces/inner_api/composer", "$graphic_2d_root/interfaces/inner_api/common", "$graphic_2d_root/rosen/modules/render_frame_trace/include", "$graphic_2d_root/utils/log", "$graphic_2d_root/utils/sandbox", "//third_party/libxml2/include", ] cflags = [ "-g3" ] if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) { cflags += [ "-flto=thin" ] } } ohos_shared_library("libhyper_graphic_manager") { public_configs = [ ":libhyper_graphic_manager_config" ] sources = [ "core/config/hgm_config_callback_manager.cpp", "core/config/xml_parser.cpp", "core/frame_rate_manager/hgm_frame_rate_manager.cpp", "core/frame_rate_manager/hgm_task_handle_thread.cpp", "core/frame_rate_manager/hgm_vsync_generator_controller.cpp", "core/hgm_screen_manager/hgm_core.cpp", "core/hgm_screen_manager/hgm_screen.cpp", "core/utils/hgm_one_shot_timer.cpp", ] if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) { cflags = [ "-flto=thin", "-fwhole-program-vtables", ] } deps = [ "$graphic_2d_root/rosen/modules/render_frame_trace:render_frame_trace", "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base", "//third_party/libxml2:xml2", ] external_deps = [ "c_utils:utils", "config_policy:configpolicy_util", "eventhandler:libeventhandler", "hitrace:hitrace_meter", "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", ] part_name = "graphic_2d" subsystem_name = "graphic" if (is_standard_system) { external_deps += [ "hilog:libhilog" ] } else { external_deps += [ "hilog:libhilog" ] } }