• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/graphic/graphic_2d/rosen/modules/effect/effect_config.gni")
17
18## Build libeffectchain.so
19
20config("effect_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  defines = [ "EGL_EGLEXT_PROTOTYPES" ]
32}
33
34config("effect_public_config") {
35  include_dirs = [
36    "//third_party/cJSON",
37    "//foundation/multimedia/image_framework/interfaces/innerkits/include",
38    "//foundation/graphic/graphic_2d/utils/log",
39    "include",
40  ]
41  if (effect_enable_gpu) {
42    include_dirs += [ "//third_party/openGLES/api" ]
43  }
44}
45
46ohos_shared_library("libeffectchain") {
47  sources = [ "//third_party/cJSON/cJSON.c" ]
48
49  deps = [
50    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
51    "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
52  ]
53
54  external_deps = [
55    "c_utils:utils",
56    "hitrace_native:hitrace_meter",
57  ]
58
59  if (effect_enable_gpu) {
60    sources += [
61      "src/algo_filter.cpp",
62      "src/brightness_filter.cpp",
63      "src/builder.cpp",
64      "src/contrast_filter.cpp",
65      "src/filter.cpp",
66      "src/filter_factory.cpp",
67      "src/gaussian_blur_filter.cpp",
68      "src/horizontal_blur_filter.cpp",
69      "src/image_chain.cpp",
70      "src/input.cpp",
71      "src/mesh.cpp",
72      "src/output.cpp",
73      "src/program.cpp",
74      "src/saturation_filter.cpp",
75      "src/scale_filter.cpp",
76      "src/vertical_blur_filter.cpp",
77    ]
78
79    deps += [ "//foundation/graphic/graphic_2d:libgl" ]
80  }
81
82  configs = [ ":effect_config" ]
83
84  public_configs = [
85    ":effect_public_config",
86    "//commonlibrary/c_utils/base:utils_config",
87  ]
88
89  cflags_cc = [ "-std=c++17" ]
90
91  if (effect_enable_gpu) {
92    install_enable = true
93  } else {
94    install_enable = false
95  }
96
97  part_name = "graphic_standard"
98  subsystem_name = "graphic"
99}
100