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 "$graphic_2d_root/rosen/include/common", 32 "//drivers/peripheral/display/interfaces/include", 33 "$graphic_2d_root/interfaces/inner_api/common", 34 "$graphic_2d_root/rosen/modules/composer/hdi_backend/include", 35 "$graphic_2d_root/rosen/modules/composer/vsync/include", 36 "$graphic_2d_root/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_device_impl.cpp", 45 "hdi_backend/src/hdi_framebuffer_surface.cpp", 46 "hdi_backend/src/hdi_layer.cpp", 47 "hdi_backend/src/hdi_output.cpp", 48 "hdi_backend/src/hdi_screen.cpp", 49 ] 50 51 include_dirs = [ "$graphic_2d_root/utils/log" ] 52 53 configs = [ ":composer_config" ] 54 55 defines = [] 56 defines += gpu_defines 57 58 public_configs = [ 59 ":composer_public_config", 60 "//commonlibrary/c_utils/base:utils_config", 61 ] 62 63 deps = [ "$graphic_2d_root:libsurface" ] 64 65 public_deps = [ 66 "$graphic_2d_root/utils:buffer_handle", 67 "$graphic_2d_root/utils:scoped_bytrace", 68 "$graphic_2d_root/utils:sync_fence", 69 "vsync:libvsync", 70 ] 71 72 external_deps = [ 73 "c_utils:utils", 74 "drivers_interface_display:display_buffer_idl_headers", 75 "drivers_interface_display:display_composer_idl_headers", 76 "drivers_interface_display:libdisplay_composer_hdi_impl", 77 "hilog:libhilog", 78 "ipc:ipc_core", 79 ] 80 81 part_name = "graphic_2d" 82 subsystem_name = "graphic" 83} 84 85## Build libcomposer.so 86 87group("test") { 88 testonly = true 89 90 deps = [ 91 "hdi_backend/test:test", 92 "vsync/test:test", 93 ] 94} 95