• 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_standard/rosen/modules/effect"
19
20ohos_unittest("EffectTest") {
21  module_out_path = module_output_path
22
23  deps = [
24    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
25    "//third_party/googletest:gtest_main",
26  ]
27
28  sources = [
29    "color_picker_unittest.cpp",
30    "test_picture_files.cpp",
31  ]
32
33  if (effect_enable_gpu) {
34    sources += [
35      "algo_filter_unittest.cpp",
36      "brightness_filter_unittest.cpp",
37      "contrast_filter_unittest.cpp",
38      "effect_chain_unittest.cpp",
39      "filter_factory_unittest.cpp",
40      "filter_unittest.cpp",
41      "gaussian_blur_filter_unittest.cpp",
42      "horizontal_blur_filter_unittest.cpp",
43      "image_chain_unittest.cpp",
44      "input_unittest.cpp",
45      "mesh_unittest.cpp",
46      "output_unittest.cpp",
47      "program_unittest.cpp",
48      "saturation_filter_unittest.cpp",
49      "scale_filter_unittest.cpp",
50      "vertical_blur_filter_unittest.cpp",
51    ]
52  }
53
54  deps += [
55    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
56    "//foundation/graphic/graphic_2d:libgl",
57    "//foundation/graphic/graphic_2d/rosen/modules/effect/color_picker:color_picker",
58    "//foundation/graphic/graphic_2d/rosen/modules/effect/effectChain:libeffectchain",
59    "//foundation/graphic/graphic_2d/rosen/modules/effect/egl:libegl_effect",
60    "//foundation/graphic/graphic_2d/utils/color_manager:color_manager",
61    "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
62    "//foundation/multimedia/image_framework/interfaces/kits/js/common:image",
63    "//third_party/flutter/build/skia:ace_skia_ohos",
64  ]
65
66  configs = [
67    ":effect_test_config",
68    "//foundation/graphic/graphic_2d/utils/color_manager:color_manager_public_config",
69  ]
70  external_deps = [ "c_utils:utils" ]
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    "//foundation/graphic/graphic_2d/rosen/modules/effect/color_picker/include",
80    "//foundation/graphic/graphic_2d/rosen/modules/effect/effectChain/include",
81    "//foundation/graphic/graphic_2d/rosen/modules/effect/egl/include",
82    "//foundation/graphic/graphic_2d/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