• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/effect_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: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    "hilog:libhilog",
133    "hisysevent:libhisysevent",
134    "hitrace:hitrace_meter",
135    "image_framework:image_native",
136    "libexif:libexif",
137    "napi:ace_napi",
138    "qos_manager:qos",
139  ]
140
141  cflags_cc = [
142    "-ffunction-sections",
143    "-fdata-sections",
144    "-fno-rtti",
145    "-Os",
146    "-fvisibility=hidden",
147  ]
148
149  ldflags = [ "-Wl,--gc-sections" ]
150
151  output_extension = "so"
152  subsystem_name = "multimedia"
153  innerapi_tags = [
154    "platformsdk",
155    "sasdk",
156  ]
157  part_name = "image_effect"
158}
159
160config("image_effect_ndk_public_config") {
161  include_dirs = [ "$image_effect_root_dir/interfaces/kits/native" ]
162}
163
164ohos_shared_library("image_effect") {
165  sanitize = image_effect_sanitize
166
167  stack_protector_ret = true
168
169  public_configs = [ ":image_effect_ndk_public_config" ]
170
171  include_dirs = [
172    "$image_effect_root_dir/frameworks/native/capi",
173    "$image_effect_root_dir/frameworks/native/utils/common",
174  ]
175
176  sources = [
177    "$image_effect_root_dir/frameworks/native/capi/image_effect.cpp",
178    "$image_effect_root_dir/frameworks/native/capi/image_effect_filter.cpp",
179    "$image_effect_root_dir/frameworks/native/capi/native_common_utils.cpp",
180  ]
181
182  use_exceptions = true
183
184  deps = [ ":image_effect_impl" ]
185
186  external_deps = [
187    "cJSON:cjson",
188    "c_utils:utils",
189    "graphic_2d:librender_service_client",
190    "graphic_surface:surface",
191    "hilog:libhilog",
192    "image_framework:image_native",
193    "image_framework:picture",
194    "image_framework:pixelmap",
195    "napi:ace_napi",
196  ]
197
198  cflags_cc = [
199    "-ffunction-sections",
200    "-fdata-sections",
201    "-fno-rtti",
202    "-Os",
203    "-fvisibility=hidden",
204  ]
205
206  ldflags = [ "-Wl,--gc-sections" ]
207
208  output_extension = "so"
209  subsystem_name = "multimedia"
210  innerapi_tags = [ "ndk" ]
211  part_name = "image_effect"
212}
213