• 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/test.gni")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16import("//foundation/graphic/graphic_2d/rosen/modules/effect/effect_config.gni")
17
18module_output_path = "graphic_2d/rosen/modules/effect"
19
20ohos_unittest("EffectTest") {
21  module_out_path = module_output_path
22
23  deps = [ "//third_party/googletest:gtest_main" ]
24
25  sources = [
26    "color_picker_unittest.cpp",
27    "test_picture_files.cpp",
28  ]
29
30  if (effect_enable_gpu) {
31    sources += [
32      "algo_filter_unittest.cpp",
33      "brightness_filter_unittest.cpp",
34      "contrast_filter_unittest.cpp",
35      "effect_chain_unittest.cpp",
36      "filter_factory_unittest.cpp",
37      "filter_unittest.cpp",
38      "gaussian_blur_filter_unittest.cpp",
39      "horizontal_blur_filter_unittest.cpp",
40      "image_chain_unittest.cpp",
41      "input_unittest.cpp",
42      "mesh_unittest.cpp",
43      "output_unittest.cpp",
44      "program_unittest.cpp",
45      "saturation_filter_unittest.cpp",
46      "scale_filter_unittest.cpp",
47      "vertical_blur_filter_unittest.cpp",
48    ]
49  }
50
51  deps += [
52    "$graphic_2d_root:libgl",
53    "$graphic_2d_root/rosen/modules/effect/color_picker:color_picker",
54    "$graphic_2d_root/rosen/modules/effect/effectChain:libeffectchain",
55    "$graphic_2d_root/rosen/modules/effect/egl:libegl_effect",
56    "$graphic_2d_root/utils/color_manager:color_manager",
57    "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
58    "//foundation/multimedia/image_framework/interfaces/kits/js/common:image",
59  ]
60
61  deps += [ "//third_party/skia:skia_ohos" ]
62
63  configs = [
64    ":effect_test_config",
65    "$graphic_2d_root/utils/color_manager:color_manager_public_config",
66  ]
67  external_deps = [
68    "c_utils:utils",
69    "hilog:libhilog",
70  ]
71}
72
73config("effect_test_config") {
74  visibility = [ ":*" ]
75  include_dirs = [
76    "//third_party/EGL/api",
77    "//third_party/openGLES/api",
78    "//third_party/skia",
79    "$graphic_2d_root/rosen/modules/effect/color_picker/include",
80    "$graphic_2d_root/rosen/modules/effect/effectChain/include",
81    "$graphic_2d_root/rosen/modules/effect/egl/include",
82    "$graphic_2d_root/utils/color_manager/export",
83    "//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
84    "//foundation/multimedia/image_framework/interfaces/innerkits/include/",
85  ]
86}
87
88group("test") {
89  testonly = true
90  deps = [ ":EffectTest" ]
91}
92