1e9297d28Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2e9297d28Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3e9297d28Sopenharmony_ci# you may not use this file except in compliance with the License. 4e9297d28Sopenharmony_ci# You may obtain a copy of the License at 5e9297d28Sopenharmony_ci# 6e9297d28Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7e9297d28Sopenharmony_ci# 8e9297d28Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9e9297d28Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10e9297d28Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11e9297d28Sopenharmony_ci# See the License for the specific language governing permissions and 12e9297d28Sopenharmony_ci# limitations under the License. 13e9297d28Sopenharmony_ci 14e9297d28Sopenharmony_ciimport("//build/test.gni") 15e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/graphic_config.gni") 16e9297d28Sopenharmony_ciimport("//foundation/graphic/graphic_2d/rosen/modules/effect/effect_config.gni") 17e9297d28Sopenharmony_ci 18e9297d28Sopenharmony_cimodule_output_path = "graphic_2d/rosen/modules/effect" 19e9297d28Sopenharmony_ci 20e9297d28Sopenharmony_ciohos_unittest("EffectTest") { 21e9297d28Sopenharmony_ci module_out_path = module_output_path 22e9297d28Sopenharmony_ci 23e9297d28Sopenharmony_ci deps = [ "//third_party/googletest:gtest_main" ] 24e9297d28Sopenharmony_ci 25e9297d28Sopenharmony_ci sources = [ 26e9297d28Sopenharmony_ci "color_picker_unittest.cpp", 27e9297d28Sopenharmony_ci "test_picture_files.cpp", 28e9297d28Sopenharmony_ci ] 29e9297d28Sopenharmony_ci 30e9297d28Sopenharmony_ci if (effect_enable_gpu) { 31e9297d28Sopenharmony_ci sources += [ 32e9297d28Sopenharmony_ci "algo_filter_unittest.cpp", 33e9297d28Sopenharmony_ci "brightness_filter_unittest.cpp", 34e9297d28Sopenharmony_ci "contrast_filter_unittest.cpp", 35e9297d28Sopenharmony_ci "effect_filter_unittest.cpp", 36e9297d28Sopenharmony_ci "egl_manager_test.cpp", 37e9297d28Sopenharmony_ci "filter_factory_unittest.cpp", 38e9297d28Sopenharmony_ci "filter_unittest.cpp", 39e9297d28Sopenharmony_ci "gaussian_blur_filter_unittest.cpp", 40e9297d28Sopenharmony_ci "horizontal_blur_filter_unittest.cpp", 41e9297d28Sopenharmony_ci "image_chain_unittest.cpp", 42e9297d28Sopenharmony_ci "input_unittest.cpp", 43e9297d28Sopenharmony_ci "mesh_unittest.cpp", 44e9297d28Sopenharmony_ci "output_unittest.cpp", 45e9297d28Sopenharmony_ci "program_unittest.cpp", 46e9297d28Sopenharmony_ci "saturation_filter_unittest.cpp", 47e9297d28Sopenharmony_ci "scale_filter_unittest.cpp", 48e9297d28Sopenharmony_ci "sk_image_chain_unittest.cpp", 49e9297d28Sopenharmony_ci "sk_image_filter_factory_unittest.cpp", 50e9297d28Sopenharmony_ci "vertical_blur_filter_unittest.cpp", 51e9297d28Sopenharmony_ci ] 52e9297d28Sopenharmony_ci } 53e9297d28Sopenharmony_ci 54e9297d28Sopenharmony_ci deps += [ 55e9297d28Sopenharmony_ci "$graphic_2d_root/frameworks/opengl_wrapper:EGL", 56e9297d28Sopenharmony_ci "$graphic_2d_root/frameworks/opengl_wrapper:GLESv3", 57e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/color_picker:color_picker", 58e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/effectChain:libeffectchain", 59e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/effect_ndk:native_effect_ndk", 60e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/egl:libegl_effect", 61e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/skia_effectChain:skeffectchain", 62e9297d28Sopenharmony_ci "$graphic_2d_root/utils/color_manager:color_manager", 63e9297d28Sopenharmony_ci "//foundation/multimedia/image_framework/interfaces/innerkits:image_native", 64e9297d28Sopenharmony_ci "//foundation/multimedia/image_framework/interfaces/kits/js/common:image", 65e9297d28Sopenharmony_ci ] 66e9297d28Sopenharmony_ci 67e9297d28Sopenharmony_ci cflags = [ 68e9297d28Sopenharmony_ci "-Dprivate=public", 69e9297d28Sopenharmony_ci "-Dprotected=public", 70e9297d28Sopenharmony_ci ] 71e9297d28Sopenharmony_ci 72e9297d28Sopenharmony_ci configs = [ 73e9297d28Sopenharmony_ci ":effect_test_config", 74e9297d28Sopenharmony_ci "$graphic_2d_root/utils/color_manager:color_manager_public_config", 75e9297d28Sopenharmony_ci ] 76e9297d28Sopenharmony_ci external_deps = [ 77e9297d28Sopenharmony_ci "cJSON:cjson", 78e9297d28Sopenharmony_ci "c_utils:utils", 79e9297d28Sopenharmony_ci "hilog:libhilog", 80e9297d28Sopenharmony_ci "image_framework:image", 81e9297d28Sopenharmony_ci "image_framework:pixelmap", 82e9297d28Sopenharmony_ci ] 83e9297d28Sopenharmony_ci 84e9297d28Sopenharmony_ci if (defined(use_new_skia) && use_new_skia) { 85e9297d28Sopenharmony_ci external_deps += [ "skia:skia_canvaskit" ] 86e9297d28Sopenharmony_ci } else { 87e9297d28Sopenharmony_ci include_dirs += [ "$flutter_root" ] 88e9297d28Sopenharmony_ci } 89e9297d28Sopenharmony_ci} 90e9297d28Sopenharmony_ci 91e9297d28Sopenharmony_ciconfig("effect_test_config") { 92e9297d28Sopenharmony_ci visibility = [ ":*" ] 93e9297d28Sopenharmony_ci include_dirs = [ 94e9297d28Sopenharmony_ci "//third_party/EGL/api", 95e9297d28Sopenharmony_ci "//third_party/openGLES/api", 96e9297d28Sopenharmony_ci "//third_party/skia", 97e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/color_picker/include", 98e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/effectChain/include", 99e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/effect_ndk/include", 100e9297d28Sopenharmony_ci "$graphic_2d_root/rosen/modules/effect/egl/include", 101e9297d28Sopenharmony_ci "$graphic_2d_root/utils/color_manager/export", 102e9297d28Sopenharmony_ci "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 103e9297d28Sopenharmony_ci "//foundation/multimedia/image_framework/interfaces/innerkits/include/", 104e9297d28Sopenharmony_ci ] 105e9297d28Sopenharmony_ci} 106e9297d28Sopenharmony_ci 107e9297d28Sopenharmony_cigroup("test") { 108e9297d28Sopenharmony_ci testonly = true 109e9297d28Sopenharmony_ci deps = [ ":EffectTest" ] 110e9297d28Sopenharmony_ci} 111