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/image_effect/frameworks/native/capi/" 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 defines = [] 55 56 public_configs = [ ":image_effect_impl_public_config" ] 57 58 include_dirs = [ 59 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager", 60 "$image_effect_root_dir/frameworks/native/efilter/custom", 61 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness", 62 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast", 63 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/crop", 64 "$image_effect_root_dir/frameworks/native/utils/common", 65 ] 66 67 sources = [ 68 "$image_effect_root_dir/frameworks/native/effect/base/effect.cpp", 69 "$image_effect_root_dir/frameworks/native/effect/base/effect_context.cpp", 70 "$image_effect_root_dir/frameworks/native/effect/base/effect_surface_adapter.cpp", 71 "$image_effect_root_dir/frameworks/native/effect/base/external_loader.cpp", 72 "$image_effect_root_dir/frameworks/native/effect/base/image_effect_inner.cpp", 73 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_processor.cpp", 74 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_helper.cpp", 75 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_manager.cpp", 76 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/colorspace_strategy.cpp", 77 "$image_effect_root_dir/frameworks/native/effect/manager/colorspace_manager/metadata_processor.cpp", 78 "$image_effect_root_dir/frameworks/native/effect/manager/memory_manager/effect_memory.cpp", 79 "$image_effect_root_dir/frameworks/native/effect/manager/memory_manager/effect_memory_manager.cpp", 80 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/capability_negotiate.cpp", 81 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/filter_base.cpp", 82 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/pipeline_core.cpp", 83 "$image_effect_root_dir/frameworks/native/effect/pipeline/core/port.cpp", 84 "$image_effect_root_dir/frameworks/native/effect/pipeline/factory/filter_factory.cpp", 85 "$image_effect_root_dir/frameworks/native/effect/pipeline/filters/sink/image_sink_filter.cpp", 86 "$image_effect_root_dir/frameworks/native/effect/pipeline/filters/source/image_source_filter.cpp", 87 "$image_effect_root_dir/frameworks/native/efilter/base/efilter.cpp", 88 "$image_effect_root_dir/frameworks/native/efilter/base/efilter_base.cpp", 89 "$image_effect_root_dir/frameworks/native/efilter/base/efilter_factory.cpp", 90 "$image_effect_root_dir/frameworks/native/efilter/base/render_strategy.cpp", 91 "$image_effect_root_dir/frameworks/native/efilter/custom/custom_efilter.cpp", 92 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness/brightness_efilter.cpp", 93 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness/cpu_brightness_algo.cpp", 94 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/brightness/gpu_brightness_algo.cpp", 95 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast/contrast_efilter.cpp", 96 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast/cpu_contrast_algo.cpp", 97 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/contrast/gpu_contrast_algo.cpp", 98 "$image_effect_root_dir/frameworks/native/efilter/filterimpl/crop/crop_efilter.cpp", 99 "$image_effect_root_dir/frameworks/native/render_environment/core/algorithm_program.cpp", 100 "$image_effect_root_dir/frameworks/native/render_environment/core/render_mesh.cpp", 101 "$image_effect_root_dir/frameworks/native/render_environment/core/render_opengl_renderer.cpp", 102 "$image_effect_root_dir/frameworks/native/render_environment/graphic/gl_utils.cpp", 103 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_attribute.cpp", 104 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_context.cpp", 105 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_frame_buffer.cpp", 106 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_general_program.cpp", 107 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_program.cpp", 108 "$image_effect_root_dir/frameworks/native/render_environment/graphic/render_surface.cpp", 109 "$image_effect_root_dir/frameworks/native/render_environment/render_environment.cpp", 110 "$image_effect_root_dir/frameworks/native/utils/common/common_utils.cpp", 111 "$image_effect_root_dir/frameworks/native/utils/common/effect_json_helper.cpp", 112 "$image_effect_root_dir/frameworks/native/utils/common/memcpy_helper.cpp", 113 "$image_effect_root_dir/frameworks/native/utils/common/string_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:display_commontype_idl_headers", 127 "graphic_2d:EGL", 128 "graphic_2d:GLESv3", 129 "graphic_2d:color_manager", 130 "graphic_2d:librender_service_client", 131 "graphic_surface:surface", 132 "graphic_surface:sync_fence", 133 "hilog:libhilog", 134 "hisysevent:libhisysevent", 135 "hitrace:hitrace_meter", 136 "image_framework:image_native", 137 "libexif:libexif", 138 "napi:ace_napi", 139 "qos_manager:qos", 140 "media_foundation:media_foundation", 141 "skia:skia_canvaskit", 142 ] 143 144 if (image_effect_colorspace_convertor_enable) { 145 external_deps += [ "video_processing_engine:videoprocessingengine", ] 146 defines += [ "VPE_ENABLE" ] 147 } 148 cflags_cc = [ 149 "-ffunction-sections", 150 "-fdata-sections", 151 "-fno-rtti", 152 "-Os", 153 "-fvisibility=hidden", 154 ] 155 156 ldflags = [ "-Wl,--gc-sections" ] 157 158 output_extension = "so" 159 subsystem_name = "multimedia" 160 innerapi_tags = [ 161 "platformsdk", 162 "sasdk", 163 ] 164 part_name = "image_effect" 165} 166 167config("image_effect_ndk_public_config") { 168 include_dirs = [ "$image_effect_root_dir/interfaces/kits/native" ] 169} 170 171ohos_shared_library("image_effect") { 172 sanitize = image_effect_sanitize 173 174 stack_protector_ret = true 175 176 public_configs = [ ":image_effect_ndk_public_config" ] 177 178 include_dirs = [ 179 "$image_effect_root_dir/frameworks/native/capi", 180 "$image_effect_root_dir/frameworks/native/utils/common", 181 ] 182 183 sources = [ 184 "$image_effect_root_dir/frameworks/native/efilter/custom/filter_delegate.cpp", 185 "$image_effect_root_dir/frameworks/native/capi/image_effect.cpp", 186 "$image_effect_root_dir/frameworks/native/capi/image_effect_filter.cpp", 187 "$image_effect_root_dir/frameworks/native/capi/native_common_utils.cpp", 188 ] 189 190 use_exceptions = true 191 192 deps = [ ":image_effect_impl" ] 193 194 external_deps = [ 195 "cJSON:cjson", 196 "c_utils:utils", 197 "graphic_2d:librender_service_client", 198 "graphic_surface:surface", 199 "hilog:libhilog", 200 "image_framework:image_native", 201 "image_framework:picture", 202 "image_framework:pixelmap", 203 "napi:ace_napi", 204 "media_foundation:media_foundation", 205 ] 206 207 cflags_cc = [ 208 "-ffunction-sections", 209 "-fdata-sections", 210 "-fno-rtti", 211 "-Os", 212 "-fvisibility=hidden", 213 ] 214 215 ldflags = [ "-Wl,--gc-sections" ] 216 217 output_extension = "so" 218 subsystem_name = "multimedia" 219 innerapi_tags = [ "ndk" ] 220 part_name = "image_effect" 221} 222