Merge "Add cc_defaults as wrapper for graphics composer/common AIDL interfaces."

This commit is contained in:
Sally Qi 2022-08-30 20:52:44 +00:00 committed by Android (Google) Code Review
commit cb8583adad
13 changed files with 72 additions and 20 deletions

View file

@ -20,10 +20,10 @@ package {
cc_defaults {
name: "EvsHalDefaults",
defaults: ["android.hardware.graphics.common-ndk_static"],
static_libs: [
"android.hardware.automotive.evs-V1-ndk",
"android.hardware.common-V2-ndk",
"android.hardware.graphics.common-V3-ndk",
],
shared_libs: [
"libbase",

View file

@ -31,6 +31,7 @@ name:
],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.common-ndk_static",
"use_libaidlvintf_gtest_helper_static",
],
shared_libs: [
@ -43,7 +44,6 @@ name:
"android.hardware.automotive.evs@common-default-lib",
"android.hardware.automotive.evs-V1-ndk",
"android.hardware.common-V2-ndk",
"android.hardware.graphics.common-V3-ndk",
"libaidlcommonsupport",
],
test_suites: [

View file

@ -27,6 +27,7 @@ cc_test {
name: "VtsAidlHalCameraProvider_TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.common-ndk_static",
"use_libaidlvintf_gtest_helper_static",
],
srcs: [
@ -61,7 +62,6 @@ cc_test {
"android.hardware.camera.device-V1-ndk",
"android.hardware.camera.metadata-V1-ndk",
"android.hardware.camera.provider-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"android.hidl.allocator@1.0",
"libgrallocusage",
"libhidlmemory",

45
graphics/Android.bp Normal file
View file

@ -0,0 +1,45 @@
// Copyright (C) 2022 The Android Open Source Project
//
// 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.
package {
default_applicable_licenses: ["hardware_interfaces_license"],
}
cc_defaults {
name: "android.hardware.graphics.common-ndk_static",
static_libs: [
"android.hardware.graphics.common-V3-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.common-ndk_shared",
shared_libs: [
"android.hardware.graphics.common-V3-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_static",
static_libs: [
"android.hardware.graphics.composer3-V1-ndk",
],
}
cc_defaults {
name: "android.hardware.graphics.composer3-ndk_shared",
shared_libs: [
"android.hardware.graphics.composer3-V1-ndk",
],
}

View file

@ -36,7 +36,6 @@ cc_test {
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.mapper@4.0",
"libEGL",
"libGLESv2",

View file

@ -25,7 +25,10 @@ package {
cc_library_static {
name: "android.hardware.graphics.composer@2.2-vts",
defaults: ["hidl_defaults"],
defaults: [
"android.hardware.graphics.composer3-ndk_static",
"hidl_defaults",
],
srcs: [
"ComposerVts.cpp",
"ReadbackVts.cpp",
@ -38,7 +41,6 @@ cc_library_static {
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer3-V1-ndk",
"android.hardware.graphics.mapper@2.1-vts",
"libarect",
"libgtest",

View file

@ -27,6 +27,7 @@ cc_test {
name: "VtsHalGraphicsComposerV2_2TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.composer3-ndk_static",
// Needed for librenderengine
"skia_deps",
],
@ -68,7 +69,6 @@ cc_test {
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.2-vts",
"android.hardware.graphics.composer3-V1-ndk",
"android.hardware.graphics.mapper@2.0-vts",
"android.hardware.graphics.mapper@2.1-vts",
"android.hardware.graphics.mapper@3.0-vts",

View file

@ -67,9 +67,9 @@ aidl_interface {
cc_library_headers {
name: "android.hardware.graphics.composer3-command-buffer",
defaults: ["android.hardware.graphics.composer3-ndk_shared"],
vendor_available: true,
shared_libs: [
"android.hardware.graphics.composer3-V1-ndk",
"android.hardware.common-V2-ndk",
"libbase",
"libfmq",
@ -87,12 +87,12 @@ cc_library_headers {
cc_test {
name: "android.hardware.graphics.composer3-hidl2aidl-asserts",
defaults: ["android.hardware.graphics.composer3-ndk_shared"],
vendor_available: true,
srcs: ["android/hardware/graphics/composer3/Hidl2AidlAsserts.cpp"],
shared_libs: [
"libbinder_ndk",
"libhidlbase",
"android.hardware.graphics.composer3-V1-ndk",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.4",
],

View file

@ -30,6 +30,8 @@ cc_test {
"use_libaidlvintf_gtest_helper_static",
// Needed for librenderengine
"skia_deps",
"android.hardware.graphics.common-ndk_static",
"android.hardware.graphics.composer3-ndk_static",
],
srcs: [
"VtsHalGraphicsComposer3_TargetTest.cpp",
@ -67,8 +69,6 @@ cc_test {
"android.hardware.graphics.composer3-command-buffer",
],
static_libs: [
"android.hardware.graphics.composer3-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.common@1.2",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",

View file

@ -25,7 +25,10 @@ package {
cc_library_static {
name: "android.hardware.graphics.mapper@4.0-vts",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.common-ndk_static",
],
srcs: ["MapperVts.cpp"],
cflags: [
"-O0",
@ -34,7 +37,6 @@ cc_library_static {
static_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.mapper@4.0",
"libaidlcommonsupport",
],

View file

@ -27,11 +27,11 @@ cc_test {
name: "VtsHalGraphicsMapperV4_0TargetTest",
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.common-ndk_static",
"use_libaidlvintf_gtest_helper_static",
],
srcs: ["VtsHalGraphicsMapperV4_0TargetTest.cpp"],
static_libs: [
"android.hardware.graphics.common-V3-ndk",
"android.hardware.graphics.mapper@4.0-vts",
"libaidlcommonsupport",
"libgralloctypes",

View file

@ -25,7 +25,10 @@ package {
cc_defaults {
name: "neuralnetworks_utils_hal_aidl_defaults",
defaults: ["neuralnetworks_utils_defaults"],
defaults: [
"android.hardware.graphics.common-ndk_static",
"neuralnetworks_utils_defaults",
],
srcs: [
// AIDL utils that a driver may depend on.
"src/BufferTracker.cpp",
@ -38,7 +41,6 @@ cc_defaults {
export_include_dirs: ["include"],
cflags: ["-Wthread-safety"],
static_libs: [
"android.hardware.graphics.common-V3-ndk",
"libaidlcommonsupport",
"libarect",
"neuralnetworks_types",
@ -90,9 +92,9 @@ cc_library_static {
// AIDL features can include this cc_defaults to avoid managing dependency versions explicitly.
cc_defaults {
name: "neuralnetworks_use_latest_utils_hal_aidl",
defaults: ["android.hardware.graphics.common-ndk_static"],
static_libs: [
"android.hardware.common-V2-ndk",
"android.hardware.graphics.common-V3-ndk",
"android.hardware.neuralnetworks-V4-ndk",
"neuralnetworks_utils_hal_aidl",
],

View file

@ -27,9 +27,9 @@ package {
// dependencies
cc_defaults {
name: "VtsHalSensorsDefaults",
defaults: ["android.hardware.graphics.common-ndk_shared"],
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"libbinder_ndk",
"libutils",
"libvndksupport",
@ -42,7 +42,10 @@ cc_defaults {
cc_library_static {
name: "VtsHalSensorsTargetTestUtils",
defaults: ["VtsHalTargetTestDefaults"],
defaults: [
"VtsHalTargetTestDefaults",
"android.hardware.graphics.common-ndk_shared",
],
cflags: ["-DLOG_TAG=\"sensors_hidl_hal_test\""],
srcs: [
"GrallocWrapper.cpp",
@ -56,7 +59,6 @@ cc_library_static {
// Targets that depend on us need to also include these
shared_libs: [
"android.hardware.graphics.allocator-V1-ndk",
"android.hardware.graphics.common-V3-ndk",
"libbinder_ndk",
"libutils",
"libvndksupport",