blob: 55bb6f552dc3a48576cc1b42282946c981367271 [file] [log] [blame]
Dan Willemsen3106c1c2016-10-03 23:56:51 -07001// Copyright 2010 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
Jiyong Park172bd722017-06-21 12:14:18 +090014cc_library_headers {
15 name: "libgui_headers",
16 vendor_available: true,
17 export_include_dirs: ["include"],
Lajos Molnardf24df22019-04-01 15:34:32 -070018
19 // we must build this module to get the required header as that is generated
Marco Nelissen109f9412019-10-28 12:55:47 -070020 export_shared_lib_headers: [
21 "android.hidl.token@1.0-utils",
22 "android.hardware.graphics.bufferqueue@1.0",
23 "android.hardware.graphics.bufferqueue@2.0",
24 ],
25 shared_libs: [
26 "android.hidl.token@1.0-utils",
27 "android.hardware.graphics.bufferqueue@1.0",
28 "android.hardware.graphics.bufferqueue@2.0",
29 ],
Jiyong Park172bd722017-06-21 12:14:18 +090030}
Dan Willemsen3106c1c2016-10-03 23:56:51 -070031
32cc_library_shared {
33 name: "libgui",
Jiyong Park99c514e2017-11-17 19:09:31 +090034 vendor_available: false,
Justin Yun71d6c8852017-07-24 15:19:45 +090035 vndk: {
36 enabled: true,
37 },
Jiyong Parka75d3d62018-04-09 12:16:30 +090038 double_loadable: true,
Dan Willemsen3106c1c2016-10-03 23:56:51 -070039
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070040 defaults: ["libgui_bufferqueue-defaults"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070041
42 srcs: [
Dan Willemsen3106c1c2016-10-03 23:56:51 -070043 "BitTube.cpp",
Jiwen 'Steve' Caia2a27b22018-02-07 17:29:56 -080044 "BufferHubConsumer.cpp",
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080045 "BufferHubProducer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070046 "BufferItemConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070047 "ConsumerBase.cpp",
48 "CpuConsumer.cpp",
Ady Abrahama3b08ef2019-07-15 18:43:10 -070049 "DebugEGLImageTracker.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070050 "DisplayEventReceiver.cpp",
51 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070052 "GuiConfig.cpp",
53 "IDisplayEventConnection.cpp",
Dan Stoza84ab9372018-12-17 15:27:57 -080054 "IRegionSamplingListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070055 "ISurfaceComposer.cpp",
56 "ISurfaceComposerClient.cpp",
Marissa Wall7a9b6ff2018-08-21 17:26:20 -070057 "ITransactionCompletedListener.cpp",
Kalle Raitaa099a242017-01-11 11:17:29 -080058 "LayerDebugInfo.cpp",
Evan Rosky1f6d6d52018-12-06 10:47:26 -080059 "LayerMetadata.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070060 "LayerState.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070061 "StreamSplitter.cpp",
62 "Surface.cpp",
63 "SurfaceControl.cpp",
64 "SurfaceComposerClient.cpp",
65 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -080066 "view/Surface.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070067 ],
68
69 shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080070 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070071 "libbufferhub",
Lloyd Pique3b745782018-08-31 17:34:40 -070072 "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
Pawin Vongmasae672cd02019-02-14 16:01:29 -080073 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080074 "libpdx_default_transport",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070075 ],
76
Jiyong Parka75d3d62018-04-09 12:16:30 +090077 // bufferhub is not used when building libgui for vendors
78 target: {
79 vendor: {
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080080 cflags: [
81 "-DNO_BUFFERHUB",
82 "-DNO_INPUT",
83 ],
Jiyong Parka75d3d62018-04-09 12:16:30 +090084 exclude_srcs: [
85 "BufferHubConsumer.cpp",
86 "BufferHubProducer.cpp",
87 ],
88 exclude_shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080089 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070090 "libbufferhub",
Jiyong Parka75d3d62018-04-09 12:16:30 +090091 "libbufferhubqueue",
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080092 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080093 "libpdx_default_transport",
Jiyong Parka75d3d62018-04-09 12:16:30 +090094 ],
95 },
96 },
97
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070098 header_libs: [
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080099 "libdvr_headers",
Jiyong Parka75d3d62018-04-09 12:16:30 +0900100 "libpdx_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -0700101 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700102}
103
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700104// Used by media codec services exclusively as a static lib for
Chong Zhangdbfaf4d2019-05-03 10:33:18 -0700105// core bufferqueue support only.
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700106cc_library_static {
107 name: "libgui_bufferqueue_static",
108 vendor_available: true,
109
Chong Zhangdbfaf4d2019-05-03 10:33:18 -0700110 cflags: [
111 "-DNO_BUFFERHUB",
112 ],
113
114 defaults: ["libgui_bufferqueue-defaults"],
115}
116
117// Common build config shared by libgui and libgui_bufferqueue_static.
118cc_defaults {
119 name: "libgui_bufferqueue-defaults",
120
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700121 clang: true,
122 cflags: [
123 "-Wall",
124 "-Werror",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700125 ],
126
127 cppflags: [
128 "-Wextra",
129 "-DDEBUG_ONLY_CODE=0",
130 ],
131
132 product_variables: {
133 eng: {
134 cppflags: [
135 "-UDEBUG_ONLY_CODE",
136 "-DDEBUG_ONLY_CODE=1",
137 ],
138 },
139 },
140
141 srcs: [
142 "BufferItem.cpp",
143 "BufferQueue.cpp",
144 "BufferQueueConsumer.cpp",
145 "BufferQueueCore.cpp",
146 "BufferQueueProducer.cpp",
147 "BufferQueueThreadState.cpp",
148 "BufferSlot.cpp",
149 "FrameTimestamps.cpp",
150 "GLConsumerUtils.cpp",
151 "HdrMetadata.cpp",
152 "IConsumerListener.cpp",
153 "IGraphicBufferConsumer.cpp",
154 "IGraphicBufferProducer.cpp",
155 "IProducerListener.cpp",
156 "OccupancyTracker.cpp",
157 "bufferqueue/1.0/B2HProducerListener.cpp",
158 "bufferqueue/1.0/Conversion.cpp",
159 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
160 "bufferqueue/1.0/H2BProducerListener.cpp",
161 "bufferqueue/1.0/WProducerListener.cpp",
162 "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
163 "bufferqueue/2.0/B2HProducerListener.cpp",
164 "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
165 "bufferqueue/2.0/H2BProducerListener.cpp",
166 "bufferqueue/2.0/types.cpp",
167 ],
168
David Stevens7347f0b2020-01-15 20:19:22 +0900169 whole_static_libs: [
170 "LibGuiProperties",
171 ],
172
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700173 shared_libs: [
174 "android.hardware.graphics.bufferqueue@1.0",
175 "android.hardware.graphics.bufferqueue@2.0",
176 "android.hardware.graphics.common@1.1",
177 "android.hardware.graphics.common@1.2",
178 "android.hidl.token@1.0-utils",
179 "libbase",
180 "libbinder",
181 "libcutils",
182 "libEGL",
183 "libGLESv2",
184 "libhidlbase",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700185 "liblog",
186 "libnativewindow",
187 "libsync",
188 "libui",
189 "libutils",
190 "libvndksupport",
191 ],
192
193 header_libs: [
194 "libgui_headers",
195 "libnativebase_headers",
196 ],
197
198 export_shared_lib_headers: [
199 "libbinder",
200 "libEGL",
201 "libnativewindow",
202 "libui",
203 "android.hardware.graphics.bufferqueue@1.0",
204 "android.hardware.graphics.bufferqueue@2.0",
205 "android.hardware.graphics.common@1.1",
206 "android.hardware.graphics.common@1.2",
207 "android.hidl.token@1.0-utils",
208 ],
209
210 export_header_lib_headers: [
211 "libgui_headers",
212 ],
213
214 export_include_dirs: [
215 "include",
216 ],
217}
218
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700219subdirs = ["tests"]