1# Copyright (c) 2024 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/multimedia/image_effect/config.gni") 16 17config("image_effect_impl_public_config") { 18 include_dirs = [ 19 "$image_effect_root_dir/interfaces/inner_api/native", 20 "$image_effect_root_dir/interfaces/inner_api/native/base", 21 "$image_effect_root_dir/interfaces/inner_api/native/colorspace", 22 "$image_effect_root_dir/interfaces/inner_api/native/common", 23 "$image_effect_root_dir/interfaces/inner_api/native/custom", 24 "$image_effect_root_dir/interfaces/inner_api/native/effect", 25 "$image_effect_root_dir/interfaces/inner_api/native/efilter", 26 "$image_effect_root_dir/interfaces/inner_api/native/memory", 27 "$image_effect_root_dir/interfaces/inner_api/native/utils", 28 "$image_effect_root_dir/frameworks/native/effect/pipeline/include/core", 29 "$image_effect_root_dir/frameworks/native/effect/pipeline/include/factory", 30 "$image_effect_root_dir/frameworks/native/effect/pipeline/include/filters/sink", 31 "$image_effect_root_dir/frameworks/native/effect/pipeline/include/filters/source", 32 "$image_effect_root_dir/frameworks/native/effect/base", 33 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager", 34 "$image_effect_root_dir/frameworks/native/efilter/base", 35 "$image_effect_root_dir/frameworks/native/utils/dfx", 36 "$image_effect_root_dir/frameworks/native/render_environment", 37 "$image_effect_root_dir/frameworks/native/render_environment/render_thread/queue", 38 "$image_effect_root_dir/frameworks/native/render_environment/render_thread/task", 39 "$image_effect_root_dir/frameworks/native/render_environment/render_thread/worker", 40 "//foundation/multimedia/media_foundation/engine/include", 41 ] 42 43 defines = [ 44 "HST_ANY_WITH_NO_RTTI", 45 "IMAGE_COLORSPACE_FLAG", 46 ] 47} 48 49ohos_shared_library("image_effect_impl") { 50 sanitize = image_effect_sanitize 51 52 stack_protector_ret = true 53 54 public_configs = [ ":image_effect_impl_public_config" ] 55 56 include_dirs = [ 57 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager", 58 "$image_effect_root_dir/frameworks/native/efilter/custom", 59 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness", 60 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast", 61 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/crop", 62 "$image_effect_root_dir/frameworks/native/utils/common", 63 "//third_party/skia/third_party/externals/oboe/samples/RhythmGame/third_party", 64 ] 65 66 sources = [ 67 "$image_effect_root_dir/frameworks/native/effect/base/effect.cpp", 68 "$image_effect_root_dir/frameworks/native/effect/base/effect_context.cpp", 69 "$image_effect_root_dir/frameworks/native/effect/base/effect_surface_adapter.cpp", 70 "$image_effect_root_dir/frameworks/native/effect/base/external_loader.cpp", 71 "$image_effect_root_dir/frameworks/native/effect/base/image_effect_inner.cpp", 72 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_converter.cpp", 73 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_helper.cpp", 74 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_manager.cpp", 75 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_strategy.cpp", 76 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/metadata_generator.cpp", 77 "$image_effect_root_dir/frameworks/native/effect/manager/memory_manager/effect_memory.cpp", 78 "$image_effect_root_dir/frameworks/native/effect/manager/memory_manager/effect_memory_manager.cpp", 79 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/capability_negotiate.cpp", 80 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/filter_base.cpp", 81 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/pipeline_core.cpp", 82 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/port.cpp", 83 "$image_effect_root_dir/frameworks/native/effect/pipeline/factory/filter_factory.cpp", 84 "$image_effect_root_dir/frameworks/native/effect/pipeline/filters/sink/image_sink_filter.cpp", 85 "$image_effect_root_dir/frameworks/native/effect/pipeline/filters/source/image_source_filter.cpp", 86 "$image_effect_root_dir/frameworks/native/efilter/base/efilter.cpp", 87 "$image_effect_root_dir/frameworks/native/efilter/base/efilter_base.cpp", 88 "$image_effect_root_dir/frameworks/native/efilter/base/efilter_factory.cpp", 89 "$image_effect_root_dir/frameworks/native/efilter/base/render_strategy.cpp", 90 "$image_effect_root_dir/frameworks/native/efilter/custom/custom_efilter.cpp", 91 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness/brightness_efilter.cpp", 92 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness/cpu_brightness_algo.cpp", 93 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness/gpu_brightness_algo.cpp", 94 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast/contrast_efilter.cpp", 95 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast/cpu_contrast_algo.cpp", 96 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast/gpu_contrast_algo.cpp", 97 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/crop/crop_efilter.cpp", 98 "$image_effect_root_dir/frameworks/native/render_environment/core/algorithm_program.cpp", 99 "$image_effect_root_dir/frameworks/native/render_environment/core/render_mesh.cpp", 100 "$image_effect_root_dir/frameworks/native/render_environment/core/render_opengl_renderer.cpp", 101 "$image_effect_root_dir/frameworks/native/render_environment/graphic/gl_utils.cpp", 102 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_attribute.cpp", 103 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_context.cpp", 104 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_frame_buffer.cpp", 105 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_general_program.cpp", 106 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_program.cpp", 107 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_surface.cpp", 108 "$image_effect_root_dir/frameworks/native/render_environment/render_environment.cpp", 109 "$image_effect_root_dir/frameworks/native/utils/common/common_utils.cpp", 110 "$image_effect_root_dir/frameworks/native/utils/common/json_helper.cpp", 111 "$image_effect_root_dir/frameworks/native/utils/common/memcpy_helper.cpp", 112 "$image_effect_root_dir/frameworks/native/utils/common/string_helper.cpp", 113 "$image_effect_root_dir/frameworks/native/utils/common/vpe_helper.cpp", 114 "$image_effect_root_dir/frameworks/native/utils/dfx/error_code.cpp", 115 "$image_effect_root_dir/frameworks/native/utils/dfx/event_report.cpp", 116 "$image_effect_root_dir/frameworks/native/utils/format/format_helper.cpp", 117 ] 118 119 use_exceptions = true 120 121 external_deps = [ 122 "ability_base:zuri", 123 "bounds_checking_function:libsec_shared", 124 "cJSON:cjson", 125 "c_utils:utils", 126 "drivers_interface_display:libdisplay_commontype_proxy_1.0", 127 "graphic_2d:EGL", 128 "graphic_2d:GLESv3", 129 "graphic_2d:color_manager", 130 "graphic_2d:librender_service_client", 131 "graphic_surface:surface", 132 "hilog:libhilog", 133 "hisysevent:libhisysevent", 134 "hitrace:hitrace_meter", 135 "image_framework:image_native", 136 "libexif:libexif", 137 "napi:ace_napi", 138 ] 139 140 cflags_cc = [ 141 "-ffunction-sections", 142 "-fdata-sections", 143 "-fno-rtti", 144 "-Os", 145 "-fvisibility=hidden", 146 ] 147 148 ldflags = [ "-Wl,--gc-sections" ] 149 150 output_extension = "so" 151 subsystem_name = "multimedia" 152 innerapi_tags = [ 153 "platformsdk", 154 "sasdk", 155 ] 156 part_name = "image_effect" 157} 158 159config("image_effect_ndk_public_config") { 160 include_dirs = [ "$image_effect_root_dir/interfaces/kits/native" ] 161} 162 163ohos_shared_library("image_effect") { 164 sanitize = image_effect_sanitize 165 166 stack_protector_ret = true 167 168 public_configs = [ ":image_effect_ndk_public_config" ] 169 170 include_dirs = [ 171 "$image_effect_root_dir/frameworks/native/capi", 172 "$image_effect_root_dir/frameworks/native/utils/common", 173 ] 174 175 sources = [ 176 "$image_effect_root_dir/frameworks/native/capi/image_effect.cpp", 177 "$image_effect_root_dir/frameworks/native/capi/image_effect_filter.cpp", 178 "$image_effect_root_dir/frameworks/native/capi/native_common_utils.cpp", 179 ] 180 181 use_exceptions = true 182 183 deps = [ ":image_effect_impl" ] 184 185 external_deps = [ 186 "cJSON:cjson", 187 "c_utils:utils", 188 "graphic_2d:librender_service_client", 189 "graphic_surface:surface", 190 "hilog:libhilog", 191 "image_framework:image_native", 192 "image_framework:picture", 193 "image_framework:pixelmap", 194 "napi:ace_napi", 195 ] 196 197 cflags_cc = [ 198 "-ffunction-sections", 199 "-fdata-sections", 200 "-fno-rtti", 201 "-Os", 202 "-fvisibility=hidden", 203 ] 204 205 ldflags = [ "-Wl,--gc-sections" ] 206 207 output_extension = "so" 208 subsystem_name = "multimedia" 209 innerapi_tags = [ "ndk" ] 210 part_name = "image_effect" 211} 212