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_filter_unittest.cpp", 36 "egl_manager_test.cpp", 37 "filter_factory_unittest.cpp", 38 "filter_unittest.cpp", 39 "gaussian_blur_filter_unittest.cpp", 40 "horizontal_blur_filter_unittest.cpp", 41 "image_chain_unittest.cpp", 42 "input_unittest.cpp", 43 "mesh_unittest.cpp", 44 "output_unittest.cpp", 45 "program_unittest.cpp", 46 "saturation_filter_unittest.cpp", 47 "scale_filter_unittest.cpp", 48 "sk_image_chain_unittest.cpp", 49 "sk_image_filter_factory_unittest.cpp", 50 "vertical_blur_filter_unittest.cpp", 51 ] 52 } 53 54 deps += [ 55 "$graphic_2d_root/frameworks/opengl_wrapper:EGL", 56 "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3", 57 "$graphic_2d_root/rosen/modules/effect/color_picker:color_picker", 58 "$graphic_2d_root/rosen/modules/effect/effectChain:libeffectchain", 59 "$graphic_2d_root/rosen/modules/effect/effect_ndk:native_effect_ndk", 60 "$graphic_2d_root/rosen/modules/effect/egl:libegl_effect", 61 "$graphic_2d_root/rosen/modules/effect/skia_effectChain:skeffectchain", 62 "$graphic_2d_root/utils/color_manager:color_manager", 63 "//foundation/multimedia/image_framework/interfaces/innerkits:image_native", 64 "//foundation/multimedia/image_framework/interfaces/kits/js/common:image", 65 ] 66 67 cflags = [ 68 "-Dprivate=public", 69 "-Dprotected=public", 70 ] 71 72 configs = [ 73 ":effect_test_config", 74 "$graphic_2d_root/utils/color_manager:color_manager_public_config", 75 ] 76 external_deps = [ 77 "cJSON:cjson", 78 "c_utils:utils", 79 "hilog:libhilog", 80 "image_framework:image", 81 "image_framework:pixelmap", 82 "skia:skia_canvaskit", 83 ] 84} 85 86config("effect_test_config") { 87 visibility = [ ":*" ] 88 include_dirs = [ 89 "//third_party/EGL/api", 90 "//third_party/openGLES/api", 91 "//third_party/skia", 92 "$graphic_2d_root/rosen/modules/effect/color_picker/include", 93 "$graphic_2d_root/rosen/modules/effect/effectChain/include", 94 "$graphic_2d_root/rosen/modules/effect/effect_ndk/include", 95 "$graphic_2d_root/rosen/modules/effect/egl/include", 96 "$graphic_2d_root/utils/color_manager/export", 97 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 98 "//foundation/multimedia/image_framework/interfaces/innerkits/include/", 99 ] 100} 101 102group("test") { 103 testonly = true 104 deps = [ ":EffectTest" ] 105} 106