• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_test.cpp",
28    "skia_color_filter_test.cpp",
29    "skia_color_space_test.cpp",
30    "skia_data_test.cpp",
31    "skia_font_mgr_test.cpp",
32    "skia_font_style_set_test.cpp",
33    "skia_font_test.cpp",
34    "skia_gpu_context_test.cpp",
35    "skia_helper_test.cpp",
36    "skia_hm_symbol_config_ohos_test.cpp",
37    "skia_hm_symbol_test.cpp",
38    "skia_image_filter_test.cpp",
39    "skia_image_info_test.cpp",
40    "skia_image_test.cpp",
41    "skia_mask_filter_test.cpp",
42    "skia_matrix44_test.cpp",
43    "skia_matrix_test.cpp",
44    "skia_memory_tracer_test.cpp",
45    "skia_paint_test.cpp",
46    "skia_path_effect_test.cpp",
47    "skia_path_test.cpp",
48    "skia_picture_test.cpp",
49    "skia_pixmap_test.cpp",
50    "skia_region_test.cpp",
51    "skia_runtime_blender_builder_test.cpp",
52    "skia_runtime_effect_test.cpp",
53    "skia_runtime_shader_builder_test.cpp",
54    "skia_shader_effect_test.cpp",
55    "skia_surface_test.cpp",
56    "skia_text_blob_test.cpp",
57    "skia_texture_info_test.cpp",
58    "skia_trace_memory_dump_test.cpp",
59    "skia_typeface_test.cpp",
60    "skia_vertices_test.cpp",
61  ]
62
63  include_dirs = [
64    "//third_party/googletest/googletest/include",
65    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include",
66    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src",
67    "//commonlibrary/c_utils/base/include",
68    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/engine_adapter",
69    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing",
70  ]
71
72  deps = [
73    "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics",
74    "//third_party/jsoncpp:jsoncpp_static",
75  ]
76
77  external_deps = [
78    "hilog:libhilog",
79    "image_framework:image_native",
80  ]
81
82  include_dirs += [
83    "//third_party/skia",
84    "//third_party/skia/include/",
85  ]
86  deps += [ "//third_party/skia:skia_ohos" ]
87
88  if (ace_enable_gpu) {
89    defines = [ "ACE_ENABLE_GPU" ]
90  }
91
92  part_name = "graphic_2d"
93  subsystem_name = "graphic"
94}
95
96group("unittest") {
97  testonly = true
98
99  deps = [ ":2d_graphics_skia_canvas_test" ]
100}
101