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 if (defined(use_new_skia) && use_new_skia) { 62 deps += [ "//third_party/skia:skia_ohos" ] 63 } else { 64 deps += [ "//third_party/flutter/build/skia:ace_skia_ohos" ] 65 } 66 67 configs = [ 68 ":effect_test_config", 69 "$graphic_2d_root/utils/color_manager:color_manager_public_config", 70 ] 71 external_deps = [ 72 "c_utils:utils", 73 "hilog:libhilog", 74 ] 75} 76 77config("effect_test_config") { 78 visibility = [ ":*" ] 79 include_dirs = [ 80 "//third_party/EGL/api", 81 "//third_party/openGLES/api", 82 "//third_party/skia", 83 "$graphic_2d_root/rosen/modules/effect/color_picker/include", 84 "$graphic_2d_root/rosen/modules/effect/effectChain/include", 85 "$graphic_2d_root/rosen/modules/effect/egl/include", 86 "$graphic_2d_root/utils/color_manager/export", 87 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 88 "//foundation/multimedia/image_framework/interfaces/innerkits/include/", 89 ] 90} 91 92group("test") { 93 testonly = true 94 deps = [ ":EffectTest" ] 95} 96