mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 23:20:32 +00:00
5781c279ad
Merge pull request !13973 from mikefeng/master
111 lines
2.8 KiB
Plaintext
111 lines
2.8 KiB
Plaintext
# Copyright (c) 2021 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/ohos.gni")
|
|
import("//foundation/graphic/graphic_2d/graphic_config.gni")
|
|
|
|
## Build libcomposer.so
|
|
|
|
config("composer_config") {
|
|
visibility = [ ":*" ]
|
|
|
|
cflags = [
|
|
"-Wall",
|
|
"-Werror",
|
|
"-g3",
|
|
]
|
|
if (is_ohos && is_clang && (target_cpu == "arm" || target_cpu == "arm64")) {
|
|
if (!use_libfuzzer) {
|
|
cflags += [ "-flto=thin" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
config("composer_public_config") {
|
|
include_dirs = [
|
|
"$graphic_2d_root/rosen/include/common",
|
|
"$graphic_2d_root/interfaces/inner_api/common",
|
|
"$graphic_2d_root/rosen/modules/composer/hdi_backend/include",
|
|
"$graphic_2d_root/rosen/modules/composer/vsync/include",
|
|
"$graphic_2d_root/interfaces/inner_api/composer",
|
|
]
|
|
}
|
|
|
|
ohos_shared_library("libcomposer") {
|
|
sanitize = {
|
|
boundary_sanitize = true
|
|
integer_overflow = true
|
|
ubsan = true
|
|
}
|
|
sources = [
|
|
"hdi_backend/src/hdi_backend.cpp",
|
|
"hdi_backend/src/hdi_device.cpp",
|
|
"hdi_backend/src/hdi_device_impl.cpp",
|
|
"hdi_backend/src/hdi_framebuffer_surface.cpp",
|
|
"hdi_backend/src/hdi_layer.cpp",
|
|
"hdi_backend/src/hdi_output.cpp",
|
|
"hdi_backend/src/hdi_screen.cpp",
|
|
]
|
|
|
|
include_dirs = [
|
|
"$graphic_2d_root/utils/log",
|
|
"$graphic_2d_root/rosen/modules/utils",
|
|
]
|
|
|
|
configs = [ ":composer_config" ]
|
|
|
|
defines = []
|
|
defines += gpu_defines
|
|
|
|
public_configs = [ ":composer_public_config" ]
|
|
|
|
deps = [
|
|
"$graphic_2d_root/utils:scoped_bytrace",
|
|
"vsync:libvsync",
|
|
]
|
|
|
|
public_external_deps = [
|
|
"c_utils:utils",
|
|
"graphic_surface:buffer_handle",
|
|
"graphic_surface:sync_fence",
|
|
]
|
|
|
|
external_deps = [
|
|
"drivers_interface_display:libdisplay_buffer_proxy_1.0",
|
|
"drivers_interface_display:libdisplay_commontype_proxy_1.0",
|
|
"drivers_interface_display:libdisplay_composer_hdi_impl_1.2",
|
|
"drivers_interface_display:libdisplay_composer_proxy_1.1",
|
|
"drivers_interface_display:libdisplay_composer_proxy_1.2",
|
|
"graphic_surface:surface",
|
|
"hilog:libhilog",
|
|
"hitrace:hitrace_meter",
|
|
"init:libbeget_proxy",
|
|
"init:libbegetutil",
|
|
"ipc:ipc_core",
|
|
]
|
|
|
|
part_name = "graphic_2d"
|
|
subsystem_name = "graphic"
|
|
}
|
|
|
|
## Build libcomposer.so
|
|
|
|
group("test") {
|
|
testonly = true
|
|
|
|
deps = [
|
|
"hdi_backend/test:test",
|
|
"vsync/test:test",
|
|
]
|
|
}
|