1# Copyright (c) 2022 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("//foundation/multimedia/image_framework/ide/image_decode_config.gni") 17 18## Build libskeffectchain.so 19 20config("effect_SKeffectChian_config") { 21 cflags = [ 22 "-Wall", 23 "-Werror", 24 "-g3", 25 "-Wall", 26 "-Wno-pointer-arith", 27 "-Wno-non-virtual-dtor", 28 "-Wno-missing-field-initializers", 29 "-Wno-c++11-narrowing", 30 ] 31} 32 33config("effect_SKeffectChian_public_config") { 34 include_dirs = [ 35 "../effectChain/include", 36 "../egl/include", 37 "//foundation/multimedia/image_framework/interfaces/innerkits/include", 38 "$graphic_2d_root/utils/log", 39 "include", 40 "//third_party/openGLES/api", 41 ] 42} 43 44ohos_shared_library("skeffectchain") { 45 public_deps = [ 46 "$graphic_2d_root:libsurface", 47 "$graphic_2d_root/rosen/modules/effect/egl:libegl_effect", 48 "//third_party/EGL:libEGL", 49 "//third_party/openGLES:libGLES", 50 ] 51 52 if (ace_enable_gpu) { 53 defines = gpu_defines 54 public_deps += [ "$graphic_2d_root:libgl" ] 55 } 56 57 public_deps += [ "$graphic_2d_root:libgl" ] 58 if (defined(use_new_skia) && use_new_skia) { 59 public_deps += [ "//third_party/skia:skia_ohos" ] 60 } else { 61 public_deps += [ "//third_party/flutter/build/skia:ace_skia_ohos" ] 62 } 63 64 external_deps = [ 65 "c_utils:utils", 66 "hilog:libhilog", 67 "hitrace:hitrace_meter", 68 "image_framework:image", 69 "image_framework:image_native", 70 "image_framework:pixelconvertadapter", 71 "init:libbegetutil", 72 "ipc:ipc_core", 73 "napi:ace_napi", 74 "samgr:samgr_proxy", 75 ] 76 77 sources = [ 78 "src/sk_image_chain.cpp", 79 "src/sk_image_filter_factory.cpp", 80 ] 81 82 configs = [ ":effect_SKeffectChian_config" ] 83 84 public_configs = [ 85 ":effect_SKeffectChian_public_config", 86 "//commonlibrary/c_utils/base:utils_config", 87 ] 88 89 cflags_cc = [ "-std=c++17" ] 90 91 install_enable = true 92 innerapi_tags = [ "platformsdk" ] 93 part_name = "graphic_2d" 94 subsystem_name = "graphic" 95} 96