• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/ohos.gni")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17## Build libcomposer.so
18
19config("composer_config") {
20  visibility = [ ":*" ]
21
22  cflags = [
23    "-Wall",
24    "-Werror",
25    "-g3",
26  ]
27}
28
29config("composer_public_config") {
30  include_dirs = [
31    "//foundation/graphic/graphic_2d/rosen/include/common",
32    "//drivers/peripheral/display/interfaces/include",
33    "//foundation/graphic/graphic_2d/interfaces/inner_api/common",
34    "//foundation/graphic/graphic_2d/rosen/modules/composer/hdi_backend/include",
35    "//foundation/graphic/graphic_2d/rosen/modules/composer/vsync/include",
36    "//foundation/graphic/graphic_2d/interfaces/inner_api/composer",
37  ]
38}
39
40ohos_shared_library("libcomposer") {
41  sources = [
42    "hdi_backend/src/hdi_backend.cpp",
43    "hdi_backend/src/hdi_device.cpp",
44    "hdi_backend/src/hdi_framebuffer_surface.cpp",
45    "hdi_backend/src/hdi_layer.cpp",
46    "hdi_backend/src/hdi_output.cpp",
47    "hdi_backend/src/hdi_screen.cpp",
48  ]
49
50  include_dirs = [
51    "$graphic_2d_root/rosen/modules/render_frame_trace/include",
52    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base/src",
53    "//foundation/graphic/graphic_2d/utils/log",
54  ]
55
56  configs = [ ":composer_config" ]
57
58  defines = []
59  defines += gpu_defines
60
61  public_configs = [
62    ":composer_public_config",
63    "//commonlibrary/c_utils/base:utils_config",
64  ]
65
66  deps = [
67    "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog",
68    "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core",
69    "//foundation/graphic/graphic_2d:libsurface",
70    "$graphic_2d_root/rosen/modules/render_frame_trace:render_frame_trace",
71    "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base",
72  ]
73
74  public_deps = [
75    "vsync:libvsync",
76    "//commonlibrary/c_utils/base:utils",
77    "//foundation/graphic/graphic_2d/utils:buffer_handle",
78    "//foundation/graphic/graphic_2d/utils:scoped_bytrace",
79    "//foundation/graphic/graphic_2d/utils:sync_fence",
80  ]
81
82  external_deps = [ "drivers_interface_display:display_device_client" ]
83
84  part_name = "graphic_standard"
85  subsystem_name = "graphic"
86}
87
88## Build libcomposer.so
89
90group("test") {
91  testonly = true
92
93  deps = [
94    "hdi_backend/test:test",
95    "vsync/test:test",
96  ]
97}
98