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") 16 17module_output_path = 18 "graphic_2d/rosen/modules/2d_graphics/engine_adapter/skia_adapter" 19 20ohos_unittest("2d_graphics_skia_canvas_test") { 21 module_out_path = module_output_path 22 23 sources = [ 24 "../../../../modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/skia_mask_filter.cpp", 25 "../../../../modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/skia_picture.cpp", 26 "skia_bitmap_test.cpp", 27 "skia_canvas_autocache_test.cpp", 28 "skia_canvas_test.cpp", 29 "skia_color_filter_test.cpp", 30 "skia_color_space_test.cpp", 31 "skia_data_test.cpp", 32 "skia_font_mgr_test.cpp", 33 "skia_font_style_set_test.cpp", 34 "skia_font_test.cpp", 35 "skia_gpu_context_test.cpp", 36 "skia_helper_test.cpp", 37 "skia_hm_symbol_config_ohos_test.cpp", 38 "skia_hm_symbol_test.cpp", 39 "skia_image_filter_test.cpp", 40 "skia_image_info_test.cpp", 41 "skia_image_test.cpp", 42 "skia_mask_filter_test.cpp", 43 "skia_matrix44_test.cpp", 44 "skia_matrix_test.cpp", 45 "skia_memory_tracer_test.cpp", 46 "skia_paint_test.cpp", 47 "skia_path_effect_test.cpp", 48 "skia_path_test.cpp", 49 "skia_picture_test.cpp", 50 "skia_pixmap_test.cpp", 51 "skia_region_test.cpp", 52 "skia_runtime_blender_builder_test.cpp", 53 "skia_runtime_effect_test.cpp", 54 "skia_runtime_shader_builder_test.cpp", 55 "skia_shader_effect_test.cpp", 56 "skia_static_factory_test.cpp", 57 "skia_surface_test.cpp", 58 "skia_text_blob_test.cpp", 59 "skia_texture_info_test.cpp", 60 "skia_trace_memory_dump_test.cpp", 61 "skia_typeface_test.cpp", 62 "skia_vertices_test.cpp", 63 ] 64 65 include_dirs = [ 66 "//third_party/googletest/googletest/include", 67 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include", 68 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src", 69 "//commonlibrary/c_utils/base/include", 70 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter", 71 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing", 72 ] 73 74 deps = [ 75 "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics", 76 ] 77 78 external_deps = [ 79 "hilog:libhilog", 80 "image_framework:image_native", 81 "jsoncpp:jsoncpp", 82 "skia:skia_canvaskit", 83 ] 84 85 include_dirs += [ 86 "//third_party/skia", 87 "//third_party/skia/include/", 88 "//third_party/skia/include/core/", 89 "//third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/", 90 ] 91 92 if (rs_enable_gpu) { 93 defines = [ "RS_ENABLE_GPU" ] 94 } 95 96 part_name = "graphic_2d" 97 subsystem_name = "graphic" 98} 99 100group("unittest") { 101 testonly = true 102 103 deps = [ ":2d_graphics_skia_canvas_test" ] 104} 105