# Copyright (c) 2024 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("export_config") { include_dirs = [ "include" ] cflags_cc = [ "-std=c++17" ] } ohos_source_set("graphics_effect_src") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } cflags = [ "-O2", "-ftrapv", "-FPIC", "-FS", "-D_FORTIFY_SOURCE=2", ] cflags_cc = [ "-O2", "-ftrapv", "-FPIC", "-FS", "-D_FORTIFY_SOURCE=2", ] public_configs = [ ":export_config" ] include_dirs = [ "$graphic_2d_root/rosen/modules/graphics_effect/src", "$graphic_2d_root/rosen/modules/utils", "$graphic_2d_root/utils/color_manager/export", ] sources = [ "src/ge_aibar_shader_filter.cpp", "src/ge_grey_shader_filter.cpp", "src/ge_kawase_blur_shader_filter.cpp", "src/ge_linear_gradient_blur_shader_filter.cpp", "src/ge_magnifier_shader_filter.cpp", "src/ge_mesa_blur_shader_filter.cpp", "src/ge_render.cpp", "src/ge_system_properties.cpp", "src/ge_visual_effect.cpp", "src/ge_visual_effect_container.cpp", "src/ge_visual_effect_impl.cpp", "src/ge_water_ripple_filter.cpp", ] deps = [ "$graphic_2d_root/rosen/modules/2d_graphics:2d_graphics" ] if (is_arkui_x) { deps += [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_${target_os}", "//third_party/bounds_checking_function:libsec_static", "//third_party/skia:skia_$target_os", ] external_deps = [ "hilog:libhilog" ] } else { external_deps = [ "bounds_checking_function:libsec_static", "hilog:libhilog", "skia:skia_canvaskit", ] } if (current_os == "ohos") { defines = [ "GE_OHOS" ] external_deps += [ "init:libbegetutil" ] } part_name = "graphic_2d" subsystem_name = "graphic" } if (is_arkui_x) { ohos_source_set("libgraphics_effect") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } public_deps = [ ":graphics_effect_src" ] deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_${target_os}", "//third_party/bounds_checking_function:libsec_static", "//third_party/skia:skia_$target_os", ] part_name = "graphic_2d" subsystem_name = "graphic" } } else { ohos_shared_library("libgraphics_effect") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true debug = false } public_deps = [ ":graphics_effect_src" ] external_deps = [ "bounds_checking_function:libsec_static", "hilog:libhilog", "skia:skia_canvaskit", ] part_name = "graphic_2d" subsystem_name = "graphic" } }