blob: 769d23099515a86e27c657fc1dcfca7aedac2270 [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 ],
Jooyung Hana395c8d2020-04-16 18:48:32 +090030 min_sdk_version: "29",
Jiyong Park172bd722017-06-21 12:14:18 +090031}
Dan Willemsen3106c1c2016-10-03 23:56:51 -070032
33cc_library_shared {
34 name: "libgui",
Jiyong Park99c514e2017-11-17 19:09:31 +090035 vendor_available: false,
Justin Yun71d6c8852017-07-24 15:19:45 +090036 vndk: {
37 enabled: true,
38 },
Jiyong Parka75d3d62018-04-09 12:16:30 +090039 double_loadable: true,
Dan Willemsen3106c1c2016-10-03 23:56:51 -070040
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070041 defaults: ["libgui_bufferqueue-defaults"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070042
43 srcs: [
Dan Willemsen3106c1c2016-10-03 23:56:51 -070044 "BitTube.cpp",
Jiwen 'Steve' Caia2a27b22018-02-07 17:29:56 -080045 "BufferHubConsumer.cpp",
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080046 "BufferHubProducer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070047 "BufferItemConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070048 "ConsumerBase.cpp",
49 "CpuConsumer.cpp",
Ady Abrahama3b08ef2019-07-15 18:43:10 -070050 "DebugEGLImageTracker.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070051 "DisplayEventReceiver.cpp",
52 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070053 "GuiConfig.cpp",
54 "IDisplayEventConnection.cpp",
Dan Stoza84ab9372018-12-17 15:27:57 -080055 "IRegionSamplingListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070056 "ISurfaceComposer.cpp",
57 "ISurfaceComposerClient.cpp",
Marissa Wall7a9b6ff2018-08-21 17:26:20 -070058 "ITransactionCompletedListener.cpp",
Kalle Raitaa099a242017-01-11 11:17:29 -080059 "LayerDebugInfo.cpp",
Evan Rosky1f6d6d52018-12-06 10:47:26 -080060 "LayerMetadata.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070061 "LayerState.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070062 "StreamSplitter.cpp",
63 "Surface.cpp",
64 "SurfaceControl.cpp",
65 "SurfaceComposerClient.cpp",
66 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -080067 "view/Surface.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070068 ],
69
70 shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080071 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070072 "libbufferhub",
Lloyd Pique3b745782018-08-31 17:34:40 -070073 "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
Pawin Vongmasae672cd02019-02-14 16:01:29 -080074 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080075 "libpdx_default_transport",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070076 ],
77
Jiyong Parka75d3d62018-04-09 12:16:30 +090078 // bufferhub is not used when building libgui for vendors
79 target: {
80 vendor: {
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080081 cflags: [
82 "-DNO_BUFFERHUB",
83 "-DNO_INPUT",
84 ],
Jiyong Parka75d3d62018-04-09 12:16:30 +090085 exclude_srcs: [
86 "BufferHubConsumer.cpp",
87 "BufferHubProducer.cpp",
88 ],
89 exclude_shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080090 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070091 "libbufferhub",
Jiyong Parka75d3d62018-04-09 12:16:30 +090092 "libbufferhubqueue",
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080093 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080094 "libpdx_default_transport",
Jiyong Parka75d3d62018-04-09 12:16:30 +090095 ],
96 },
97 },
98
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070099 header_libs: [
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -0800100 "libdvr_headers",
Jiyong Parka75d3d62018-04-09 12:16:30 +0900101 "libpdx_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -0700102 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700103}
104
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700105// Used by media codec services exclusively as a static lib for
Chong Zhangdbfaf4d2019-05-03 10:33:18 -0700106// core bufferqueue support only.
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700107cc_library_static {
108 name: "libgui_bufferqueue_static",
109 vendor_available: true,
110
Chong Zhangdbfaf4d2019-05-03 10:33:18 -0700111 cflags: [
112 "-DNO_BUFFERHUB",
113 ],
114
115 defaults: ["libgui_bufferqueue-defaults"],
116}
117
118// Common build config shared by libgui and libgui_bufferqueue_static.
119cc_defaults {
120 name: "libgui_bufferqueue-defaults",
121
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700122 clang: true,
123 cflags: [
124 "-Wall",
125 "-Werror",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700126 ],
127
128 cppflags: [
129 "-Wextra",
130 "-DDEBUG_ONLY_CODE=0",
131 ],
132
133 product_variables: {
134 eng: {
135 cppflags: [
136 "-UDEBUG_ONLY_CODE",
137 "-DDEBUG_ONLY_CODE=1",
138 ],
139 },
140 },
141
142 srcs: [
143 "BufferItem.cpp",
144 "BufferQueue.cpp",
145 "BufferQueueConsumer.cpp",
146 "BufferQueueCore.cpp",
147 "BufferQueueProducer.cpp",
148 "BufferQueueThreadState.cpp",
149 "BufferSlot.cpp",
150 "FrameTimestamps.cpp",
151 "GLConsumerUtils.cpp",
152 "HdrMetadata.cpp",
153 "IConsumerListener.cpp",
154 "IGraphicBufferConsumer.cpp",
155 "IGraphicBufferProducer.cpp",
156 "IProducerListener.cpp",
157 "OccupancyTracker.cpp",
158 "bufferqueue/1.0/B2HProducerListener.cpp",
159 "bufferqueue/1.0/Conversion.cpp",
160 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
161 "bufferqueue/1.0/H2BProducerListener.cpp",
162 "bufferqueue/1.0/WProducerListener.cpp",
163 "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
164 "bufferqueue/2.0/B2HProducerListener.cpp",
165 "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
166 "bufferqueue/2.0/H2BProducerListener.cpp",
167 "bufferqueue/2.0/types.cpp",
168 ],
169
David Stevens7347f0b2020-01-15 20:19:22 +0900170 whole_static_libs: [
171 "LibGuiProperties",
172 ],
173
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700174 shared_libs: [
175 "android.hardware.graphics.bufferqueue@1.0",
176 "android.hardware.graphics.bufferqueue@2.0",
177 "android.hardware.graphics.common@1.1",
178 "android.hardware.graphics.common@1.2",
179 "android.hidl.token@1.0-utils",
180 "libbase",
181 "libbinder",
182 "libcutils",
183 "libEGL",
184 "libGLESv2",
185 "libhidlbase",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700186 "liblog",
187 "libnativewindow",
188 "libsync",
189 "libui",
190 "libutils",
191 "libvndksupport",
192 ],
193
Steven Moreland39d887d2020-01-31 14:56:45 -0800194 static_libs: [
195 "libbinderthreadstateutils",
196 ],
197
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700198 header_libs: [
199 "libgui_headers",
200 "libnativebase_headers",
201 ],
202
203 export_shared_lib_headers: [
204 "libbinder",
205 "libEGL",
206 "libnativewindow",
207 "libui",
208 "android.hardware.graphics.bufferqueue@1.0",
209 "android.hardware.graphics.bufferqueue@2.0",
210 "android.hardware.graphics.common@1.1",
211 "android.hardware.graphics.common@1.2",
212 "android.hidl.token@1.0-utils",
213 ],
214
215 export_header_lib_headers: [
216 "libgui_headers",
217 ],
218
219 export_include_dirs: [
220 "include",
221 ],
222}
223
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700224subdirs = ["tests"]