blob: b2a7557588d61438729452c08773514f6d93ddd9 [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 Molnar7aa71e72019-04-01 15:34:32 -070018
19 // we must build this module to get the required header as that is generated
20 export_shared_lib_headers: [ "android.hidl.token@1.0-utils" ],
21 shared_libs: [ "android.hidl.token@1.0-utils" ],
Jiyong Park172bd722017-06-21 12:14:18 +090022}
Dan Willemsen3106c1c2016-10-03 23:56:51 -070023
24cc_library_shared {
25 name: "libgui",
Jiyong Park99c514e2017-11-17 19:09:31 +090026 vendor_available: false,
Justin Yun71d6c8852017-07-24 15:19:45 +090027 vndk: {
28 enabled: true,
29 },
Jiyong Parka75d3d62018-04-09 12:16:30 +090030 double_loadable: true,
Dan Willemsen3106c1c2016-10-03 23:56:51 -070031
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070032 defaults: ["libgui_bufferqueue-defaults"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070033
34 srcs: [
Dan Willemsen3106c1c2016-10-03 23:56:51 -070035 "BitTube.cpp",
Jiwen 'Steve' Caia2a27b22018-02-07 17:29:56 -080036 "BufferHubConsumer.cpp",
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080037 "BufferHubProducer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070038 "BufferItemConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070039 "ConsumerBase.cpp",
40 "CpuConsumer.cpp",
41 "DisplayEventReceiver.cpp",
42 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070043 "GuiConfig.cpp",
44 "IDisplayEventConnection.cpp",
Dan Stoza84ab9372018-12-17 15:27:57 -080045 "IRegionSamplingListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070046 "ISurfaceComposer.cpp",
47 "ISurfaceComposerClient.cpp",
Marissa Wall7a9b6ff2018-08-21 17:26:20 -070048 "ITransactionCompletedListener.cpp",
Kalle Raitaa099a242017-01-11 11:17:29 -080049 "LayerDebugInfo.cpp",
Evan Rosky1f6d6d52018-12-06 10:47:26 -080050 "LayerMetadata.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070051 "LayerState.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070052 "StreamSplitter.cpp",
53 "Surface.cpp",
54 "SurfaceControl.cpp",
55 "SurfaceComposerClient.cpp",
56 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -080057 "view/Surface.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070058 ],
59
60 shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080061 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070062 "libbufferhub",
Lloyd Pique3b745782018-08-31 17:34:40 -070063 "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
Pawin Vongmasae672cd02019-02-14 16:01:29 -080064 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080065 "libpdx_default_transport",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070066 ],
67
Jiyong Parka75d3d62018-04-09 12:16:30 +090068 // bufferhub is not used when building libgui for vendors
69 target: {
70 vendor: {
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080071 cflags: [
72 "-DNO_BUFFERHUB",
73 "-DNO_INPUT",
74 ],
Jiyong Parka75d3d62018-04-09 12:16:30 +090075 exclude_srcs: [
76 "BufferHubConsumer.cpp",
77 "BufferHubProducer.cpp",
78 ],
79 exclude_shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080080 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070081 "libbufferhub",
Jiyong Parka75d3d62018-04-09 12:16:30 +090082 "libbufferhubqueue",
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080083 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080084 "libpdx_default_transport",
Jiyong Parka75d3d62018-04-09 12:16:30 +090085 ],
86 },
87 },
88
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070089 header_libs: [
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080090 "libdvr_headers",
Jiyong Parka75d3d62018-04-09 12:16:30 +090091 "libpdx_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070092 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070093}
94
Chong Zhang60fa4fd2019-04-19 10:00:27 -070095// Used by media codec services exclusively as a static lib for
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070096// core bufferqueue support only.
Chong Zhang60fa4fd2019-04-19 10:00:27 -070097cc_library_static {
98 name: "libgui_bufferqueue_static",
99 vendor_available: true,
100
Chong Zhangdbfaf4d2019-05-03 10:33:18 -0700101 cflags: [
102 "-DNO_BUFFERHUB",
103 ],
104
105 defaults: ["libgui_bufferqueue-defaults"],
106}
107
108// Common build config shared by libgui and libgui_bufferqueue_static.
109cc_defaults {
110 name: "libgui_bufferqueue-defaults",
111
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700112 clang: true,
113 cflags: [
114 "-Wall",
115 "-Werror",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700116 ],
117
118 cppflags: [
119 "-Wextra",
120 "-DDEBUG_ONLY_CODE=0",
121 ],
122
123 product_variables: {
124 eng: {
125 cppflags: [
126 "-UDEBUG_ONLY_CODE",
127 "-DDEBUG_ONLY_CODE=1",
128 ],
129 },
130 },
131
132 srcs: [
133 "BufferItem.cpp",
134 "BufferQueue.cpp",
135 "BufferQueueConsumer.cpp",
136 "BufferQueueCore.cpp",
137 "BufferQueueProducer.cpp",
138 "BufferQueueThreadState.cpp",
139 "BufferSlot.cpp",
140 "FrameTimestamps.cpp",
141 "GLConsumerUtils.cpp",
142 "HdrMetadata.cpp",
143 "IConsumerListener.cpp",
144 "IGraphicBufferConsumer.cpp",
145 "IGraphicBufferProducer.cpp",
146 "IProducerListener.cpp",
147 "OccupancyTracker.cpp",
148 "bufferqueue/1.0/B2HProducerListener.cpp",
149 "bufferqueue/1.0/Conversion.cpp",
150 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
151 "bufferqueue/1.0/H2BProducerListener.cpp",
152 "bufferqueue/1.0/WProducerListener.cpp",
153 "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
154 "bufferqueue/2.0/B2HProducerListener.cpp",
155 "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
156 "bufferqueue/2.0/H2BProducerListener.cpp",
157 "bufferqueue/2.0/types.cpp",
158 ],
159
160 shared_libs: [
161 "android.hardware.graphics.bufferqueue@1.0",
162 "android.hardware.graphics.bufferqueue@2.0",
163 "android.hardware.graphics.common@1.1",
164 "android.hardware.graphics.common@1.2",
165 "android.hidl.token@1.0-utils",
166 "libbase",
167 "libbinder",
168 "libcutils",
169 "libEGL",
170 "libGLESv2",
171 "libhidlbase",
172 "libhidltransport",
173 "libhwbinder",
174 "liblog",
175 "libnativewindow",
176 "libsync",
177 "libui",
178 "libutils",
179 "libvndksupport",
180 ],
181
182 header_libs: [
183 "libgui_headers",
184 "libnativebase_headers",
185 ],
186
187 export_shared_lib_headers: [
188 "libbinder",
189 "libEGL",
190 "libnativewindow",
191 "libui",
192 "android.hardware.graphics.bufferqueue@1.0",
193 "android.hardware.graphics.bufferqueue@2.0",
194 "android.hardware.graphics.common@1.1",
195 "android.hardware.graphics.common@1.2",
196 "android.hidl.token@1.0-utils",
197 ],
198
199 export_header_lib_headers: [
200 "libgui_headers",
201 ],
202
203 export_include_dirs: [
204 "include",
205 ],
206}
207
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700208subdirs = ["tests"]