1e9297d28Sopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
2e9297d28Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3e9297d28Sopenharmony_ci# you may not use this file except in compliance with the License.
4e9297d28Sopenharmony_ci# You may obtain a copy of the License at
5e9297d28Sopenharmony_ci#
6e9297d28Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7e9297d28Sopenharmony_ci#
8e9297d28Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9e9297d28Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10e9297d28Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11e9297d28Sopenharmony_ci# See the License for the specific language governing permissions and
12e9297d28Sopenharmony_ci# limitations under the License.
13e9297d28Sopenharmony_ci
14e9297d28Sopenharmony_ciimport("//build/ohos.gni")
15e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/graphic_config.gni")
16e9297d28Sopenharmony_ciimport(
17e9297d28Sopenharmony_ci    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/config.gni")
18e9297d28Sopenharmony_ci
19e9297d28Sopenharmony_ciconfig("export_config") {
20e9297d28Sopenharmony_ci  include_dirs = [
21e9297d28Sopenharmony_ci    "include",
22e9297d28Sopenharmony_ci    "${graphic_2d_root}/utils/log",
23e9297d28Sopenharmony_ci  ]
24e9297d28Sopenharmony_ci  cflags_cc = [ "-std=c++17" ]
25e9297d28Sopenharmony_ci
26e9297d28Sopenharmony_ci  defines = rs_common_define
27e9297d28Sopenharmony_ci  defines += gpu_defines
28e9297d28Sopenharmony_ci}
29e9297d28Sopenharmony_ci
30e9297d28Sopenharmony_ciif (!is_mingw && !is_mac && !is_cross_platform) {
31e9297d28Sopenharmony_ci  defines = [ "ENABLE_RUST" ]
32e9297d28Sopenharmony_ci  rust_cxx("particle_cxx_gen") {
33e9297d28Sopenharmony_ci    sources = [ "rust/src/lib.rs" ]
34e9297d28Sopenharmony_ci  }
35e9297d28Sopenharmony_ci
36e9297d28Sopenharmony_ci  ohos_rust_static_ffi("particle_cxx_rust") {
37e9297d28Sopenharmony_ci    sources = [ "rust/src/lib.rs" ]
38e9297d28Sopenharmony_ci    deps = [ "//third_party/rust/crates/cxx:lib" ]
39e9297d28Sopenharmony_ci    part_name = "graphic_2d"
40e9297d28Sopenharmony_ci    subsystem_name = "graphic"
41e9297d28Sopenharmony_ci  }
42e9297d28Sopenharmony_ci
43e9297d28Sopenharmony_ci  ohos_static_library("particle_cxx_cppdeps") {
44e9297d28Sopenharmony_ci    branch_protector_ret = "pac_ret"
45e9297d28Sopenharmony_ci    sanitize = {
46e9297d28Sopenharmony_ci      cfi = false
47e9297d28Sopenharmony_ci      cfi_cross_dso = false
48e9297d28Sopenharmony_ci      debug = false
49e9297d28Sopenharmony_ci      blocklist = "./rs_base_blocklist.txt"
50e9297d28Sopenharmony_ci    }
51e9297d28Sopenharmony_ci    part_name = "graphic_2d"
52e9297d28Sopenharmony_ci    subsystem_name = "graphic"
53e9297d28Sopenharmony_ci    defines += [ "RUST_CXX_NO_EXCEPTIONS" ]
54e9297d28Sopenharmony_ci    sources = [
55e9297d28Sopenharmony_ci      "//third_party/rust/crates/cxx/include/cxx.h",
56e9297d28Sopenharmony_ci      "//third_party/rust/crates/cxx/src/cxx.cc",
57e9297d28Sopenharmony_ci    ]
58e9297d28Sopenharmony_ci    deps = [ "//third_party/rust/crates/cxx:lib" ]
59e9297d28Sopenharmony_ci  }
60e9297d28Sopenharmony_ci}
61e9297d28Sopenharmony_ci
62e9297d28Sopenharmony_ciohos_source_set("render_service_base_src") {
63e9297d28Sopenharmony_ci  branch_protector_ret = "pac_ret"
64e9297d28Sopenharmony_ci  sanitize = {
65e9297d28Sopenharmony_ci    cfi = false
66e9297d28Sopenharmony_ci    cfi_cross_dso = false
67e9297d28Sopenharmony_ci    debug = false
68e9297d28Sopenharmony_ci    blocklist = "./rs_base_blocklist.txt"
69e9297d28Sopenharmony_ci    if (rosen_is_ohos) {
70e9297d28Sopenharmony_ci      boundary_sanitize = true
71e9297d28Sopenharmony_ci      integer_overflow = false
72e9297d28Sopenharmony_ci      ubsan = true
73e9297d28Sopenharmony_ci    }
74e9297d28Sopenharmony_ci  }
75e9297d28Sopenharmony_ci  defines = []
76e9297d28Sopenharmony_ci  defines += gpu_defines
77e9297d28Sopenharmony_ci  defines += [ "MODULE_RSB" ]
78e9297d28Sopenharmony_ci
79e9297d28Sopenharmony_ci  sources = [
80e9297d28Sopenharmony_ci    #animation
81e9297d28Sopenharmony_ci    "src/animation/rs_animation_fraction.cpp",
82e9297d28Sopenharmony_ci    "src/animation/rs_animation_manager.cpp",
83e9297d28Sopenharmony_ci    "src/animation/rs_animation_rate_decider.cpp",
84e9297d28Sopenharmony_ci    "src/animation/rs_animation_timing_protocol.cpp",
85e9297d28Sopenharmony_ci    "src/animation/rs_animation_trace_utils.cpp",
86e9297d28Sopenharmony_ci    "src/animation/rs_cubic_bezier_interpolator.cpp",
87e9297d28Sopenharmony_ci    "src/animation/rs_interpolator.cpp",
88e9297d28Sopenharmony_ci    "src/animation/rs_particle_noise_field.cpp",
89e9297d28Sopenharmony_ci    "src/animation/rs_render_animation.cpp",
90e9297d28Sopenharmony_ci    "src/animation/rs_render_curve_animation.cpp",
91e9297d28Sopenharmony_ci    "src/animation/rs_render_interactive_implict_animator.cpp",
92e9297d28Sopenharmony_ci    "src/animation/rs_render_interactive_implict_animator_map.cpp",
93e9297d28Sopenharmony_ci    "src/animation/rs_render_interpolating_spring_animation.cpp",
94e9297d28Sopenharmony_ci    "src/animation/rs_render_keyframe_animation.cpp",
95e9297d28Sopenharmony_ci    "src/animation/rs_render_particle.cpp",
96e9297d28Sopenharmony_ci    "src/animation/rs_render_particle_animation.cpp",
97e9297d28Sopenharmony_ci    "src/animation/rs_render_particle_effector.cpp",
98e9297d28Sopenharmony_ci    "src/animation/rs_render_particle_emitter.cpp",
99e9297d28Sopenharmony_ci    "src/animation/rs_render_particle_system.cpp",
100e9297d28Sopenharmony_ci    "src/animation/rs_render_path_animation.cpp",
101e9297d28Sopenharmony_ci    "src/animation/rs_render_property_animation.cpp",
102e9297d28Sopenharmony_ci    "src/animation/rs_render_spring_animation.cpp",
103e9297d28Sopenharmony_ci    "src/animation/rs_render_transition.cpp",
104e9297d28Sopenharmony_ci    "src/animation/rs_render_transition_effect.cpp",
105e9297d28Sopenharmony_ci    "src/animation/rs_spring_interpolator.cpp",
106e9297d28Sopenharmony_ci    "src/animation/rs_spring_model.cpp",
107e9297d28Sopenharmony_ci    "src/animation/rs_steps_interpolator.cpp",
108e9297d28Sopenharmony_ci    "src/animation/rs_value_estimator.cpp",
109e9297d28Sopenharmony_ci
110e9297d28Sopenharmony_ci    # message(depracated)
111e9297d28Sopenharmony_ci    "src/command/rs_message_processor.cpp",
112e9297d28Sopenharmony_ci
113e9297d28Sopenharmony_ci    # modifier
114e9297d28Sopenharmony_ci    "src/modifier/rs_render_modifier.cpp",
115e9297d28Sopenharmony_ci    "src/modifier/rs_render_property.cpp",
116e9297d28Sopenharmony_ci
117e9297d28Sopenharmony_ci    #command
118e9297d28Sopenharmony_ci    "src/command/rs_animation_command.cpp",
119e9297d28Sopenharmony_ci    "src/command/rs_base_node_command.cpp",
120e9297d28Sopenharmony_ci    "src/command/rs_canvas_drawing_node_command.cpp",
121e9297d28Sopenharmony_ci    "src/command/rs_canvas_node_command.cpp",
122e9297d28Sopenharmony_ci    "src/command/rs_command_factory.cpp",
123e9297d28Sopenharmony_ci    "src/command/rs_display_node_command.cpp",
124e9297d28Sopenharmony_ci    "src/command/rs_effect_node_command.cpp",
125e9297d28Sopenharmony_ci    "src/command/rs_frame_rate_linker_command.cpp",
126e9297d28Sopenharmony_ci    "src/command/rs_node_command.cpp",
127e9297d28Sopenharmony_ci    "src/command/rs_node_showing_command.cpp",
128e9297d28Sopenharmony_ci    "src/command/rs_proxy_node_command.cpp",
129e9297d28Sopenharmony_ci    "src/command/rs_root_node_command.cpp",
130e9297d28Sopenharmony_ci    "src/command/rs_surface_node_command.cpp",
131e9297d28Sopenharmony_ci
132e9297d28Sopenharmony_ci    #offscreen_render
133e9297d28Sopenharmony_ci    "src/offscreen_render/rs_offscreen_render_thread.cpp",
134e9297d28Sopenharmony_ci
135e9297d28Sopenharmony_ci    #common
136e9297d28Sopenharmony_ci    "src/common/rs_background_thread.cpp",
137e9297d28Sopenharmony_ci    "src/common/rs_color.cpp",
138e9297d28Sopenharmony_ci    "src/common/rs_common_def.cpp",
139e9297d28Sopenharmony_ci    "src/common/rs_common_tools.cpp",
140e9297d28Sopenharmony_ci    "src/common/rs_obj_abs_geometry.cpp",
141e9297d28Sopenharmony_ci    "src/common/rs_occlusion_region.cpp",
142e9297d28Sopenharmony_ci    "src/common/rs_occlusion_region_helper.cpp",
143e9297d28Sopenharmony_ci    "src/common/rs_thread_handler_generic.cpp",
144e9297d28Sopenharmony_ci    "src/common/rs_thread_looper_generic.cpp",
145e9297d28Sopenharmony_ci    "src/common/rs_thread_looper_impl.cpp",
146e9297d28Sopenharmony_ci    "src/common/rs_xcollie.cpp",
147e9297d28Sopenharmony_ci
148e9297d28Sopenharmony_ci    #delegate
149e9297d28Sopenharmony_ci    "src/delegate/rs_functional_delegate.cpp",
150e9297d28Sopenharmony_ci
151e9297d28Sopenharmony_ci    #ipc_callbacks
152e9297d28Sopenharmony_ci    "src/ipc_callbacks/buffer_available_callback_proxy.cpp",
153e9297d28Sopenharmony_ci    "src/ipc_callbacks/buffer_available_callback_stub.cpp",
154e9297d28Sopenharmony_ci    "src/ipc_callbacks/buffer_clear_callback_proxy.cpp",
155e9297d28Sopenharmony_ci    "src/ipc_callbacks/buffer_clear_callback_stub.cpp",
156e9297d28Sopenharmony_ci    "src/ipc_callbacks/hgm_config_change_callback_proxy.cpp",
157e9297d28Sopenharmony_ci    "src/ipc_callbacks/hgm_config_change_callback_stub.cpp",
158e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_application_agent_proxy.cpp",
159e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_application_agent_stub.cpp",
160e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_occlusion_change_callback_proxy.cpp",
161e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_occlusion_change_callback_stub.cpp",
162e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_rt_refresh_callback.cpp",
163e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_surface_buffer_callback.cpp",
164e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_surface_buffer_callback_proxy.cpp",
165e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_surface_buffer_callback_stub.cpp",
166e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_surface_occlusion_change_callback_proxy.cpp",
167e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_surface_occlusion_change_callback_stub.cpp",
168e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_uiextension_callback_proxy.cpp",
169e9297d28Sopenharmony_ci    "src/ipc_callbacks/rs_uiextension_callback_stub.cpp",
170e9297d28Sopenharmony_ci    "src/ipc_callbacks/screen_change_callback_proxy.cpp",
171e9297d28Sopenharmony_ci    "src/ipc_callbacks/screen_change_callback_stub.cpp",
172e9297d28Sopenharmony_ci    "src/ipc_callbacks/surface_capture_callback_proxy.cpp",
173e9297d28Sopenharmony_ci    "src/ipc_callbacks/surface_capture_callback_stub.cpp",
174e9297d28Sopenharmony_ci
175e9297d28Sopenharmony_ci    #ipc_security
176e9297d28Sopenharmony_ci    "src/ipc_security/rs_ipc_interface_code_access_verifier_base.cpp",
177e9297d28Sopenharmony_ci
178e9297d28Sopenharmony_ci    #memory
179e9297d28Sopenharmony_ci    "src/memory/rs_memory_graphic.cpp",
180e9297d28Sopenharmony_ci    "src/memory/rs_memory_snapshot.cpp",
181e9297d28Sopenharmony_ci    "src/memory/rs_memory_track.cpp",
182e9297d28Sopenharmony_ci    "src/memory/rs_tag_tracker.cpp",
183e9297d28Sopenharmony_ci
184e9297d28Sopenharmony_ci    #params
185e9297d28Sopenharmony_ci    "src/params/rs_canvas_drawing_render_params.cpp",
186e9297d28Sopenharmony_ci    "src/params/rs_display_render_params.cpp",
187e9297d28Sopenharmony_ci    "src/params/rs_effect_render_params.cpp",
188e9297d28Sopenharmony_ci    "src/params/rs_render_params.cpp",
189e9297d28Sopenharmony_ci    "src/params/rs_render_thread_params.cpp",
190e9297d28Sopenharmony_ci    "src/params/rs_surface_render_params.cpp",
191e9297d28Sopenharmony_ci
192e9297d28Sopenharmony_ci    #pipeline
193e9297d28Sopenharmony_ci    "src/pipeline/rs_canvas_drawing_render_node.cpp",
194e9297d28Sopenharmony_ci    "src/pipeline/rs_canvas_render_node.cpp",
195e9297d28Sopenharmony_ci    "src/pipeline/rs_context.cpp",
196e9297d28Sopenharmony_ci    "src/pipeline/rs_dirty_region_manager.cpp",
197e9297d28Sopenharmony_ci    "src/pipeline/rs_display_render_node.cpp",
198e9297d28Sopenharmony_ci    "src/pipeline/rs_draw_cmd.cpp",
199e9297d28Sopenharmony_ci    "src/pipeline/rs_draw_cmd_list.cpp",
200e9297d28Sopenharmony_ci    "src/pipeline/rs_effect_render_node.cpp",
201e9297d28Sopenharmony_ci    "src/pipeline/rs_occlusion_config.cpp",
202e9297d28Sopenharmony_ci    "src/pipeline/rs_paint_filter_canvas.cpp",
203e9297d28Sopenharmony_ci    "src/pipeline/rs_proxy_render_node.cpp",
204e9297d28Sopenharmony_ci    "src/pipeline/rs_record_cmd_utils.cpp",
205e9297d28Sopenharmony_ci    "src/pipeline/rs_recording_canvas.cpp",
206e9297d28Sopenharmony_ci    "src/pipeline/rs_render_content.cpp",
207e9297d28Sopenharmony_ci    "src/pipeline/rs_render_display_sync.cpp",
208e9297d28Sopenharmony_ci    "src/pipeline/rs_render_frame_rate_linker.cpp",
209e9297d28Sopenharmony_ci    "src/pipeline/rs_render_frame_rate_linker_map.cpp",
210e9297d28Sopenharmony_ci    "src/pipeline/rs_render_node.cpp",
211e9297d28Sopenharmony_ci    "src/pipeline/rs_render_node_autocache.cpp",
212e9297d28Sopenharmony_ci    "src/pipeline/rs_render_node_gc.cpp",
213e9297d28Sopenharmony_ci    "src/pipeline/rs_render_node_map.cpp",
214e9297d28Sopenharmony_ci    "src/pipeline/rs_root_render_node.cpp",
215e9297d28Sopenharmony_ci    "src/pipeline/rs_single_frame_composer.cpp",
216e9297d28Sopenharmony_ci    "src/pipeline/rs_surface_buffer_callback_manager.cpp",
217e9297d28Sopenharmony_ci    "src/pipeline/rs_surface_handler.cpp",
218e9297d28Sopenharmony_ci    "src/pipeline/rs_surface_render_node.cpp",
219e9297d28Sopenharmony_ci    "src/pipeline/rs_task_dispatcher.cpp",
220e9297d28Sopenharmony_ci    "src/pipeline/rs_uni_render_judgement.cpp",
221e9297d28Sopenharmony_ci    "src/pipeline/sk_resource_manager.cpp",
222e9297d28Sopenharmony_ci
223e9297d28Sopenharmony_ci    #property
224e9297d28Sopenharmony_ci    "src/property/rs_filter_cache_manager.cpp",
225e9297d28Sopenharmony_ci    "src/property/rs_point_light_manager.cpp",
226e9297d28Sopenharmony_ci    "src/property/rs_properties.cpp",
227e9297d28Sopenharmony_ci    "src/property/rs_properties_painter.cpp",
228e9297d28Sopenharmony_ci    "src/property/rs_property_drawable.cpp",
229e9297d28Sopenharmony_ci    "src/property/rs_property_drawable_bounds_geometry.cpp",
230e9297d28Sopenharmony_ci    "src/property/rs_property_drawable_frame_geometry.cpp",
231e9297d28Sopenharmony_ci    "src/property/rs_property_drawable_utilities.cpp",
232e9297d28Sopenharmony_ci    "src/property/rs_property_trace.cpp",
233e9297d28Sopenharmony_ci
234e9297d28Sopenharmony_ci    #drawable
235e9297d28Sopenharmony_ci    "src/drawable/rs_drawable.cpp",
236e9297d28Sopenharmony_ci    "src/drawable/rs_misc_drawable.cpp",
237e9297d28Sopenharmony_ci    "src/drawable/rs_property_drawable.cpp",
238e9297d28Sopenharmony_ci    "src/drawable/rs_property_drawable_background.cpp",
239e9297d28Sopenharmony_ci    "src/drawable/rs_property_drawable_foreground.cpp",
240e9297d28Sopenharmony_ci    "src/drawable/rs_property_drawable_utils.cpp",
241e9297d28Sopenharmony_ci    "src/drawable/rs_render_node_drawable_adapter.cpp",
242e9297d28Sopenharmony_ci    "src/drawable/rs_render_node_shadow_drawable.cpp",
243e9297d28Sopenharmony_ci
244e9297d28Sopenharmony_ci    #render
245e9297d28Sopenharmony_ci    "src/render/rs_aibar_shader_filter.cpp",
246e9297d28Sopenharmony_ci    "src/render/rs_attraction_effect_filter.cpp",
247e9297d28Sopenharmony_ci    "src/render/rs_blur_filter.cpp",
248e9297d28Sopenharmony_ci    "src/render/rs_border.cpp",
249e9297d28Sopenharmony_ci    "src/render/rs_color_extract.cpp",
250e9297d28Sopenharmony_ci    "src/render/rs_color_picker.cpp",
251e9297d28Sopenharmony_ci    "src/render/rs_colorful_shadow_filter.cpp",
252e9297d28Sopenharmony_ci    "src/render/rs_distortion_shader_filter.cpp",
253e9297d28Sopenharmony_ci    "src/render/rs_drawing_filter.cpp",
254e9297d28Sopenharmony_ci    "src/render/rs_filter.cpp",
255e9297d28Sopenharmony_ci    "src/render/rs_fly_out_shader_filter.cpp",
256e9297d28Sopenharmony_ci    "src/render/rs_foreground_effect_filter.cpp",
257e9297d28Sopenharmony_ci    "src/render/rs_grey_shader_filter.cpp",
258e9297d28Sopenharmony_ci    "src/render/rs_hps_blur.cpp",
259e9297d28Sopenharmony_ci    "src/render/rs_image.cpp",
260e9297d28Sopenharmony_ci    "src/render/rs_image_base.cpp",
261e9297d28Sopenharmony_ci    "src/render/rs_image_cache.cpp",
262e9297d28Sopenharmony_ci    "src/render/rs_kawase_blur.cpp",
263e9297d28Sopenharmony_ci    "src/render/rs_kawase_blur_shader_filter.cpp",
264e9297d28Sopenharmony_ci    "src/render/rs_light_up_effect_filter.cpp",
265e9297d28Sopenharmony_ci    "src/render/rs_linear_gradient_blur_shader_filter.cpp",
266e9297d28Sopenharmony_ci    "src/render/rs_magnifier_shader_filter.cpp",
267e9297d28Sopenharmony_ci    "src/render/rs_mask.cpp",
268e9297d28Sopenharmony_ci    "src/render/rs_maskcolor_shader_filter.cpp",
269e9297d28Sopenharmony_ci    "src/render/rs_material_filter.cpp",
270e9297d28Sopenharmony_ci    "src/render/rs_mesa_blur_shader_filter.cpp",
271e9297d28Sopenharmony_ci    "src/render/rs_motion_blur_filter.cpp",
272e9297d28Sopenharmony_ci    "src/render/rs_particles_drawable.cpp",
273e9297d28Sopenharmony_ci    "src/render/rs_path.cpp",
274e9297d28Sopenharmony_ci    "src/render/rs_pixel_map_shader.cpp",
275e9297d28Sopenharmony_ci    "src/render/rs_pixel_map_util.cpp",
276e9297d28Sopenharmony_ci    "src/render/rs_resource_manager.cpp",
277e9297d28Sopenharmony_ci    "src/render/rs_shader.cpp",
278e9297d28Sopenharmony_ci    "src/render/rs_shadow.cpp",
279e9297d28Sopenharmony_ci    "src/render/rs_skia_filter.cpp",
280e9297d28Sopenharmony_ci    "src/render/rs_spherize_effect_filter.cpp",
281e9297d28Sopenharmony_ci    "src/render/rs_typeface_cache.cpp",
282e9297d28Sopenharmony_ci    "src/render/rs_water_ripple_shader_filter.cpp",
283e9297d28Sopenharmony_ci
284e9297d28Sopenharmony_ci    #transaction
285e9297d28Sopenharmony_ci    "src/transaction/rs_hgm_config_data.cpp",
286e9297d28Sopenharmony_ci    "src/transaction/rs_occlusion_data.cpp",
287e9297d28Sopenharmony_ci    "src/transaction/rs_transaction_data.cpp",
288e9297d28Sopenharmony_ci    "src/transaction/rs_transaction_metric_collector.cpp",
289e9297d28Sopenharmony_ci    "src/transaction/rs_transaction_proxy.cpp",
290e9297d28Sopenharmony_ci    "src/transaction/rs_uiextension_data.cpp",
291e9297d28Sopenharmony_ci
292e9297d28Sopenharmony_ci    #screen_manager
293e9297d28Sopenharmony_ci    "src/screen_manager/rs_screen_capability.cpp",
294e9297d28Sopenharmony_ci    "src/screen_manager/rs_screen_data.cpp",
295e9297d28Sopenharmony_ci    "src/screen_manager/rs_screen_hdr_capability.cpp",
296e9297d28Sopenharmony_ci    "src/screen_manager/rs_screen_mode_info.cpp",
297e9297d28Sopenharmony_ci    "src/screen_manager/rs_screen_props.cpp",
298e9297d28Sopenharmony_ci    "src/screen_manager/rs_virtual_screen_resolution.cpp",
299e9297d28Sopenharmony_ci
300e9297d28Sopenharmony_ci    #info_collection
301e9297d28Sopenharmony_ci    "src/info_collection/rs_gpu_dirty_region_collection.cpp",
302e9297d28Sopenharmony_ci    "src/info_collection/rs_hardware_compose_disabled_reason_collection.cpp",
303e9297d28Sopenharmony_ci    "src/info_collection/rs_layer_compose_collection.cpp",
304e9297d28Sopenharmony_ci  ]
305e9297d28Sopenharmony_ci
306e9297d28Sopenharmony_ci  if (defined(input_ext_feature_magiccursor) && input_ext_feature_magiccursor) {
307e9297d28Sopenharmony_ci    sources += [
308e9297d28Sopenharmony_ci      #ipc_callbacks
309e9297d28Sopenharmony_ci      "src/ipc_callbacks/pointer_render/pointer_luminance_callback_ipc_interface_code_access_verifier.cpp",
310e9297d28Sopenharmony_ci      "src/ipc_callbacks/pointer_render/pointer_luminance_callback_proxy.cpp",
311e9297d28Sopenharmony_ci      "src/ipc_callbacks/pointer_render/pointer_luminance_callback_stub.cpp",
312e9297d28Sopenharmony_ci    ]
313e9297d28Sopenharmony_ci  }
314e9297d28Sopenharmony_ci
315e9297d28Sopenharmony_ci  if (rosen_is_ohos) {
316e9297d28Sopenharmony_ci    sources += [
317e9297d28Sopenharmony_ci      #luminance
318e9297d28Sopenharmony_ci      "src/luminance/rs_luminance_control.cpp",
319e9297d28Sopenharmony_ci    ]
320e9297d28Sopenharmony_ci  } else {
321e9297d28Sopenharmony_ci    sources += [
322e9297d28Sopenharmony_ci      #luminance
323e9297d28Sopenharmony_ci      "src/luminance/mingw/rs_luminance_control.cpp",
324e9297d28Sopenharmony_ci    ]
325e9297d28Sopenharmony_ci  }
326e9297d28Sopenharmony_ci
327e9297d28Sopenharmony_ci  if (is_cross_platform) {
328e9297d28Sopenharmony_ci    sources -= [
329e9297d28Sopenharmony_ci      #command
330e9297d28Sopenharmony_ci      "src/command/rs_display_node_command.cpp",
331e9297d28Sopenharmony_ci
332e9297d28Sopenharmony_ci      #common
333e9297d28Sopenharmony_ci      "src/common/rs_occlusion_region.cpp",
334e9297d28Sopenharmony_ci      "src/common/rs_occlusion_region_helper.cpp",
335e9297d28Sopenharmony_ci      "src/common/rs_thread_handler_generic.cpp",
336e9297d28Sopenharmony_ci      "src/common/rs_thread_looper_generic.cpp",
337e9297d28Sopenharmony_ci      "src/common/rs_thread_looper_impl.cpp",
338e9297d28Sopenharmony_ci
339e9297d28Sopenharmony_ci      #ipc_callbacks
340e9297d28Sopenharmony_ci      "src/ipc_callbacks/buffer_available_callback_proxy.cpp",
341e9297d28Sopenharmony_ci      "src/ipc_callbacks/buffer_available_callback_stub.cpp",
342e9297d28Sopenharmony_ci      "src/ipc_callbacks/buffer_clear_callback_proxy.cpp",
343e9297d28Sopenharmony_ci      "src/ipc_callbacks/buffer_clear_callback_stub.cpp",
344e9297d28Sopenharmony_ci      "src/ipc_callbacks/hgm_config_change_callback_proxy.cpp",
345e9297d28Sopenharmony_ci      "src/ipc_callbacks/hgm_config_change_callback_stub.cpp",
346e9297d28Sopenharmony_ci      "src/ipc_callbacks/rs_occlusion_change_callback_proxy.cpp",
347e9297d28Sopenharmony_ci      "src/ipc_callbacks/rs_occlusion_change_callback_stub.cpp",
348e9297d28Sopenharmony_ci      "src/ipc_callbacks/rs_surface_occlusion_change_callback_proxy.cpp",
349e9297d28Sopenharmony_ci      "src/ipc_callbacks/rs_surface_occlusion_change_callback_stub.cpp",
350e9297d28Sopenharmony_ci      "src/ipc_callbacks/screen_change_callback_proxy.cpp",
351e9297d28Sopenharmony_ci      "src/ipc_callbacks/screen_change_callback_stub.cpp",
352e9297d28Sopenharmony_ci      "src/ipc_callbacks/surface_capture_callback_proxy.cpp",
353e9297d28Sopenharmony_ci      "src/ipc_callbacks/surface_capture_callback_stub.cpp",
354e9297d28Sopenharmony_ci
355e9297d28Sopenharmony_ci      #ipc_security
356e9297d28Sopenharmony_ci      "src/ipc_security/rs_ipc_interface_code_access_verifier_base.cpp",
357e9297d28Sopenharmony_ci
358e9297d28Sopenharmony_ci      #memory
359e9297d28Sopenharmony_ci      "src/memory/rs_memory_graphic.cpp",
360e9297d28Sopenharmony_ci      "src/memory/rs_memory_track.cpp",
361e9297d28Sopenharmony_ci      "src/memory/rs_tag_tracker.cpp",
362e9297d28Sopenharmony_ci
363e9297d28Sopenharmony_ci      #pipeline
364e9297d28Sopenharmony_ci      "src/pipeline/rs_occlusion_config.cpp",
365e9297d28Sopenharmony_ci
366e9297d28Sopenharmony_ci      #transaction
367e9297d28Sopenharmony_ci      "src/transaction/rs_hgm_config_data.cpp",
368e9297d28Sopenharmony_ci      "src/transaction/rs_occlusion_data.cpp",
369e9297d28Sopenharmony_ci
370e9297d28Sopenharmony_ci      #screen_manager
371e9297d28Sopenharmony_ci      "src/screen_manager/rs_screen_capability.cpp",
372e9297d28Sopenharmony_ci      "src/screen_manager/rs_screen_data.cpp",
373e9297d28Sopenharmony_ci      "src/screen_manager/rs_screen_hdr_capability.cpp",
374e9297d28Sopenharmony_ci      "src/screen_manager/rs_screen_mode_info.cpp",
375e9297d28Sopenharmony_ci      "src/screen_manager/rs_screen_props.cpp",
376e9297d28Sopenharmony_ci      "src/screen_manager/rs_virtual_screen_resolution.cpp",
377e9297d28Sopenharmony_ci    ]
378e9297d28Sopenharmony_ci  }
379e9297d28Sopenharmony_ci
380e9297d28Sopenharmony_ci  cflags = [
381e9297d28Sopenharmony_ci    "-Wall",
382e9297d28Sopenharmony_ci    "-Wno-pointer-arith",
383e9297d28Sopenharmony_ci    "-Wno-non-virtual-dtor",
384e9297d28Sopenharmony_ci    "-Wno-missing-field-initializers",
385e9297d28Sopenharmony_ci    "-Wno-c++11-narrowing",
386e9297d28Sopenharmony_ci    "-fvisibility=hidden",
387e9297d28Sopenharmony_ci    "-DIMAGE_COLORSPACE_FLAG",
388e9297d28Sopenharmony_ci  ]
389e9297d28Sopenharmony_ci
390e9297d28Sopenharmony_ci  if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) {
391e9297d28Sopenharmony_ci    if (!use_libfuzzer) {
392e9297d28Sopenharmony_ci      cflags += [ "-flto=thin" ]
393e9297d28Sopenharmony_ci    }
394e9297d28Sopenharmony_ci    if (enhanced_opt) {
395e9297d28Sopenharmony_ci      if (!use_libfuzzer) {
396e9297d28Sopenharmony_ci        cflags += [ "-fwhole-program-vtables" ]
397e9297d28Sopenharmony_ci      }
398e9297d28Sopenharmony_ci      if (graphic_2d_feature_enable_pgo &&
399e9297d28Sopenharmony_ci          graphic_2d_feature_product != "default") {
400e9297d28Sopenharmony_ci        cflags += [
401e9297d28Sopenharmony_ci          "-fprofile-use=" + rebase_path(
402e9297d28Sopenharmony_ci                  "${graphic_2d_feature_pgo_path}/librender_service_base.profdata",
403e9297d28Sopenharmony_ci                  root_build_dir),
404e9297d28Sopenharmony_ci          "-Wno-error=backend-plugin",
405e9297d28Sopenharmony_ci          "-Wno-profile-instr-out-of-date",
406e9297d28Sopenharmony_ci          "-Wno-profile-instr-unprofiled",
407e9297d28Sopenharmony_ci        ]
408e9297d28Sopenharmony_ci      }
409e9297d28Sopenharmony_ci      if (graphic_2d_feature_product == "pc" && target_cpu == "arm64") {
410e9297d28Sopenharmony_ci        cflags += [ "-moutline-atomics" ]
411e9297d28Sopenharmony_ci      }
412e9297d28Sopenharmony_ci    }
413e9297d28Sopenharmony_ci  }
414e9297d28Sopenharmony_ci
415e9297d28Sopenharmony_ci  cflags_cc = [
416e9297d28Sopenharmony_ci    "-std=c++17",
417e9297d28Sopenharmony_ci    "-fvisibility-inlines-hidden",
418e9297d28Sopenharmony_ci  ]
419e9297d28Sopenharmony_ci
420e9297d28Sopenharmony_ci  public_configs = [ ":export_config" ]
421e9297d28Sopenharmony_ci  public_deps = [ "src/platform:platform" ]
422e9297d28Sopenharmony_ci
423e9297d28Sopenharmony_ci  if (enable_export_macro) {
424e9297d28Sopenharmony_ci    defines += [ "ENABLE_EXPORT_MACRO" ]
425e9297d28Sopenharmony_ci  }
426e9297d28Sopenharmony_ci
427e9297d28Sopenharmony_ci  if (rs_enable_gpu) {
428e9297d28Sopenharmony_ci    defines += [
429e9297d28Sopenharmony_ci      "GL_GLEXT_PROTOTYPES",
430e9297d28Sopenharmony_ci      "EGL_EGLEXT_PROTOTYPES",
431e9297d28Sopenharmony_ci    ]
432e9297d28Sopenharmony_ci  }
433e9297d28Sopenharmony_ci
434e9297d28Sopenharmony_ci  if (current_os == "ohos") {
435e9297d28Sopenharmony_ci    defines += [ "IS_OHOS" ]
436e9297d28Sopenharmony_ci    sources += [
437e9297d28Sopenharmony_ci      "src/benchmarks/file_utils.cpp",
438e9297d28Sopenharmony_ci      "src/benchmarks/rs_recording_thread.cpp",
439e9297d28Sopenharmony_ci    ]
440e9297d28Sopenharmony_ci  }
441e9297d28Sopenharmony_ci
442e9297d28Sopenharmony_ci  include_dirs = [
443e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/utils",
444e9297d28Sopenharmony_ci    "$graphic_2d_root/interfaces/inner_api/common",
445e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/graphics_effect/include",
446e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/render_service_base/src",
447e9297d28Sopenharmony_ci    "$graphic_2d_root/rosen/modules/render_service_base/include",
448e9297d28Sopenharmony_ci    "$graphic_2d_root/utils/color_manager/export",
449e9297d28Sopenharmony_ci    "$graphic_2d_root/utils/log",
450e9297d28Sopenharmony_ci  ]
451e9297d28Sopenharmony_ci
452e9297d28Sopenharmony_ci  if (is_arkui_x) {
453e9297d28Sopenharmony_ci    include_dirs += [
454e9297d28Sopenharmony_ci      "$graphic_2d_root/utils/color_manager/export",
455e9297d28Sopenharmony_ci      "//foundation/multimedia/image_framework/interfaces/innerkits/include",
456e9297d28Sopenharmony_ci      "//foundation/graphic/graphic_surface/interfaces/inner_api/surface",
457e9297d28Sopenharmony_ci    ]
458e9297d28Sopenharmony_ci  }
459e9297d28Sopenharmony_ci
460e9297d28Sopenharmony_ci  deps = [
461e9297d28Sopenharmony_ci    "$graphic_2d_root/utils/sandbox:sandbox_utils",
462e9297d28Sopenharmony_ci    "$rosen_root/modules/graphics_effect:libgraphics_effect",
463e9297d28Sopenharmony_ci    "$rosen_root/modules/platform:hilog",
464e9297d28Sopenharmony_ci    "$rosen_root/modules/platform:ipc_core",
465e9297d28Sopenharmony_ci  ]
466e9297d28Sopenharmony_ci
467e9297d28Sopenharmony_ci  external_deps = [
468e9297d28Sopenharmony_ci    "graphic_surface:surface_headers",
469e9297d28Sopenharmony_ci    "hilog:libhilog",
470e9297d28Sopenharmony_ci  ]
471e9297d28Sopenharmony_ci
472e9297d28Sopenharmony_ci  if (rosen_is_ohos) {
473e9297d28Sopenharmony_ci    external_deps += [
474e9297d28Sopenharmony_ci      "hicollie:libhicollie",
475e9297d28Sopenharmony_ci      "image_framework:image_native",
476e9297d28Sopenharmony_ci    ]
477e9297d28Sopenharmony_ci  }
478e9297d28Sopenharmony_ci
479e9297d28Sopenharmony_ci  if (!is_mingw && !is_mac && !is_cross_platform) {
480e9297d28Sopenharmony_ci    defines += [ "ENABLE_RUST" ]
481e9297d28Sopenharmony_ci    sources += get_target_outputs(":particle_cxx_gen")
482e9297d28Sopenharmony_ci    include_dirs += [
483e9297d28Sopenharmony_ci      "//third_party/rust/crates/cxx/include",
484e9297d28Sopenharmony_ci      "${target_gen_dir}/rust/src",
485e9297d28Sopenharmony_ci    ]
486e9297d28Sopenharmony_ci    deps += [
487e9297d28Sopenharmony_ci      ":particle_cxx_cppdeps",
488e9297d28Sopenharmony_ci      ":particle_cxx_gen",
489e9297d28Sopenharmony_ci      ":particle_cxx_rust",
490e9297d28Sopenharmony_ci    ]
491e9297d28Sopenharmony_ci  }
492e9297d28Sopenharmony_ci
493e9297d28Sopenharmony_ci  if (use_video_processing_engine) {
494e9297d28Sopenharmony_ci    defines += [ "USE_VIDEO_PROCESSING_ENGINE" ]
495e9297d28Sopenharmony_ci    include_dirs += [ "$video_processing_engine_root/interfaces/inner_api" ]
496e9297d28Sopenharmony_ci    external_deps += [ "video_processing_engine:videoprocessingengine" ]
497e9297d28Sopenharmony_ci    sources += [ "src/render/rs_colorspace_convert.cpp" ]
498e9297d28Sopenharmony_ci  }
499e9297d28Sopenharmony_ci
500e9297d28Sopenharmony_ci  if (rosen_is_ohos && defined(enable_ipc_security) && enable_ipc_security) {
501e9297d28Sopenharmony_ci    defines += [ "ENABLE_IPC_SECURITY" ]
502e9297d28Sopenharmony_ci    external_deps += [
503e9297d28Sopenharmony_ci      "access_token:libaccesstoken_sdk",
504e9297d28Sopenharmony_ci      "access_token:libtokenid_sdk",
505e9297d28Sopenharmony_ci      "ipc:ipc_core",
506e9297d28Sopenharmony_ci    ]
507e9297d28Sopenharmony_ci  }
508e9297d28Sopenharmony_ci
509e9297d28Sopenharmony_ci  if (rosen_is_ohos && defined(enable_ipc_security_access_counter) &&
510e9297d28Sopenharmony_ci      enable_ipc_security_access_counter) {
511e9297d28Sopenharmony_ci    defines += [ "ENABLE_IPC_SECURITY_ACCESS_COUNTER" ]
512e9297d28Sopenharmony_ci  }
513e9297d28Sopenharmony_ci
514e9297d28Sopenharmony_ci  if (defined(use_rosen_drawing) && use_rosen_drawing) {
515e9297d28Sopenharmony_ci    defines += [ "USE_ROSEN_DRAWING" ]
516e9297d28Sopenharmony_ci    if (rs_enable_gpu) {
517e9297d28Sopenharmony_ci      defines += [ "RS_ENABLE_GPU" ]
518e9297d28Sopenharmony_ci    }
519e9297d28Sopenharmony_ci
520e9297d28Sopenharmony_ci    deps += [ "$rosen_root/modules/2d_graphics:2d_graphics" ]
521e9297d28Sopenharmony_ci  }
522e9297d28Sopenharmony_ci
523e9297d28Sopenharmony_ci  if (rosen_cross_platform) {
524e9297d28Sopenharmony_ci    public_configs += [
525e9297d28Sopenharmony_ci      "$rosen_root/modules/platform:eventhandler_config",
526e9297d28Sopenharmony_ci      "$rosen_root/modules/platform:image_native_config",
527e9297d28Sopenharmony_ci    ]
528e9297d28Sopenharmony_ci  } else {
529e9297d28Sopenharmony_ci    external_deps += [
530e9297d28Sopenharmony_ci      "drivers_interface_display:display_commontype_idl_headers",
531e9297d28Sopenharmony_ci      "hitrace:hitrace_meter",
532e9297d28Sopenharmony_ci    ]
533e9297d28Sopenharmony_ci  }
534e9297d28Sopenharmony_ci
535e9297d28Sopenharmony_ci  if (rosen_is_win) {
536e9297d28Sopenharmony_ci    defines += [ "_USE_MATH_DEFINES" ]
537e9297d28Sopenharmony_ci  }
538e9297d28Sopenharmony_ci
539e9297d28Sopenharmony_ci  if (defined(ddgr_ext_configs)) {
540e9297d28Sopenharmony_ci    libs = ddgr_ext_configs.ddgr_libs
541e9297d28Sopenharmony_ci    defines += ddgr_ext_configs.ddgr_defines
542e9297d28Sopenharmony_ci    sources += ddgr_ext_configs.libddgr_ext_adaptor_base_sources
543e9297d28Sopenharmony_ci    include_dirs += ddgr_ext_configs.libddgr_ext_adaptor_include_dirs
544e9297d28Sopenharmony_ci  }
545e9297d28Sopenharmony_ci
546e9297d28Sopenharmony_ci  #profiler
547e9297d28Sopenharmony_ci  if (rosen_is_ohos && graphic_2d_feature_rs_enable_profiler &&
548e9297d28Sopenharmony_ci      player_framework_enable) {
549e9297d28Sopenharmony_ci    defines += [ "RS_PROFILER_ENABLED" ]
550e9297d28Sopenharmony_ci    sources += [
551e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_archive.cpp",
552e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_base.cpp",
553e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_cache.cpp",
554e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_dump.cpp",
555e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_pixelmap.cpp",
556e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_settings.cpp",
557e9297d28Sopenharmony_ci      "$graphic_2d_root/rosen/modules/render_service_profiler/rs_profiler_utils.cpp",
558e9297d28Sopenharmony_ci    ]
559e9297d28Sopenharmony_ci
560e9297d28Sopenharmony_ci    if (defined(global_parts_info) &&
561e9297d28Sopenharmony_ci        defined(global_parts_info.open_source_libyuv)) {
562e9297d28Sopenharmony_ci      defines += [ "RS_PROFILER_SUPPORTS_PIXELMAP_YUV_EXT" ]
563e9297d28Sopenharmony_ci    }
564e9297d28Sopenharmony_ci  }
565e9297d28Sopenharmony_ci  include_dirs += [ "$graphic_2d_root/rosen/modules/render_service_profiler" ]
566e9297d28Sopenharmony_ci
567e9297d28Sopenharmony_ci  if (defined(global_parts_info) &&
568e9297d28Sopenharmony_ci      defined(global_parts_info.resourceschedule_resource_schedule_service)) {
569e9297d28Sopenharmony_ci    external_deps += [ "resource_schedule_service:ressched_client" ]
570e9297d28Sopenharmony_ci    defines += [ "RES_BASE_SCHED_ENABLE" ]
571e9297d28Sopenharmony_ci    external_deps += [ "qos_manager:qos" ]
572e9297d28Sopenharmony_ci  }
573e9297d28Sopenharmony_ci
574e9297d28Sopenharmony_ci  part_name = "graphic_2d"
575e9297d28Sopenharmony_ci  subsystem_name = "graphic"
576e9297d28Sopenharmony_ci}
577e9297d28Sopenharmony_ci
578e9297d28Sopenharmony_ciconfig("render_service_base_all_deps_config") {
579e9297d28Sopenharmony_ci  include_dirs = [ "include" ]
580e9297d28Sopenharmony_ci}
581e9297d28Sopenharmony_ci
582e9297d28Sopenharmony_ciconfig("render_service_base_link_config") {
583e9297d28Sopenharmony_ci  if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) {
584e9297d28Sopenharmony_ci    ldflags = [
585e9297d28Sopenharmony_ci      "-Wl,--lto-O2",
586e9297d28Sopenharmony_ci      "-Wl,-mllvm",
587e9297d28Sopenharmony_ci      "-Wl,-wholeprogramdevirt-check=fallback",
588e9297d28Sopenharmony_ci      "-Wl,-Bsymbolic",
589e9297d28Sopenharmony_ci    ]
590e9297d28Sopenharmony_ci
591e9297d28Sopenharmony_ci    if (graphic_2d_feature_enable_pgo && enable_enhanced_opt) {
592e9297d28Sopenharmony_ci      ldflags += [ "-Wl,--aarch64-inline-plt" ]
593e9297d28Sopenharmony_ci    }
594e9297d28Sopenharmony_ci  }
595e9297d28Sopenharmony_ci}
596e9297d28Sopenharmony_ci
597e9297d28Sopenharmony_ciohos_shared_library("librender_service_base") {
598e9297d28Sopenharmony_ci  branch_protector_ret = "pac_ret"
599e9297d28Sopenharmony_ci  if (!is_mingw && !is_win && !is_linux) {
600e9297d28Sopenharmony_ci    sanitize = {
601e9297d28Sopenharmony_ci      cfi = false
602e9297d28Sopenharmony_ci      cfi_cross_dso = false
603e9297d28Sopenharmony_ci      debug = false
604e9297d28Sopenharmony_ci      blocklist = "./rs_base_blocklist.txt"
605e9297d28Sopenharmony_ci    }
606e9297d28Sopenharmony_ci  }
607e9297d28Sopenharmony_ci
608e9297d28Sopenharmony_ci  sources = [ "src/common/rs_common_hook.cpp" ]
609e9297d28Sopenharmony_ci
610e9297d28Sopenharmony_ci  all_dependent_configs = [ ":render_service_base_all_deps_config" ]
611e9297d28Sopenharmony_ci
612e9297d28Sopenharmony_ci  public_configs = [ ":render_service_base_all_deps_config" ]
613e9297d28Sopenharmony_ci
614e9297d28Sopenharmony_ci  if (enhanced_opt) {
615e9297d28Sopenharmony_ci    configs = [ ":render_service_base_link_config" ]
616e9297d28Sopenharmony_ci  }
617e9297d28Sopenharmony_ci
618e9297d28Sopenharmony_ci  deps = [
619e9297d28Sopenharmony_ci    "$rosen_root/modules/platform:eventhandler",
620e9297d28Sopenharmony_ci    "src/platform:platform",
621e9297d28Sopenharmony_ci  ]
622e9297d28Sopenharmony_ci
623e9297d28Sopenharmony_ci  public_deps = [ ":render_service_base_src" ]
624e9297d28Sopenharmony_ci
625e9297d28Sopenharmony_ci  external_deps = [ "hilog:libhilog" ]
626e9297d28Sopenharmony_ci
627e9297d28Sopenharmony_ci  public_external_deps = []
628e9297d28Sopenharmony_ci  if (rosen_is_ohos) {
629e9297d28Sopenharmony_ci    public_external_deps += [
630e9297d28Sopenharmony_ci      "graphic_surface:sync_fence",
631e9297d28Sopenharmony_ci      "image_framework:image_native",
632e9297d28Sopenharmony_ci    ]
633e9297d28Sopenharmony_ci  }
634e9297d28Sopenharmony_ci
635e9297d28Sopenharmony_ci  if (rs_enable_gpu) {
636e9297d28Sopenharmony_ci    public_external_deps += [ "openssl:libcrypto_shared" ]
637e9297d28Sopenharmony_ci  }
638e9297d28Sopenharmony_ci
639e9297d28Sopenharmony_ci  part_name = "graphic_2d"
640e9297d28Sopenharmony_ci  subsystem_name = "graphic"
641e9297d28Sopenharmony_ci}
642e9297d28Sopenharmony_ci
643e9297d28Sopenharmony_ciohos_source_set("librender_service_base_static") {
644e9297d28Sopenharmony_ci  branch_protector_ret = "pac_ret"
645e9297d28Sopenharmony_ci  sanitize = {
646e9297d28Sopenharmony_ci    cfi = false
647e9297d28Sopenharmony_ci    cfi_cross_dso = false
648e9297d28Sopenharmony_ci    debug = false
649e9297d28Sopenharmony_ci    blocklist = "./rs_base_blocklist.txt"
650e9297d28Sopenharmony_ci  }
651e9297d28Sopenharmony_ci  all_dependent_configs = [ ":render_service_base_all_deps_config" ]
652e9297d28Sopenharmony_ci
653e9297d28Sopenharmony_ci  public_configs = [ ":render_service_base_all_deps_config" ]
654e9297d28Sopenharmony_ci
655e9297d28Sopenharmony_ci  if (is_arkui_x) {
656e9297d28Sopenharmony_ci    sources = [ "src/common/rs_common_hook.cpp" ]
657e9297d28Sopenharmony_ci  }
658e9297d28Sopenharmony_ci
659e9297d28Sopenharmony_ci  deps = [ "$rosen_root/modules/platform:eventhandler" ]
660e9297d28Sopenharmony_ci  public_deps = [
661e9297d28Sopenharmony_ci    ":render_service_base_src",
662e9297d28Sopenharmony_ci    "src/platform:platform",
663e9297d28Sopenharmony_ci  ]
664e9297d28Sopenharmony_ci
665e9297d28Sopenharmony_ci  public_external_deps = []
666e9297d28Sopenharmony_ci  if (rosen_is_ohos) {
667e9297d28Sopenharmony_ci    public_external_deps += [
668e9297d28Sopenharmony_ci      "graphic_surface:sync_fence",
669e9297d28Sopenharmony_ci      "image_framework:image_native",
670e9297d28Sopenharmony_ci    ]
671e9297d28Sopenharmony_ci  }
672e9297d28Sopenharmony_ci
673e9297d28Sopenharmony_ci  if (rs_enable_gpu) {
674e9297d28Sopenharmony_ci    if (is_arkui_x) {
675e9297d28Sopenharmony_ci      public_deps += [ "//third_party/openssl:libcrypto_static" ]
676e9297d28Sopenharmony_ci    } else {
677e9297d28Sopenharmony_ci      public_external_deps += [ "openssl:libcrypto_shared" ]
678e9297d28Sopenharmony_ci    }
679e9297d28Sopenharmony_ci  }
680e9297d28Sopenharmony_ci
681e9297d28Sopenharmony_ci  part_name = "graphic_2d"
682e9297d28Sopenharmony_ci  subsystem_name = "graphic"
683e9297d28Sopenharmony_ci}
684