From 198cc24a555bc807470003711f06ff10e31811e1 Mon Sep 17 00:00:00 2001 From: handyohos Date: Fri, 8 Jul 2022 10:53:36 +0800 Subject: [PATCH] feat: drivers_interface_display component provide gralloc_client and display_client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) drivers_interface_display定义hdi_gralloc_client和display_device_client对外模块 2) 定义stub library: libdisplay_device, libdisplay_gfx, libdisplay_layer以及libdisplay_gralloc, 这些库在系统组件编译时参与编译,但不安装。芯片组件编译时安装具体实现。 3) 系统组件编译时仅依赖hdi_gralloc_client,其芯片适配部分通过libdisplay_gralloc stub提供。 4) 系统组件编译时仅依赖display_display_client, 其芯片适配部分通过libdisplay_device, libdisplay_gfx, libdisplay_layer stub提供。 5) 原有到libhdi_display_gralloc_client, libhdi_display_gralloc_proxy,libhdi_mapper_adapter合并为一个libhdi_display_gralloc_client库,仅依赖libdisplay_gralloc。 Signed-off-by: handyohos Change-Id: I4f25deaeacb9ce4d9e50ccd08924ee13a1283e30 #I5G46T --- display/bundle.json | 11 ++- display/v1_0/BUILD.gn | 72 +++++++++++++++++++ display/v1_0/stub/libdisplay_device.stub.json | 4 ++ display/v1_0/stub/libdisplay_gfx.stub.json | 4 ++ .../v1_0/stub/libdisplay_gralloc.stub.json | 4 ++ display/v1_0/stub/libdisplay_layer.stub.json | 4 ++ 6 files changed, 98 insertions(+), 1 deletion(-) mode change 100644 => 100755 display/bundle.json create mode 100755 display/v1_0/BUILD.gn create mode 100755 display/v1_0/stub/libdisplay_device.stub.json create mode 100755 display/v1_0/stub/libdisplay_gfx.stub.json create mode 100755 display/v1_0/stub/libdisplay_gralloc.stub.json create mode 100755 display/v1_0/stub/libdisplay_layer.stub.json diff --git a/display/bundle.json b/display/bundle.json old mode 100644 new mode 100755 index b69e6a25..af5f7e9e --- a/display/bundle.json +++ b/display/bundle.json @@ -28,7 +28,8 @@ }, "build": { "sub_component": [ - "//drivers/peripheral/display/hdi_service/gralloc/client:hdi_gralloc_client" + "//drivers/peripheral/display/hdi_service/gralloc/client:hdi_gralloc_client", + "//drivers/interface/display/v1_0:display_device_client" ], "inner_kits": [ { @@ -40,6 +41,14 @@ ], "header_base": "//drivers/peripheral/display/hdi_service/gralloc/include" } + }, + { + "name": "//drivers/interface/display/v1_0:display_device_client", + "header": { + "header_files": [ + ], + "header_base": "//drivers/peripheral/display/interfaces/include" + } } ] } diff --git a/display/v1_0/BUILD.gn b/display/v1_0/BUILD.gn new file mode 100755 index 00000000..c039c164 --- /dev/null +++ b/display/v1_0/BUILD.gn @@ -0,0 +1,72 @@ +# Copyright (c) 2022 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. + +if (defined(ohos_lite)) { + group("display_device_client") { + } +} else { + import("//build/ohos.gni") + import("//build/ohos/native_stub/native_stub.gni") + + # + # exported include directories + # + config("libdisplay_exported_config") { + visibility = [ ":*" ] + include_dirs = [ + "//drivers/peripheral/base", + "//drivers/peripheral/display/interfaces/include", + ] + } + + # + # stub library for libdisplay_gralloc + # + ohos_native_stub_library("libdisplay_gralloc") { + public_configs = [ ":libdisplay_exported_config" ] + stub_description_file = "./stub/libdisplay_gralloc.stub.json" + } + + # + # stub library for libdisplay_device + # + ohos_native_stub_library("libdisplay_device") { + public_configs = [ ":libdisplay_exported_config" ] + stub_description_file = "./stub/libdisplay_device.stub.json" + } + + # + # stub library for libdisplay_gfx + # + ohos_native_stub_library("libdisplay_gfx") { + public_configs = [ ":libdisplay_exported_config" ] + stub_description_file = "./stub/libdisplay_gfx.stub.json" + } + + # + # stub library for libdisplay_layer + # + ohos_native_stub_library("libdisplay_layer") { + public_configs = [ ":libdisplay_exported_config" ] + stub_description_file = "./stub/libdisplay_layer.stub.json" + } + + group("display_device_client") { + deps = [ + ":libdisplay_device", + ":libdisplay_gfx", + ":libdisplay_layer", + ] + public_configs = [ ":libdisplay_exported_config" ] + } +} diff --git a/display/v1_0/stub/libdisplay_device.stub.json b/display/v1_0/stub/libdisplay_device.stub.json new file mode 100755 index 00000000..2227fd8c --- /dev/null +++ b/display/v1_0/stub/libdisplay_device.stub.json @@ -0,0 +1,4 @@ +[ + { "name": "DeviceInitialize" }, + { "name": "DeviceUninitialize" } +] diff --git a/display/v1_0/stub/libdisplay_gfx.stub.json b/display/v1_0/stub/libdisplay_gfx.stub.json new file mode 100755 index 00000000..477c657d --- /dev/null +++ b/display/v1_0/stub/libdisplay_gfx.stub.json @@ -0,0 +1,4 @@ +[ + { "name": "GfxInitialize" }, + { "name": "GfxUninitialize" } +] diff --git a/display/v1_0/stub/libdisplay_gralloc.stub.json b/display/v1_0/stub/libdisplay_gralloc.stub.json new file mode 100755 index 00000000..ce2a8864 --- /dev/null +++ b/display/v1_0/stub/libdisplay_gralloc.stub.json @@ -0,0 +1,4 @@ +[ + { "name": "GrallocInitialize" }, + { "name": "GrallocUninitialize" } +] diff --git a/display/v1_0/stub/libdisplay_layer.stub.json b/display/v1_0/stub/libdisplay_layer.stub.json new file mode 100755 index 00000000..e3dd7ab3 --- /dev/null +++ b/display/v1_0/stub/libdisplay_layer.stub.json @@ -0,0 +1,4 @@ +[ + { "name": "LayerInitialize" }, + { "name": "LayerUninitialize" } +] -- Gitee