1# Copyright (c) 2021-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") 16import("render_service_client.gni") 17 18config("render_service_client_config") { 19 include_dirs = [ 20 "$graphic_2d_root/rosen/modules", 21 "$graphic_2d_root/rosen/modules/render_service_client/core", 22 "$graphic_2d_root/rosen/modules/render_service_base/include", 23 "$graphic_2d_root/interfaces/inner_api/common", 24 "$graphic_2d_root/interfaces/inner_api/surface", 25 "$graphic_2d_root/interfaces/inner_api/composer", 26 "//drivers/peripheral/display/interfaces/include", 27 "//drivers/peripheral/base", 28 ] 29 defines = rs_common_define 30} 31 32ohos_source_set("render_service_client_src") { 33 defines = [] 34 defines += gpu_defines 35 defines += [ "MODULE_RSC" ] 36 include_dirs = [ 37 "$graphic_2d_root/rosen/modules/2d_graphics/src", 38 "$graphic_2d_root/rosen/modules/render_frame_trace/include", 39 "$graphic_2d_root/rosen/modules/render_service_base/src", 40 "//foundation/graphic/graphic_2d/utils/log", 41 "//foundation/graphic/graphic_2d/utils/sandbox", 42 ] 43 44 sources = [ 45 #animation 46 "core/animation/rs_animation.cpp", 47 "core/animation/rs_animation_callback.cpp", 48 "core/animation/rs_animation_group.cpp", 49 "core/animation/rs_animation_manager_map.cpp", 50 "core/animation/rs_animation_timing_curve.cpp", 51 "core/animation/rs_curve_animation.cpp", 52 "core/animation/rs_implicit_animation_param.cpp", 53 "core/animation/rs_implicit_animator.cpp", 54 "core/animation/rs_implicit_animator_map.cpp", 55 "core/animation/rs_keyframe_animation.cpp", 56 "core/animation/rs_path_animation.cpp", 57 "core/animation/rs_property_animation.cpp", 58 "core/animation/rs_spring_animation.cpp", 59 "core/animation/rs_transition.cpp", 60 "core/animation/rs_ui_animation_manager.cpp", 61 62 #modifier 63 "core/modifier/rs_extended_modifier.cpp", 64 "core/modifier/rs_modifier_extractor.cpp", 65 "core/modifier/rs_modifier_manager.cpp", 66 "core/modifier/rs_property.cpp", 67 "core/modifier/rs_property_modifier.cpp", 68 69 #jank_detector 70 "core/jank_detector/rs_jank_detector.cpp", 71 72 #pipeline 73 "core/pipeline/rs_node_map.cpp", 74 "core/pipeline/rs_render_thread.cpp", 75 "core/pipeline/rs_render_thread_visitor.cpp", 76 77 #transaction 78 "core/transaction/rs_application_agent_impl.cpp", 79 "core/transaction/rs_interfaces.cpp", 80 "core/transaction/rs_render_thread_client.cpp", 81 "core/transaction/rs_transaction.cpp", 82 83 #ui 84 "core/ui/rs_base_node.cpp", 85 "core/ui/rs_canvas_node.cpp", 86 "core/ui/rs_display_node.cpp", 87 "core/ui/rs_node.cpp", 88 "core/ui/rs_pixel_map_util.cpp", 89 "core/ui/rs_proxy_node.cpp", 90 "core/ui/rs_root_node.cpp", 91 "core/ui/rs_surface_extractor.cpp", 92 "core/ui/rs_surface_node.cpp", 93 "core/ui/rs_ui_director.cpp", 94 "core/ui/rs_ui_share_context.cpp", 95 ] 96 97 if (defined(graphic_2d_ext_configs.vendor_root)) { 98 sources += graphic_2d_ext_configs.librender_service_client_ext_sources 99 sources -= graphic_2d_ext_configs.librender_service_client_ext_sources_del 100 } 101 102 cflags = [ 103 "-Wall", 104 "-Wno-pointer-arith", 105 "-Wno-non-virtual-dtor", 106 "-Wno-missing-field-initializers", 107 "-Wno-c++11-narrowing", 108 "-fvisibility=hidden", 109 ] 110 111 cflags_cc = [ 112 "-std=c++17", 113 "-fvisibility-inlines-hidden", 114 ] 115 116 deps = [] 117 118 deps += [ 119 "$graphic_2d_root/rosen/modules/platform:eventhandler", 120 "$graphic_2d_root/rosen/modules/platform:ipc_core", 121 ] 122 123 if (rss_enabled) { 124 deps += [ "//foundation/resourceschedule/resource_schedule_service/ressched/interfaces/innerkits/ressched_client:ressched_client" ] 125 } 126 127 if (enable_export_macro) { 128 defines += [ "ENABLE_EXPORT_MACRO" ] 129 } 130 131 if (rss_enabled) { 132 defines += [ "OHOS_RSS_CLIENT" ] 133 } 134 135 if (rosen_cross_platform) { 136 deps += [ 137 "$graphic_2d_root:libgl", 138 "$graphic_2d_root/rosen/modules/glfw_render_context:libglfw_render_context", 139 ] 140 } else { 141 deps += [ 142 "$accessibility_root/interfaces/innerkits/acfwk:accessibilityconfig", 143 "$graphic_2d_root/rosen/modules/frame_analyzer:libframe_analyzer", 144 "$graphic_2d_root/rosen/modules/render_frame_trace:render_frame_trace", 145 ] 146 external_deps = [ 147 "c_utils:utils", 148 "hisysevent_native:libhisysevent", 149 "hitrace_native:hitrace_meter", 150 ] 151 } 152 153 public_deps = [ 154 "$graphic_2d_root/rosen/modules/render_service_base:librender_service_base", 155 ] 156 157 public_configs = [ ":render_service_client_config" ] 158} 159 160ohos_shared_library("librender_service_client") { 161 public_deps = [ 162 ":render_service_client_src", 163 "$graphic_2d_root/rosen/modules/platform:ace_skia", 164 ] 165 166 part_name = "graphic_standard" 167 subsystem_name = "graphic" 168} 169 170group("test") { 171 testonly = true 172 173 deps = [ "test:test" ] 174} 175