1e9297d28Sopenharmony_ci# Copyright (c) 2021 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/config/components/multimodalinput/cursor_config.gni") 15e9297d28Sopenharmony_cideclare_args() { 16e9297d28Sopenharmony_ci graphic_2d_feature_product = "default" 17e9297d28Sopenharmony_ci graphic_2d_feature_enable_pgo = false 18e9297d28Sopenharmony_ci graphic_2d_feature_pgo_path = "" 19e9297d28Sopenharmony_ci graphic_2d_feature_bootanimation_enable = true 20e9297d28Sopenharmony_ci graphic_2d_feature_ace_enable_gpu = true 21e9297d28Sopenharmony_ci graphic_2d_feature_color_gamut_enable = false 22e9297d28Sopenharmony_ci graphic_2d_feature_rs_enable_eglimage = false 23e9297d28Sopenharmony_ci graphic_2d_feature_rs_enable_profiler = true 24e9297d28Sopenharmony_ci graphic_2d_feature_use_texgine = false 25e9297d28Sopenharmony_ci graphic_2d_feature_rs_enable_uni_render = false 26e9297d28Sopenharmony_ci graphic_2d_feature_wuji_enable = false 27e9297d28Sopenharmony_ci graphic_2d_feature_enable_afbc = false 28e9297d28Sopenharmony_ci graphic_2d_feature_freemem_enable = false 29e9297d28Sopenharmony_ci graphic_2d_feature_parallel_render_enable = true 30e9297d28Sopenharmony_ci graphic_2d_feature_enable_vulkan = false 31e9297d28Sopenharmony_ci graphic_2d_feature_enable_flutter_vulkan = false 32e9297d28Sopenharmony_ci graphic_2d_feature_enable_opengl = true 33e9297d28Sopenharmony_ci graphic_2d_feature_enable_ddgr = false 34e9297d28Sopenharmony_ci graphic_2d_feature_enable_opinc = false 35e9297d28Sopenharmony_ci graphic_2d_feature_enable_filter_cache = true 36e9297d28Sopenharmony_ci graphic_2d_feature_parallel_upload_enable = true 37e9297d28Sopenharmony_ci enable_text_gine = true 38e9297d28Sopenharmony_ci use_texgine = false 39e9297d28Sopenharmony_ci use_skia_txt = true 40e9297d28Sopenharmony_ci use_video_processing_engine = false 41e9297d28Sopenharmony_ci logger_enable_scope = false 42e9297d28Sopenharmony_ci texgine_enable_debug_log = false 43e9297d28Sopenharmony_ci player_framework_enable = true 44e9297d28Sopenharmony_ci graphic_2d_feature_drivers_interface_display_enable = true 45e9297d28Sopenharmony_ci graphic_2d_feature_tp_switch_enbale = false 46e9297d28Sopenharmony_ci graphic_2d_feature_enable_recording_dcl = true 47e9297d28Sopenharmony_ci graphic_2d_feature_use_igraphics_extend_hooks = false 48e9297d28Sopenharmony_ci graphic_2d_feature_use_aps_igameservice_func = false 49e9297d28Sopenharmony_ci graphic_2d_feature_enable_chipset_vsync = false 50e9297d28Sopenharmony_ci graphic_2d_feature_enable_rspipeline = true 51e9297d28Sopenharmony_ci graphic_2d_feature_enable_prefetch = true 52e9297d28Sopenharmony_ci 53e9297d28Sopenharmony_ci if (defined(is_arkui_x) && is_arkui_x) { 54e9297d28Sopenharmony_ci is_cross_platform = true 55e9297d28Sopenharmony_ci } else { 56e9297d28Sopenharmony_ci is_cross_platform = false 57e9297d28Sopenharmony_ci } 58e9297d28Sopenharmony_ci} 59e9297d28Sopenharmony_ci 60e9297d28Sopenharmony_cideclare_args() { 61e9297d28Sopenharmony_ci graphic_2d_feature_enable_stack_culling = false 62e9297d28Sopenharmony_ci graphic_2d_feature_vkqueue_priority_enable = false 63e9297d28Sopenharmony_ci} 64e9297d28Sopenharmony_ci 65e9297d28Sopenharmony_ciif (graphic_2d_feature_product == "phone" || 66e9297d28Sopenharmony_ci graphic_2d_feature_product == "pc" || 67e9297d28Sopenharmony_ci graphic_2d_feature_product == "tablet" || 68e9297d28Sopenharmony_ci graphic_2d_feature_product == "wearable") { 69e9297d28Sopenharmony_ci graphic_2d_feature_enable_vulkan = true 70e9297d28Sopenharmony_ci graphic_2d_feature_enable_ddgr = false 71e9297d28Sopenharmony_ci graphic_2d_feature_enable_stack_culling = true 72e9297d28Sopenharmony_ci} 73e9297d28Sopenharmony_ci 74e9297d28Sopenharmony_ciif (graphic_2d_feature_product == "phone" || 75e9297d28Sopenharmony_ci graphic_2d_feature_product == "tablet" || 76e9297d28Sopenharmony_ci graphic_2d_feature_product == "wearable") { 77e9297d28Sopenharmony_ci graphic_2d_feature_enable_opinc = true 78e9297d28Sopenharmony_ci} 79e9297d28Sopenharmony_ci 80e9297d28Sopenharmony_cigpu_defines = [] 81e9297d28Sopenharmony_ciaccessibility_defines = [] 82e9297d28Sopenharmony_ciif (enable_text_gine) { 83e9297d28Sopenharmony_ci gpu_defines += [ "USE_GRAPHIC_TEXT_GINE" ] 84e9297d28Sopenharmony_ci} 85e9297d28Sopenharmony_ciif (graphic_2d_feature_ace_enable_gpu) { 86e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_flutter_vulkan) { 87e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_OLD_VK" ] 88e9297d28Sopenharmony_ci } 89e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_vulkan) { 90e9297d28Sopenharmony_ci gpu_defines += [ 91e9297d28Sopenharmony_ci "ACE_ENABLE_VK", 92e9297d28Sopenharmony_ci "RS_ENABLE_VK", 93e9297d28Sopenharmony_ci ] 94e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_ddgr) { 95e9297d28Sopenharmony_ci gpu_defines += [ "ENABLE_DDGR_OPTIMIZE" ] 96e9297d28Sopenharmony_ci import("//foundation/graphic/graphic_2d_ext/ddgr/config.gni") 97e9297d28Sopenharmony_ci } 98e9297d28Sopenharmony_ci } 99e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_opengl) { 100e9297d28Sopenharmony_ci gpu_defines += [ 101e9297d28Sopenharmony_ci "ACE_ENABLE_GL", 102e9297d28Sopenharmony_ci "RS_ENABLE_GL", 103e9297d28Sopenharmony_ci ] 104e9297d28Sopenharmony_ci } 105e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_stack_culling) { 106e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_STACK_CULLING" ] 107e9297d28Sopenharmony_ci } 108e9297d28Sopenharmony_ci 109e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_opinc) { 110e9297d28Sopenharmony_ci gpu_defines += [ "DDGR_ENABLE_FEATURE_OPINC" ] 111e9297d28Sopenharmony_ci } 112e9297d28Sopenharmony_ci 113e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_recording_dcl) { 114e9297d28Sopenharmony_ci rs_enable_recording_dcl = true 115e9297d28Sopenharmony_ci gpu_defines += [ "ENABLE_RECORDING_DCL" ] 116e9297d28Sopenharmony_ci } else { 117e9297d28Sopenharmony_ci rs_enable_recording_dcl = false 118e9297d28Sopenharmony_ci } 119e9297d28Sopenharmony_ci ace_enable_gpu = true 120e9297d28Sopenharmony_ci rs_enable_gpu = true 121e9297d28Sopenharmony_ci surface_enable_gpu = true 122e9297d28Sopenharmony_ci 123e9297d28Sopenharmony_ci libvulkan = [] 124e9297d28Sopenharmony_ci if (graphic_2d_feature_enable_vulkan) { 125e9297d28Sopenharmony_ci libvulkan += [ "//third_party/vulkan-loader:vulkan_loader" ] 126e9297d28Sopenharmony_ci } 127e9297d28Sopenharmony_ci} else { 128e9297d28Sopenharmony_ci gpu_defines = [ "ACE_DISABLE_GL" ] 129e9297d28Sopenharmony_ci ace_enable_gpu = false 130e9297d28Sopenharmony_ci rs_enable_gpu = false 131e9297d28Sopenharmony_ci surface_enable_gpu = false 132e9297d28Sopenharmony_ci libvulkan = [] 133e9297d28Sopenharmony_ci} 134e9297d28Sopenharmony_ci 135e9297d28Sopenharmony_ciif (graphic_2d_feature_enable_vulkan && 136e9297d28Sopenharmony_ci graphic_2d_feature_vkqueue_priority_enable) { 137e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_VKQUEUE_PRIORITY" ] 138e9297d28Sopenharmony_ci} 139e9297d28Sopenharmony_ci 140e9297d28Sopenharmony_ciif (graphic_2d_feature_parallel_upload_enable && 141e9297d28Sopenharmony_ci graphic_2d_feature_rs_enable_uni_render && 142e9297d28Sopenharmony_ci graphic_2d_feature_product == "phone") { 143e9297d28Sopenharmony_ci rs_enable_parallel_upload = true 144e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_PARALLEL_UPLOAD" ] 145e9297d28Sopenharmony_ci} else { 146e9297d28Sopenharmony_ci rs_enable_parallel_upload = false 147e9297d28Sopenharmony_ci} 148e9297d28Sopenharmony_ci 149e9297d28Sopenharmony_ciif (graphic_2d_feature_rs_enable_eglimage || current_os == "android") { 150e9297d28Sopenharmony_ci gpu_defines += [ 151e9297d28Sopenharmony_ci "RS_ENABLE_EGLIMAGE", 152e9297d28Sopenharmony_ci "RS_ENABLE_EGLQUERYSURFACE", 153e9297d28Sopenharmony_ci ] 154e9297d28Sopenharmony_ci rs_enable_eglimage = true 155e9297d28Sopenharmony_ci} else { 156e9297d28Sopenharmony_ci gpu_defines += [ "RS_DISABLE_EGLIMAGE" ] 157e9297d28Sopenharmony_ci rs_enable_eglimage = false 158e9297d28Sopenharmony_ci} 159e9297d28Sopenharmony_ci 160e9297d28Sopenharmony_ci# use_texgine = graphic_2d_feature_use_texgine 161e9297d28Sopenharmony_ci 162e9297d28Sopenharmony_ciif (graphic_2d_feature_rs_enable_uni_render) { 163e9297d28Sopenharmony_ci graphic_2d_feature_enable_dvsync = true 164e9297d28Sopenharmony_ci if (graphic_2d_feature_product == "phone") { 165e9297d28Sopenharmony_ci graphic_2d_feature_enable_chipset_vsync = true 166e9297d28Sopenharmony_ci } 167e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_UNI_RENDER" ] 168e9297d28Sopenharmony_ci} else { 169e9297d28Sopenharmony_ci graphic_2d_feature_enable_dvsync = false 170e9297d28Sopenharmony_ci graphic_2d_feature_enable_chipset_vsync = false 171e9297d28Sopenharmony_ci} 172e9297d28Sopenharmony_ci 173e9297d28Sopenharmony_ciif (graphic_2d_feature_enable_afbc) { 174e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_AFBC" ] 175e9297d28Sopenharmony_ci} 176e9297d28Sopenharmony_ci 177e9297d28Sopenharmony_ciif (graphic_2d_feature_parallel_render_enable) { 178e9297d28Sopenharmony_ci rs_enable_parallel_render = true 179e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_PARALLEL_RENDER" ] 180e9297d28Sopenharmony_ci} 181e9297d28Sopenharmony_ci 182e9297d28Sopenharmony_ciif (graphic_2d_feature_enable_dvsync) { 183e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_DVSYNC" ] 184e9297d28Sopenharmony_ci} 185e9297d28Sopenharmony_ciif (graphic_2d_feature_enable_chipset_vsync) { 186e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_CHIPSET_VSYNC" ] 187e9297d28Sopenharmony_ci} 188e9297d28Sopenharmony_ci 189e9297d28Sopenharmony_citp_defines = [] 190e9297d28Sopenharmony_citp_feature_enable = false 191e9297d28Sopenharmony_ciif (graphic_2d_feature_tp_switch_enbale) { 192e9297d28Sopenharmony_ci tp_feature_enable = true 193e9297d28Sopenharmony_ci tp_defines = [ "TP_FEATURE_ENABLE" ] 194e9297d28Sopenharmony_ci} 195e9297d28Sopenharmony_ci 196e9297d28Sopenharmony_cicheck_graphic_ext_file_script = "//build/ohos/file_exists.py" 197e9297d28Sopenharmony_ci 198e9297d28Sopenharmony_cicheck_ddgr_ext_file_args = [ 199e9297d28Sopenharmony_ci "--filename", 200e9297d28Sopenharmony_ci rebase_path("//foundation/graphic/graphic_2d_ext/ddgr/ddgr_config.gni"), 201e9297d28Sopenharmony_ci] 202e9297d28Sopenharmony_cicheck_igraphics_core_file_args = [ 203e9297d28Sopenharmony_ci "--filename", 204e9297d28Sopenharmony_ci rebase_path( 205e9297d28Sopenharmony_ci "//vendor/huawei/foundation/graphics_game/gpu_turbo_x/EGL/config.gni"), 206e9297d28Sopenharmony_ci] 207e9297d28Sopenharmony_cicheck_igameservice_core_file_args = [ 208e9297d28Sopenharmony_ci "--filename", 209e9297d28Sopenharmony_ci rebase_path( 210e9297d28Sopenharmony_ci "//vendor/huawei/domains/game/gameservice_server/performance/graphics/report/config.gni"), 211e9297d28Sopenharmony_ci] 212e9297d28Sopenharmony_cicheck_aps_core_file_args = [ 213e9297d28Sopenharmony_ci "--filename", 214e9297d28Sopenharmony_ci rebase_path("//foundation/graphic/graphic_2d_ext/aps_manager/config.gni"), 215e9297d28Sopenharmony_ci] 216e9297d28Sopenharmony_cicheck_delegator_ext_file_args = [ 217e9297d28Sopenharmony_ci "--filename", 218e9297d28Sopenharmony_ci rebase_path("//foundation/graphic/graphic_2d_ext/delegator/config.gni"), 219e9297d28Sopenharmony_ci] 220e9297d28Sopenharmony_cicheck_broker_ext_file_args = [ 221e9297d28Sopenharmony_ci "--filename", 222e9297d28Sopenharmony_ci rebase_path( 223e9297d28Sopenharmony_ci "//foundation/graphic/graphic_2d_ext/ohcore/build/broker_config.gni"), 224e9297d28Sopenharmony_ci] 225e9297d28Sopenharmony_cicheck_hgm_ext_file_args = [ 226e9297d28Sopenharmony_ci "--filename", 227e9297d28Sopenharmony_ci rebase_path( 228e9297d28Sopenharmony_ci "//foundation/graphic/graphic_2d_ext/hgm_manager/build/hgm_config.gni"), 229e9297d28Sopenharmony_ci] 230e9297d28Sopenharmony_ci 231e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 232e9297d28Sopenharmony_ci check_ddgr_ext_file_args, 233e9297d28Sopenharmony_ci "string") == "True") { 234e9297d28Sopenharmony_ci ddgr_ext_configs = { 235e9297d28Sopenharmony_ci import("//foundation/graphic/graphic_2d_ext/ddgr/ddgr_config.gni") 236e9297d28Sopenharmony_ci } 237e9297d28Sopenharmony_ci} 238e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 239e9297d28Sopenharmony_ci check_igraphics_core_file_args, 240e9297d28Sopenharmony_ci "string") == "True") { 241e9297d28Sopenharmony_ci graphic_2d_feature_use_igraphics_extend_hooks = true 242e9297d28Sopenharmony_ci import("//vendor/huawei/foundation/graphics_game/gpu_turbo_x/EGL/config.gni") 243e9297d28Sopenharmony_ci} 244e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 245e9297d28Sopenharmony_ci check_aps_core_file_args, 246e9297d28Sopenharmony_ci "string") == "True" && 247e9297d28Sopenharmony_ci exec_script(check_graphic_ext_file_script, 248e9297d28Sopenharmony_ci check_igameservice_core_file_args, 249e9297d28Sopenharmony_ci "string") == "True") { 250e9297d28Sopenharmony_ci graphic_2d_feature_use_aps_igameservice_func = true 251e9297d28Sopenharmony_ci import("//foundation/graphic/graphic_2d_ext/aps_manager/config.gni") 252e9297d28Sopenharmony_ci import( 253e9297d28Sopenharmony_ci "//vendor/huawei/domains/game/gameservice_server/performance/graphics/report/config.gni") 254e9297d28Sopenharmony_ci} 255e9297d28Sopenharmony_ci 256e9297d28Sopenharmony_cigraphic_2d_delegator_configs = { 257e9297d28Sopenharmony_ci} 258e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 259e9297d28Sopenharmony_ci check_delegator_ext_file_args, 260e9297d28Sopenharmony_ci "string") == "True") { 261e9297d28Sopenharmony_ci graphic_2d_delegator_configs = { 262e9297d28Sopenharmony_ci import("//foundation/graphic/graphic_2d_ext/delegator/config.gni") 263e9297d28Sopenharmony_ci } 264e9297d28Sopenharmony_ci} 265e9297d28Sopenharmony_ci 266e9297d28Sopenharmony_cigraphic_2d_broker_configs = { 267e9297d28Sopenharmony_ci} 268e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 269e9297d28Sopenharmony_ci check_broker_ext_file_args, 270e9297d28Sopenharmony_ci "string") == "True") { 271e9297d28Sopenharmony_ci graphic_2d_broker_configs = { 272e9297d28Sopenharmony_ci import("//foundation/graphic/graphic_2d_ext/ohcore/build/broker_config.gni") 273e9297d28Sopenharmony_ci } 274e9297d28Sopenharmony_ci} 275e9297d28Sopenharmony_ci 276e9297d28Sopenharmony_cigraphic_2d_hgm_configs = { 277e9297d28Sopenharmony_ci} 278e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 279e9297d28Sopenharmony_ci check_hgm_ext_file_args, 280e9297d28Sopenharmony_ci "string") == "True") { 281e9297d28Sopenharmony_ci graphic_2d_hgm_configs = { 282e9297d28Sopenharmony_ci import( 283e9297d28Sopenharmony_ci "//foundation/graphic/graphic_2d_ext/hgm_manager/build/hgm_config.gni") 284e9297d28Sopenharmony_ci } 285e9297d28Sopenharmony_ci} 286e9297d28Sopenharmony_ci 287e9297d28Sopenharmony_cicheck_platform_ext_file_args = [ 288e9297d28Sopenharmony_ci "--filename", 289e9297d28Sopenharmony_ci rebase_path("//foundation/graphic/graphic_2d_ext/platform/config.gni"), 290e9297d28Sopenharmony_ci] 291e9297d28Sopenharmony_cigraphic_2d_platform_configs = { 292e9297d28Sopenharmony_ci} 293e9297d28Sopenharmony_ciif (exec_script(check_graphic_ext_file_script, 294e9297d28Sopenharmony_ci check_platform_ext_file_args, 295e9297d28Sopenharmony_ci "string") == "True") { 296e9297d28Sopenharmony_ci graphic_2d_platform_configs = { 297e9297d28Sopenharmony_ci import("//foundation/graphic/graphic_2d_ext/platform/config.gni") 298e9297d28Sopenharmony_ci } 299e9297d28Sopenharmony_ci} 300e9297d28Sopenharmony_ci 301e9297d28Sopenharmony_ciflutter_root = "//third_party/flutter" 302e9297d28Sopenharmony_ciace_flutter_engine_root = "$flutter_root/build" 303e9297d28Sopenharmony_cigraphic_2d_root = "//foundation/graphic/graphic_2d" 304e9297d28Sopenharmony_cigraphic_2d_ext_root = "//foundation/graphic/graphic_2d_ext" 305e9297d28Sopenharmony_cihilog_root = "//base/hiviewdfx/hilog" 306e9297d28Sopenharmony_ciwindow_base_path = "//foundation/window/window_manager" 307e9297d28Sopenharmony_cisafwk_base = "//foundation/systemabilitymgr/safwk" 308e9297d28Sopenharmony_ciskia_root_new = "//third_party/skia" 309e9297d28Sopenharmony_cigraphic_surface_root = "//foundation/graphic/graphic_surface" 310e9297d28Sopenharmony_cimemmgr_root = "//foundation/resourceschedule/memmgr" 311e9297d28Sopenharmony_cimemmgr_plugin_root = "//foundation/resourceschedule/memmgr_override" 312e9297d28Sopenharmony_cifuzz_test_output_path = "graphic_2d/graphic_2d" 313e9297d28Sopenharmony_civideo_processing_engine_root = "//foundation/multimedia/video_processing_engine" 314e9297d28Sopenharmony_ciarkui_root = "//foundation/arkui" 315e9297d28Sopenharmony_ciace_root = "//foundation/arkui/ace_engine" 316e9297d28Sopenharmony_cibundlefwk_path = "//foundation/bundlemanager/bundle_framework" 317e9297d28Sopenharmony_cibundlefwk_inner_api_path = "${bundlefwk_path}/interfaces/inner_api" 318e9297d28Sopenharmony_cimindspore_root = "//third_party/mindspore" 319e9297d28Sopenharmony_ci 320e9297d28Sopenharmony_ciaccessibility_enable = false 321e9297d28Sopenharmony_ciif (defined(global_parts_info) && 322e9297d28Sopenharmony_ci defined(global_parts_info.barrierfree_accessibility)) { 323e9297d28Sopenharmony_ci accessibility_enable = true 324e9297d28Sopenharmony_ci accessibility_defines = [ "ACCESSIBILITY_ENABLE" ] 325e9297d28Sopenharmony_ci} 326e9297d28Sopenharmony_ci 327e9297d28Sopenharmony_ciif (defined(global_parts_info) && 328e9297d28Sopenharmony_ci !defined(global_parts_info.multimedia_player_framework)) { 329e9297d28Sopenharmony_ci player_framework_enable = false 330e9297d28Sopenharmony_ci} 331e9297d28Sopenharmony_ci 332e9297d28Sopenharmony_ciif (defined(global_parts_info) && 333e9297d28Sopenharmony_ci defined(global_parts_info.multimedia_video_processing_engine)) { 334e9297d28Sopenharmony_ci use_video_processing_engine = true 335e9297d28Sopenharmony_ci} 336e9297d28Sopenharmony_ci 337e9297d28Sopenharmony_ciif (defined(global_parts_info) && 338e9297d28Sopenharmony_ci !defined(global_parts_info.hdf_drivers_interface_display)) { 339e9297d28Sopenharmony_ci graphic_2d_feature_drivers_interface_display_enable = false 340e9297d28Sopenharmony_ci} 341e9297d28Sopenharmony_ci 342e9297d28Sopenharmony_ciuse_memmgr_plugin = false 343e9297d28Sopenharmony_ciif (defined(global_parts_info.resourceschedule_memmgr_override)) { 344e9297d28Sopenharmony_ci use_memmgr_plugin = true 345e9297d28Sopenharmony_ci} 346e9297d28Sopenharmony_ciuse_memmgr = false 347e9297d28Sopenharmony_ciif (defined(global_parts_info.resourceschedule_memmgr)) { 348e9297d28Sopenharmony_ci use_memmgr = true 349e9297d28Sopenharmony_ci} 350e9297d28Sopenharmony_ci 351e9297d28Sopenharmony_ci_ace_adapter_dir = rebase_path("$ace_root/adapter", root_build_dir) 352e9297d28Sopenharmony_ci_graphic_2d_adapter_dir = 353e9297d28Sopenharmony_ci rebase_path("$graphic_2d_root/adapter", root_build_dir) 354e9297d28Sopenharmony_ci 355e9297d28Sopenharmony_ciif (defined(is_arkui_x) && is_arkui_x) { 356e9297d28Sopenharmony_ci # In case of arkui-x compilation, copy android and ios adapters from ace_engine 357e9297d28Sopenharmony_ci exec_script("$graphic_2d_root/utils/build/copy_arkui_adapters.py", 358e9297d28Sopenharmony_ci [ 359e9297d28Sopenharmony_ci _ace_adapter_dir, 360e9297d28Sopenharmony_ci _graphic_2d_adapter_dir, 361e9297d28Sopenharmony_ci ]) 362e9297d28Sopenharmony_ci} 363e9297d28Sopenharmony_ciadapters = exec_script("$ace_root/build/search.py", 364e9297d28Sopenharmony_ci [ _graphic_2d_adapter_dir ], 365e9297d28Sopenharmony_ci "list lines") 366e9297d28Sopenharmony_ciif (defined(use_clang_coverage) && use_clang_coverage) { 367e9297d28Sopenharmony_ci graphic_2d_feature_rs_enable_profiler = false 368e9297d28Sopenharmony_ci graphic_2d_feature_enable_recording_dcl = false 369e9297d28Sopenharmony_ci} 370e9297d28Sopenharmony_ci 371e9297d28Sopenharmony_ciif (defined(input_ext_feature_magiccursor) && input_ext_feature_magiccursor) { 372e9297d28Sopenharmony_ci gpu_defines += [ "OHOS_BUILD_ENABLE_MAGICCURSOR" ] 373e9297d28Sopenharmony_ci} 374e9297d28Sopenharmony_ci 375e9297d28Sopenharmony_ciif (defined(graphic_2d_feature_enable_prefetch)) { 376e9297d28Sopenharmony_ci gpu_defines += [ "RS_ENABLE_PREFETCH" ] 377e9297d28Sopenharmony_ci} 378