You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
362 lines
8.6 KiB
362 lines
8.6 KiB
// Copyright 2010 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 {
|
|
// See: http://go/android-license-faq
|
|
// A large-scale-change added 'default_applicable_licenses' to import
|
|
// all of the 'license_kinds' from "frameworks_native_license"
|
|
// to get the below license kinds:
|
|
// SPDX-license-identifier-Apache-2.0
|
|
default_applicable_licenses: ["frameworks_native_license"],
|
|
}
|
|
|
|
cc_library_headers {
|
|
name: "libgui_headers",
|
|
vendor_available: true,
|
|
export_include_dirs: ["include"],
|
|
|
|
// we must build this module to get the required header as that is generated
|
|
export_shared_lib_headers: [
|
|
"android.hidl.token@1.0-utils",
|
|
"android.hardware.graphics.bufferqueue@1.0",
|
|
"android.hardware.graphics.bufferqueue@2.0",
|
|
],
|
|
shared_libs: [
|
|
"android.hidl.token@1.0-utils",
|
|
"android.hardware.graphics.bufferqueue@1.0",
|
|
"android.hardware.graphics.bufferqueue@2.0",
|
|
],
|
|
min_sdk_version: "29",
|
|
}
|
|
|
|
// AIDL files that should be exposed to java
|
|
filegroup {
|
|
name: "guiconstants_aidl",
|
|
srcs: [
|
|
"android/gui/DropInputMode.aidl",
|
|
],
|
|
}
|
|
|
|
cc_library_headers {
|
|
name: "libgui_aidl_headers",
|
|
vendor_available: true,
|
|
static_libs: [
|
|
"libgui_aidl_static",
|
|
],
|
|
export_static_lib_headers: [
|
|
"libgui_aidl_static",
|
|
],
|
|
}
|
|
|
|
filegroup {
|
|
name: "libgui_aidl",
|
|
srcs: ["aidl/**/*.aidl"],
|
|
path: "aidl/",
|
|
}
|
|
|
|
cc_library_static {
|
|
name: "libgui_aidl_static",
|
|
vendor_available: true,
|
|
srcs: [
|
|
":libgui_aidl",
|
|
],
|
|
|
|
shared_libs: [
|
|
"libbinder",
|
|
"libui",
|
|
],
|
|
|
|
local_include_dirs: [
|
|
"include",
|
|
],
|
|
|
|
export_shared_lib_headers: [
|
|
"libbinder",
|
|
],
|
|
|
|
aidl: {
|
|
export_aidl_headers: true
|
|
}
|
|
}
|
|
|
|
|
|
cc_library_shared {
|
|
name: "libgui",
|
|
vendor_available: true,
|
|
vndk: {
|
|
enabled: true,
|
|
private: true,
|
|
},
|
|
double_loadable: true,
|
|
|
|
defaults: ["libgui_bufferqueue-defaults"],
|
|
|
|
static_libs: [
|
|
"libgui_aidl_static",
|
|
],
|
|
export_static_lib_headers: [
|
|
"libgui_aidl_static",
|
|
],
|
|
|
|
srcs: [
|
|
":guiconstants_aidl",
|
|
":framework_native_aidl",
|
|
":inputconstants_aidl",
|
|
":libgui_bufferqueue_sources",
|
|
|
|
"BitTube.cpp",
|
|
"BLASTBufferQueue.cpp",
|
|
"BufferHubConsumer.cpp",
|
|
"BufferHubProducer.cpp",
|
|
"BufferItemConsumer.cpp",
|
|
"ConsumerBase.cpp",
|
|
"CpuConsumer.cpp",
|
|
"DebugEGLImageTracker.cpp",
|
|
"DisplayEventDispatcher.cpp",
|
|
"DisplayEventReceiver.cpp",
|
|
"FrameTimelineInfo.cpp",
|
|
"GLConsumer.cpp",
|
|
"IConsumerListener.cpp",
|
|
"IDisplayEventConnection.cpp",
|
|
"IGraphicBufferConsumer.cpp",
|
|
"IGraphicBufferProducer.cpp",
|
|
"IProducerListener.cpp",
|
|
"IRegionSamplingListener.cpp",
|
|
"ISurfaceComposer.cpp",
|
|
"ISurfaceComposerClient.cpp",
|
|
"ITransactionCompletedListener.cpp",
|
|
"LayerDebugInfo.cpp",
|
|
"LayerMetadata.cpp",
|
|
"LayerState.cpp",
|
|
"OccupancyTracker.cpp",
|
|
"StreamSplitter.cpp",
|
|
"ScreenCaptureResults.cpp",
|
|
"Surface.cpp",
|
|
"SurfaceControl.cpp",
|
|
"SurfaceComposerClient.cpp",
|
|
"SyncFeatures.cpp",
|
|
"TransactionTracing.cpp",
|
|
"view/Surface.cpp",
|
|
"bufferqueue/1.0/B2HProducerListener.cpp",
|
|
"bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
|
|
"bufferqueue/2.0/B2HProducerListener.cpp",
|
|
"bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
|
|
],
|
|
|
|
shared_libs: [
|
|
"android.frameworks.bufferhub@1.0",
|
|
"libbinder",
|
|
"libbufferhub",
|
|
"libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
|
|
"libinput",
|
|
"libpdx_default_transport",
|
|
],
|
|
|
|
export_shared_lib_headers: [
|
|
"libbinder",
|
|
"libinput",
|
|
],
|
|
|
|
export_header_lib_headers: [
|
|
"libgui_aidl_headers",
|
|
],
|
|
|
|
// bufferhub is not used when building libgui for vendors
|
|
target: {
|
|
vendor: {
|
|
cflags: [
|
|
"-DNO_BUFFERHUB",
|
|
"-DNO_INPUT",
|
|
],
|
|
exclude_srcs: [
|
|
"BufferHubConsumer.cpp",
|
|
"BufferHubProducer.cpp",
|
|
],
|
|
exclude_shared_libs: [
|
|
"android.frameworks.bufferhub@1.0",
|
|
"libbufferhub",
|
|
"libbufferhubqueue",
|
|
"libinput",
|
|
"libpdx_default_transport",
|
|
],
|
|
},
|
|
},
|
|
|
|
aidl: {
|
|
export_aidl_headers: true,
|
|
},
|
|
|
|
header_libs: [
|
|
"libdvr_headers",
|
|
"libgui_aidl_headers",
|
|
"libpdx_headers",
|
|
],
|
|
|
|
pgo: {
|
|
sampling: true,
|
|
profile_file: "libgui/libgui.profdata",
|
|
},
|
|
|
|
lto: {
|
|
thin: true,
|
|
},
|
|
}
|
|
|
|
// Used by media codec services exclusively as a static lib for
|
|
// core bufferqueue support only.
|
|
cc_library_static {
|
|
name: "libgui_bufferqueue_static",
|
|
vendor_available: true,
|
|
apex_available: [
|
|
"//apex_available:platform",
|
|
"com.android.media.swcodec",
|
|
],
|
|
min_sdk_version: "29",
|
|
|
|
cflags: [
|
|
"-DNO_BUFFERHUB",
|
|
"-DNO_BINDER",
|
|
],
|
|
|
|
defaults: ["libgui_bufferqueue-defaults"],
|
|
|
|
srcs: [
|
|
":inputconstants_aidl",
|
|
":libgui_bufferqueue_sources",
|
|
":libgui_aidl",
|
|
],
|
|
}
|
|
|
|
filegroup {
|
|
name: "libgui_bufferqueue_sources",
|
|
srcs: [
|
|
"BatchBufferOps.cpp",
|
|
"BufferItem.cpp",
|
|
"BufferQueue.cpp",
|
|
"BufferQueueConsumer.cpp",
|
|
"BufferQueueCore.cpp",
|
|
"BufferQueueProducer.cpp",
|
|
"BufferQueueThreadState.cpp",
|
|
"BufferSlot.cpp",
|
|
"FrameTimestamps.cpp",
|
|
"GLConsumerUtils.cpp",
|
|
"HdrMetadata.cpp",
|
|
"IGraphicBufferProducerFlattenables.cpp",
|
|
"bufferqueue/1.0/Conversion.cpp",
|
|
"bufferqueue/1.0/H2BProducerListener.cpp",
|
|
"bufferqueue/1.0/WProducerListener.cpp",
|
|
"bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
|
|
"bufferqueue/2.0/H2BProducerListener.cpp",
|
|
"bufferqueue/2.0/types.cpp",
|
|
],
|
|
}
|
|
|
|
// Common build config shared by libgui and libgui_bufferqueue_static.
|
|
cc_defaults {
|
|
name: "libgui_bufferqueue-defaults",
|
|
|
|
clang: true,
|
|
cflags: [
|
|
"-Wall",
|
|
"-Werror",
|
|
],
|
|
|
|
cppflags: [
|
|
"-Wextra",
|
|
"-DDEBUG_ONLY_CODE=0",
|
|
],
|
|
|
|
product_variables: {
|
|
eng: {
|
|
cppflags: [
|
|
"-UDEBUG_ONLY_CODE",
|
|
"-DDEBUG_ONLY_CODE=1",
|
|
],
|
|
},
|
|
},
|
|
|
|
whole_static_libs: [
|
|
"LibGuiProperties",
|
|
],
|
|
|
|
shared_libs: [
|
|
"android.hardware.graphics.bufferqueue@1.0",
|
|
"android.hardware.graphics.bufferqueue@2.0",
|
|
"android.hardware.graphics.common@1.1",
|
|
"android.hardware.graphics.common@1.2",
|
|
"android.hidl.token@1.0-utils",
|
|
"libbase",
|
|
"libcutils",
|
|
"libEGL",
|
|
"libGLESv2",
|
|
"libhidlbase",
|
|
"liblog",
|
|
"libnativewindow",
|
|
"libsync",
|
|
"libui",
|
|
"libutils",
|
|
"libvndksupport",
|
|
],
|
|
|
|
static_libs: [
|
|
"libbinderthreadstateutils",
|
|
],
|
|
|
|
header_libs: [
|
|
"libgui_headers",
|
|
"libnativebase_headers",
|
|
],
|
|
|
|
include_dirs: [
|
|
"frameworks/native/include",
|
|
],
|
|
|
|
export_shared_lib_headers: [
|
|
"libEGL",
|
|
"libnativewindow",
|
|
"libui",
|
|
"android.hardware.graphics.bufferqueue@1.0",
|
|
"android.hardware.graphics.bufferqueue@2.0",
|
|
"android.hardware.graphics.common@1.1",
|
|
"android.hardware.graphics.common@1.2",
|
|
"android.hidl.token@1.0-utils",
|
|
],
|
|
|
|
export_header_lib_headers: [
|
|
"libgui_headers",
|
|
],
|
|
|
|
export_include_dirs: [
|
|
"include",
|
|
],
|
|
}
|
|
|
|
// GMocks for use by external code
|
|
cc_library_static {
|
|
name: "libgui_mocks",
|
|
vendor_available: false,
|
|
|
|
defaults: ["libgui_bufferqueue-defaults"],
|
|
static_libs: [
|
|
"libgtest",
|
|
"libgmock",
|
|
],
|
|
|
|
srcs: [
|
|
"mock/GraphicBufferConsumer.cpp",
|
|
"mock/GraphicBufferProducer.cpp",
|
|
],
|
|
}
|
|
|
|
subdirs = ["tests"]
|