blob: e3e63ee54e044b2f7796ce6058000a949dc76a94 [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"],
18}
Dan Willemsen3106c1c2016-10-03 23:56:51 -070019
20cc_library_shared {
21 name: "libgui",
Jiyong Park99c514e2017-11-17 19:09:31 +090022 vendor_available: false,
Justin Yun71d6c8852017-07-24 15:19:45 +090023 vndk: {
24 enabled: true,
25 },
Jiyong Parka75d3d62018-04-09 12:16:30 +090026 double_loadable: true,
Dan Willemsen3106c1c2016-10-03 23:56:51 -070027
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070028 defaults: ["libgui_bufferqueue-defaults"],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070029
30 srcs: [
Dan Willemsen3106c1c2016-10-03 23:56:51 -070031 "BitTube.cpp",
Jiwen 'Steve' Caia2a27b22018-02-07 17:29:56 -080032 "BufferHubConsumer.cpp",
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080033 "BufferHubProducer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070034 "BufferItemConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070035 "ConsumerBase.cpp",
36 "CpuConsumer.cpp",
Ady Abrahama3b08ef2019-07-15 18:43:10 -070037 "DebugEGLImageTracker.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070038 "DisplayEventReceiver.cpp",
39 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070040 "GuiConfig.cpp",
41 "IDisplayEventConnection.cpp",
Dan Stoza84ab9372018-12-17 15:27:57 -080042 "IRegionSamplingListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070043 "ISurfaceComposer.cpp",
44 "ISurfaceComposerClient.cpp",
Marissa Wall7a9b6ff2018-08-21 17:26:20 -070045 "ITransactionCompletedListener.cpp",
Kalle Raitaa099a242017-01-11 11:17:29 -080046 "LayerDebugInfo.cpp",
Evan Rosky1f6d6d52018-12-06 10:47:26 -080047 "LayerMetadata.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070048 "LayerState.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070049 "StreamSplitter.cpp",
50 "Surface.cpp",
51 "SurfaceControl.cpp",
52 "SurfaceComposerClient.cpp",
53 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -080054 "view/Surface.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070055 ],
56
57 shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080058 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070059 "libbufferhub",
Lloyd Pique3b745782018-08-31 17:34:40 -070060 "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
Pawin Vongmasae672cd02019-02-14 16:01:29 -080061 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080062 "libpdx_default_transport",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070063 ],
64
Jiyong Parka75d3d62018-04-09 12:16:30 +090065 // bufferhub is not used when building libgui for vendors
66 target: {
67 vendor: {
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080068 cflags: [
69 "-DNO_BUFFERHUB",
70 "-DNO_INPUT",
71 ],
Jiyong Parka75d3d62018-04-09 12:16:30 +090072 exclude_srcs: [
73 "BufferHubConsumer.cpp",
74 "BufferHubProducer.cpp",
75 ],
76 exclude_shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080077 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070078 "libbufferhub",
Jiyong Parka75d3d62018-04-09 12:16:30 +090079 "libbufferhubqueue",
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080080 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080081 "libpdx_default_transport",
Jiyong Parka75d3d62018-04-09 12:16:30 +090082 ],
83 },
84 },
85
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070086 header_libs: [
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080087 "libdvr_headers",
Jiyong Parka75d3d62018-04-09 12:16:30 +090088 "libpdx_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070089 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070090}
91
Chong Zhang60fa4fd2019-04-19 10:00:27 -070092// Used by media codec services exclusively as a static lib for
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070093// core bufferqueue support only.
Chong Zhang60fa4fd2019-04-19 10:00:27 -070094cc_library_static {
95 name: "libgui_bufferqueue_static",
96 vendor_available: true,
97
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070098 cflags: [
99 "-DNO_BUFFERHUB",
100 ],
101
102 defaults: ["libgui_bufferqueue-defaults"],
103}
104
105// Common build config shared by libgui and libgui_bufferqueue_static.
106cc_defaults {
107 name: "libgui_bufferqueue-defaults",
108
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700109 clang: true,
110 cflags: [
111 "-Wall",
112 "-Werror",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700113 ],
114
115 cppflags: [
116 "-Wextra",
117 "-DDEBUG_ONLY_CODE=0",
118 ],
119
120 product_variables: {
121 eng: {
122 cppflags: [
123 "-UDEBUG_ONLY_CODE",
124 "-DDEBUG_ONLY_CODE=1",
125 ],
126 },
127 },
128
129 srcs: [
130 "BufferItem.cpp",
131 "BufferQueue.cpp",
132 "BufferQueueConsumer.cpp",
133 "BufferQueueCore.cpp",
134 "BufferQueueProducer.cpp",
135 "BufferQueueThreadState.cpp",
136 "BufferSlot.cpp",
137 "FrameTimestamps.cpp",
138 "GLConsumerUtils.cpp",
139 "HdrMetadata.cpp",
140 "IConsumerListener.cpp",
141 "IGraphicBufferConsumer.cpp",
142 "IGraphicBufferProducer.cpp",
143 "IProducerListener.cpp",
144 "OccupancyTracker.cpp",
145 "bufferqueue/1.0/B2HProducerListener.cpp",
146 "bufferqueue/1.0/Conversion.cpp",
147 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
148 "bufferqueue/1.0/H2BProducerListener.cpp",
149 "bufferqueue/1.0/WProducerListener.cpp",
150 "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
151 "bufferqueue/2.0/B2HProducerListener.cpp",
152 "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
153 "bufferqueue/2.0/H2BProducerListener.cpp",
154 "bufferqueue/2.0/types.cpp",
155 ],
156
157 shared_libs: [
158 "android.hardware.graphics.bufferqueue@1.0",
159 "android.hardware.graphics.bufferqueue@2.0",
160 "android.hardware.graphics.common@1.1",
161 "android.hardware.graphics.common@1.2",
162 "android.hidl.token@1.0-utils",
163 "libbase",
164 "libbinder",
165 "libcutils",
166 "libEGL",
167 "libGLESv2",
168 "libhidlbase",
169 "libhidltransport",
170 "libhwbinder",
171 "liblog",
172 "libnativewindow",
173 "libsync",
174 "libui",
175 "libutils",
176 "libvndksupport",
177 ],
178
179 header_libs: [
180 "libgui_headers",
181 "libnativebase_headers",
182 ],
183
184 export_shared_lib_headers: [
185 "libbinder",
186 "libEGL",
187 "libnativewindow",
188 "libui",
189 "android.hardware.graphics.bufferqueue@1.0",
190 "android.hardware.graphics.bufferqueue@2.0",
191 "android.hardware.graphics.common@1.1",
192 "android.hardware.graphics.common@1.2",
193 "android.hidl.token@1.0-utils",
194 ],
195
196 export_header_lib_headers: [
197 "libgui_headers",
198 ],
199
200 export_include_dirs: [
201 "include",
202 ],
203}
204
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700205subdirs = ["tests"]