• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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("../../multimodalinput_mini.gni")
16
17module_output_path = "input/input"
18
19ohos_shared_library("mmi_touch_drawing_handler") {
20  branch_protector_ret = "pac_ret"
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    debug = false
25  }
26
27  defines = input_default_defines
28
29  if (defined(use_rosen_drawing) && use_rosen_drawing) {
30    defines += [ "USE_ROSEN_DRAWING" ]
31  }
32
33  include_dirs = [
34    "${mmi_path}/intention/prototype/include",
35    "${mmi_path}/service/window_manager/include",
36  ]
37
38  sources = [ "src/touch_drawing_handler.cpp" ]
39
40  configs = [ "${mmi_path}:coverage_flags" ]
41
42  deps = [
43    "${mmi_path}/frameworks/proxy:libmmi-common",
44    "${mmi_path}/util:libmmi-util",
45  ]
46
47  external_deps = [
48    "c_utils:utils",
49    "graphic_2d:2d_graphics",
50    "graphic_2d:librender_service_base",
51    "graphic_2d:librender_service_client",
52    "hilog:libhilog",
53    "init:libbegetutil",
54  ]
55
56  if (hitrace_enabled) {
57    external_deps += [ "hitrace:hitrace_meter" ]
58  }
59
60  part_name = "${mmi_part_name}"
61  subsystem_name = "${mmi_subsystem_name}"
62}
63
64ohos_unittest("TouchDrawingHandlerTest") {
65  module_out_path = module_output_path
66
67  configs = [ "${mmi_path}:coverage_flags" ]
68
69  cflags = [
70    "-Dprivate=public",
71    "-Dprotected=public",
72  ]
73
74  branch_protector_ret = "pac_ret"
75  sanitize = {
76    cfi = true
77    cfi_cross_dso = true
78    debug = false
79    blocklist = "./../ipc_blocklist.txt"
80  }
81
82  defines = input_default_defines
83
84  if (defined(use_rosen_drawing) && use_rosen_drawing) {
85    defines += [ "USE_ROSEN_DRAWING" ]
86  }
87
88  include_dirs = [
89    "${mmi_path}/intention/prototype/include",
90    "${mmi_path}/service/window_manager/include",
91  ]
92
93  sources = [
94    "src/touch_drawing_handler.cpp",
95    "test/touch_drawing_handler_test.cpp",
96  ]
97
98  deps = [
99    "${mmi_path}/frameworks/proxy:libmmi-common",
100    "${mmi_path}/util:libmmi-util",
101  ]
102
103  external_deps = [
104    "c_utils:utils",
105    "googletest:gmock_main",
106    "googletest:gtest_main",
107    "graphic_2d:2d_graphics",
108    "graphic_2d:librender_service_base",
109    "graphic_2d:librender_service_client",
110    "hilog:libhilog",
111    "init:libbegetutil",
112  ]
113
114  if (hitrace_enabled) {
115    external_deps += [ "hitrace:hitrace_meter" ]
116  }
117}
118