1e9297d28Sopenharmony_ci# Copyright (c) 2024 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_ci 17e9297d28Sopenharmony_ciconfig("export_config") { 18e9297d28Sopenharmony_ci include_dirs = [ "include" ] 19e9297d28Sopenharmony_ci cflags_cc = [ "-std=c++17" ] 20e9297d28Sopenharmony_ci} 21e9297d28Sopenharmony_ci 22e9297d28Sopenharmony_ciohos_source_set("graphics_effect_src") { 23e9297d28Sopenharmony_ci branch_protector_ret = "pac_ret" 24e9297d28Sopenharmony_ci sanitize = { 25e9297d28Sopenharmony_ci cfi = true 26e9297d28Sopenharmony_ci cfi_cross_dso = true 27e9297d28Sopenharmony_ci debug = false 28e9297d28Sopenharmony_ci } 29e9297d28Sopenharmony_ci cflags = [ 30e9297d28Sopenharmony_ci "-O2", 31e9297d28Sopenharmony_ci "-ftrapv", 32e9297d28Sopenharmony_ci "-FPIC", 33e9297d28Sopenharmony_ci "-FS", 34e9297d28Sopenharmony_ci "-D_FORTIFY_SOURCE=2", 35e9297d28Sopenharmony_ci ] 36e9297d28Sopenharmony_ci cflags_cc = [ 37e9297d28Sopenharmony_ci "-O2", 38e9297d28Sopenharmony_ci "-ftrapv", 39e9297d28Sopenharmony_ci "-FPIC", 40e9297d28Sopenharmony_ci "-FS", 41e9297d28Sopenharmony_ci "-D_FORTIFY_SOURCE=2", 42e9297d28Sopenharmony_ci ] 43e9297d28Sopenharmony_ci 44e9297d28Sopenharmony_ci public_configs = [ ":export_config" ] 45e9297d28Sopenharmony_ci include_dirs = [ 46e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/graphics_effect/src", 47e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/utils", 48e9297d28Sopenharmony_ci "$graphic_2d_root/utils/color_manager/export", 49e9297d28Sopenharmony_ci ] 50e9297d28Sopenharmony_ci 51e9297d28Sopenharmony_ci sources = [ 52e9297d28Sopenharmony_ci "src/ge_aibar_shader_filter.cpp", 53e9297d28Sopenharmony_ci "src/ge_grey_shader_filter.cpp", 54e9297d28Sopenharmony_ci "src/ge_kawase_blur_shader_filter.cpp", 55e9297d28Sopenharmony_ci "src/ge_linear_gradient_blur_shader_filter.cpp", 56e9297d28Sopenharmony_ci "src/ge_magnifier_shader_filter.cpp", 57e9297d28Sopenharmony_ci "src/ge_mesa_blur_shader_filter.cpp", 58e9297d28Sopenharmony_ci "src/ge_render.cpp", 59e9297d28Sopenharmony_ci "src/ge_system_properties.cpp", 60e9297d28Sopenharmony_ci "src/ge_visual_effect.cpp", 61e9297d28Sopenharmony_ci "src/ge_visual_effect_container.cpp", 62e9297d28Sopenharmony_ci "src/ge_visual_effect_impl.cpp", 63e9297d28Sopenharmony_ci "src/ge_water_ripple_filter.cpp", 64e9297d28Sopenharmony_ci ] 65e9297d28Sopenharmony_ci 66e9297d28Sopenharmony_ci deps = [ "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics" ] 67e9297d28Sopenharmony_ci if (is_arkui_x) { 68e9297d28Sopenharmony_ci deps += [ 69e9297d28Sopenharmony_ci "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_${target_os}", 70e9297d28Sopenharmony_ci "//third_party/bounds_checking_function:libsec_static", 71e9297d28Sopenharmony_ci "//third_party/skia:skia_$target_os", 72e9297d28Sopenharmony_ci ] 73e9297d28Sopenharmony_ci external_deps = [ "hilog:libhilog" ] 74e9297d28Sopenharmony_ci } else { 75e9297d28Sopenharmony_ci external_deps = [ 76e9297d28Sopenharmony_ci "bounds_checking_function:libsec_static", 77e9297d28Sopenharmony_ci "hilog:libhilog", 78e9297d28Sopenharmony_ci "skia:skia_canvaskit", 79e9297d28Sopenharmony_ci ] 80e9297d28Sopenharmony_ci } 81e9297d28Sopenharmony_ci 82e9297d28Sopenharmony_ci if (current_os == "ohos") { 83e9297d28Sopenharmony_ci defines = [ "GE_OHOS" ] 84e9297d28Sopenharmony_ci external_deps += [ "init:libbegetutil" ] 85e9297d28Sopenharmony_ci } 86e9297d28Sopenharmony_ci 87e9297d28Sopenharmony_ci part_name = "graphic_2d" 88e9297d28Sopenharmony_ci subsystem_name = "graphic" 89e9297d28Sopenharmony_ci} 90e9297d28Sopenharmony_ci 91e9297d28Sopenharmony_ciif (is_arkui_x) { 92e9297d28Sopenharmony_ci ohos_source_set("libgraphics_effect") { 93e9297d28Sopenharmony_ci branch_protector_ret = "pac_ret" 94e9297d28Sopenharmony_ci sanitize = { 95e9297d28Sopenharmony_ci cfi = true 96e9297d28Sopenharmony_ci cfi_cross_dso = true 97e9297d28Sopenharmony_ci debug = false 98e9297d28Sopenharmony_ci } 99e9297d28Sopenharmony_ci 100e9297d28Sopenharmony_ci public_deps = [ ":graphics_effect_src" ] 101e9297d28Sopenharmony_ci deps = [ 102e9297d28Sopenharmony_ci "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_${target_os}", 103e9297d28Sopenharmony_ci "//third_party/bounds_checking_function:libsec_static", 104e9297d28Sopenharmony_ci "//third_party/skia:skia_$target_os", 105e9297d28Sopenharmony_ci ] 106e9297d28Sopenharmony_ci 107e9297d28Sopenharmony_ci part_name = "graphic_2d" 108e9297d28Sopenharmony_ci subsystem_name = "graphic" 109e9297d28Sopenharmony_ci } 110e9297d28Sopenharmony_ci} else { 111e9297d28Sopenharmony_ci ohos_shared_library("libgraphics_effect") { 112e9297d28Sopenharmony_ci branch_protector_ret = "pac_ret" 113e9297d28Sopenharmony_ci sanitize = { 114e9297d28Sopenharmony_ci cfi = true 115e9297d28Sopenharmony_ci cfi_cross_dso = true 116e9297d28Sopenharmony_ci debug = false 117e9297d28Sopenharmony_ci } 118e9297d28Sopenharmony_ci 119e9297d28Sopenharmony_ci public_deps = [ ":graphics_effect_src" ] 120e9297d28Sopenharmony_ci external_deps = [ 121e9297d28Sopenharmony_ci "bounds_checking_function:libsec_static", 122e9297d28Sopenharmony_ci "hilog:libhilog", 123e9297d28Sopenharmony_ci "skia:skia_canvaskit", 124e9297d28Sopenharmony_ci ] 125e9297d28Sopenharmony_ci 126e9297d28Sopenharmony_ci part_name = "graphic_2d" 127e9297d28Sopenharmony_ci subsystem_name = "graphic" 128e9297d28Sopenharmony_ci } 129e9297d28Sopenharmony_ci} 130