blob: 34575f5d475b7edd1b5d255a8d6d4dc836fec48a [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",
37 "DisplayEventReceiver.cpp",
38 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070039 "GuiConfig.cpp",
40 "IDisplayEventConnection.cpp",
Dan Stoza84ab9372018-12-17 15:27:57 -080041 "IRegionSamplingListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070042 "ISurfaceComposer.cpp",
43 "ISurfaceComposerClient.cpp",
Marissa Wall7a9b6ff2018-08-21 17:26:20 -070044 "ITransactionCompletedListener.cpp",
Kalle Raitaa099a242017-01-11 11:17:29 -080045 "LayerDebugInfo.cpp",
Evan Rosky1f6d6d52018-12-06 10:47:26 -080046 "LayerMetadata.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070047 "LayerState.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070048 "StreamSplitter.cpp",
49 "Surface.cpp",
50 "SurfaceControl.cpp",
51 "SurfaceComposerClient.cpp",
52 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -080053 "view/Surface.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070054 ],
55
56 shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080057 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070058 "libbufferhub",
Lloyd Pique3b745782018-08-31 17:34:40 -070059 "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
Pawin Vongmasae672cd02019-02-14 16:01:29 -080060 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080061 "libpdx_default_transport",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070062 ],
63
Jiyong Parka75d3d62018-04-09 12:16:30 +090064 // bufferhub is not used when building libgui for vendors
65 target: {
66 vendor: {
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080067 cflags: [
68 "-DNO_BUFFERHUB",
69 "-DNO_INPUT",
70 ],
Jiyong Parka75d3d62018-04-09 12:16:30 +090071 exclude_srcs: [
72 "BufferHubConsumer.cpp",
73 "BufferHubProducer.cpp",
74 ],
75 exclude_shared_libs: [
Fan Xu021776e2018-12-05 13:34:48 -080076 "android.frameworks.bufferhub@1.0",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -070077 "libbufferhub",
Jiyong Parka75d3d62018-04-09 12:16:30 +090078 "libbufferhubqueue",
Jayant Chowdharyad9fe272019-03-07 22:36:06 -080079 "libinput",
Pawin Vongmasae672cd02019-02-14 16:01:29 -080080 "libpdx_default_transport",
Jiyong Parka75d3d62018-04-09 12:16:30 +090081 ],
82 },
83 },
84
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070085 header_libs: [
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080086 "libdvr_headers",
Jiyong Parka75d3d62018-04-09 12:16:30 +090087 "libpdx_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -070088 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070089}
90
Chong Zhang60fa4fd2019-04-19 10:00:27 -070091// Used by media codec services exclusively as a static lib for
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070092// core bufferqueue support only.
Chong Zhang60fa4fd2019-04-19 10:00:27 -070093cc_library_static {
94 name: "libgui_bufferqueue_static",
95 vendor_available: true,
96
Chong Zhangdbfaf4d2019-05-03 10:33:18 -070097 cflags: [
98 "-DNO_BUFFERHUB",
99 ],
100
101 defaults: ["libgui_bufferqueue-defaults"],
102}
103
104// Common build config shared by libgui and libgui_bufferqueue_static.
105cc_defaults {
106 name: "libgui_bufferqueue-defaults",
107
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700108 clang: true,
109 cflags: [
110 "-Wall",
111 "-Werror",
Chong Zhang60fa4fd2019-04-19 10:00:27 -0700112 ],
113
114 cppflags: [
115 "-Wextra",
116 "-DDEBUG_ONLY_CODE=0",
117 ],
118
119 product_variables: {
120 eng: {
121 cppflags: [
122 "-UDEBUG_ONLY_CODE",
123 "-DDEBUG_ONLY_CODE=1",
124 ],
125 },
126 },
127
128 srcs: [
129 "BufferItem.cpp",
130 "BufferQueue.cpp",
131 "BufferQueueConsumer.cpp",
132 "BufferQueueCore.cpp",
133 "BufferQueueProducer.cpp",
134 "BufferQueueThreadState.cpp",
135 "BufferSlot.cpp",
136 "FrameTimestamps.cpp",
137 "GLConsumerUtils.cpp",
138 "HdrMetadata.cpp",
139 "IConsumerListener.cpp",
140 "IGraphicBufferConsumer.cpp",
141 "IGraphicBufferProducer.cpp",
142 "IProducerListener.cpp",
143 "OccupancyTracker.cpp",
144 "bufferqueue/1.0/B2HProducerListener.cpp",
145 "bufferqueue/1.0/Conversion.cpp",
146 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp",
147 "bufferqueue/1.0/H2BProducerListener.cpp",
148 "bufferqueue/1.0/WProducerListener.cpp",
149 "bufferqueue/2.0/B2HGraphicBufferProducer.cpp",
150 "bufferqueue/2.0/B2HProducerListener.cpp",
151 "bufferqueue/2.0/H2BGraphicBufferProducer.cpp",
152 "bufferqueue/2.0/H2BProducerListener.cpp",
153 "bufferqueue/2.0/types.cpp",
154 ],
155
156 shared_libs: [
157 "android.hardware.graphics.bufferqueue@1.0",
158 "android.hardware.graphics.bufferqueue@2.0",
159 "android.hardware.graphics.common@1.1",
160 "android.hardware.graphics.common@1.2",
161 "android.hidl.token@1.0-utils",
162 "libbase",
163 "libbinder",
164 "libcutils",
165 "libEGL",
166 "libGLESv2",
167 "libhidlbase",
168 "libhidltransport",
169 "libhwbinder",
170 "liblog",
171 "libnativewindow",
172 "libsync",
173 "libui",
174 "libutils",
175 "libvndksupport",
176 ],
177
178 header_libs: [
179 "libgui_headers",
180 "libnativebase_headers",
181 ],
182
183 export_shared_lib_headers: [
184 "libbinder",
185 "libEGL",
186 "libnativewindow",
187 "libui",
188 "android.hardware.graphics.bufferqueue@1.0",
189 "android.hardware.graphics.bufferqueue@2.0",
190 "android.hardware.graphics.common@1.1",
191 "android.hardware.graphics.common@1.2",
192 "android.hidl.token@1.0-utils",
193 ],
194
195 export_header_lib_headers: [
196 "libgui_headers",
197 ],
198
199 export_include_dirs: [
200 "include",
201 ],
202}
203
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700204subdirs = ["tests"]