# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/graphic/graphic_2d/graphic_config.gni") import("//foundation/graphic/graphic_2d/rosen/modules/effect/effect_config.gni") module_output_path = "graphic_2d/rosen/modules/effect" ohos_unittest("EffectTest") { module_out_path = module_output_path deps = [ "//third_party/googletest:gtest_main" ] sources = [ "color_picker_unittest.cpp", "test_picture_files.cpp", ] if (effect_enable_gpu) { sources += [ "algo_filter_unittest.cpp", "brightness_filter_unittest.cpp", "contrast_filter_unittest.cpp", "effect_filter_unittest.cpp", "egl_manager_test.cpp", "filter_factory_unittest.cpp", "filter_unittest.cpp", "gaussian_blur_filter_unittest.cpp", "horizontal_blur_filter_unittest.cpp", "image_chain_unittest.cpp", "input_unittest.cpp", "mesh_unittest.cpp", "output_unittest.cpp", "program_unittest.cpp", "saturation_filter_unittest.cpp", "scale_filter_unittest.cpp", "sk_image_chain_unittest.cpp", "sk_image_filter_factory_unittest.cpp", "vertical_blur_filter_unittest.cpp", ] } deps += [ "$graphic_2d_root/frameworks/opengl_wrapper:EGL", "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3", "$graphic_2d_root/rosen/modules/effect/color_picker:color_picker", "$graphic_2d_root/rosen/modules/effect/effectChain:libeffectchain", "$graphic_2d_root/rosen/modules/effect/effect_ndk:native_effect_ndk", "$graphic_2d_root/rosen/modules/effect/egl:libegl_effect", "$graphic_2d_root/rosen/modules/effect/skia_effectChain:skeffectchain", "$graphic_2d_root/utils/color_manager:color_manager", "//foundation/multimedia/image_framework/interfaces/innerkits:image_native", "//foundation/multimedia/image_framework/interfaces/kits/js/common:image", ] cflags = [ "-Dprivate=public", "-Dprotected=public", ] configs = [ ":effect_test_config", "$graphic_2d_root/utils/color_manager:color_manager_public_config", ] external_deps = [ "cJSON:cjson", "c_utils:utils", "hilog:libhilog", "image_framework:image", "image_framework:pixelmap", "skia:skia_canvaskit", ] } config("effect_test_config") { visibility = [ ":*" ] include_dirs = [ "//third_party/EGL/api", "//third_party/openGLES/api", "//third_party/skia", "$graphic_2d_root/rosen/modules/effect/color_picker/include", "$graphic_2d_root/rosen/modules/effect/effectChain/include", "$graphic_2d_root/rosen/modules/effect/effect_ndk/include", "$graphic_2d_root/rosen/modules/effect/egl/include", "$graphic_2d_root/utils/color_manager/export", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//foundation/multimedia/image_framework/interfaces/innerkits/include/", ] } group("test") { testonly = true deps = [ ":EffectTest" ] }