# 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") module_output_path = "graphic_2d/rosen/modules/2d_graphics/engine_adapter/skia_adapter" ohos_unittest("2d_graphics_skia_canvas_test") { module_out_path = module_output_path sources = [ "../../../../modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/skia_mask_filter.cpp", "../../../../modules/2d_graphics/src/drawing/engine_adapter/skia_adapter/skia_picture.cpp", "skia_bitmap_test.cpp", "skia_canvas_autocache_test.cpp", "skia_canvas_test.cpp", "skia_color_filter_test.cpp", "skia_color_space_test.cpp", "skia_data_test.cpp", "skia_font_mgr_test.cpp", "skia_font_style_set_test.cpp", "skia_font_test.cpp", "skia_gpu_context_test.cpp", "skia_helper_test.cpp", "skia_hm_symbol_config_ohos_test.cpp", "skia_hm_symbol_test.cpp", "skia_image_filter_test.cpp", "skia_image_info_test.cpp", "skia_image_test.cpp", "skia_mask_filter_test.cpp", "skia_matrix44_test.cpp", "skia_matrix_test.cpp", "skia_memory_tracer_test.cpp", "skia_paint_test.cpp", "skia_path_effect_test.cpp", "skia_path_test.cpp", "skia_picture_test.cpp", "skia_pixmap_test.cpp", "skia_region_test.cpp", "skia_runtime_blender_builder_test.cpp", "skia_runtime_effect_test.cpp", "skia_runtime_shader_builder_test.cpp", "skia_shader_effect_test.cpp", "skia_static_factory_test.cpp", "skia_surface_test.cpp", "skia_text_blob_test.cpp", "skia_texture_info_test.cpp", "skia_trace_memory_dump_test.cpp", "skia_typeface_test.cpp", "skia_vertices_test.cpp", ] include_dirs = [ "//third_party/googletest/googletest/include", "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include", "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src", "//commonlibrary/c_utils/base/include", "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter", "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing", ] deps = [ "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics", ] external_deps = [ "hilog:libhilog", "image_framework:image_native", "jsoncpp:jsoncpp", "skia:skia_canvaskit", ] include_dirs += [ "//third_party/skia", "//third_party/skia/include/", "//third_party/skia/include/core/", "//third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/", ] if (rs_enable_gpu) { defines = [ "RS_ENABLE_GPU" ] } part_name = "graphic_2d" subsystem_name = "graphic" } group("unittest") { testonly = true deps = [ ":2d_graphics_skia_canvas_test" ] }