Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 1 | // 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 Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 14 | cc_library_headers { |
| 15 | name: "libgui_headers", |
| 16 | vendor_available: true, |
| 17 | export_include_dirs: ["include"], |
| 18 | } |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 19 | |
| 20 | cc_library_shared { |
| 21 | name: "libgui", |
Jiyong Park | 99c514e | 2017-11-17 19:09:31 +0900 | [diff] [blame] | 22 | vendor_available: false, |
Justin Yun | 71d6c885 | 2017-07-24 15:19:45 +0900 | [diff] [blame] | 23 | vndk: { |
| 24 | enabled: true, |
| 25 | }, |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 26 | double_loadable: true, |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 27 | |
| 28 | clang: true, |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 29 | cflags: [ |
| 30 | "-Wall", |
| 31 | "-Werror", |
| 32 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 33 | cppflags: [ |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 34 | "-Wextra", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 35 | "-DDEBUG_ONLY_CODE=0", |
| 36 | ], |
| 37 | |
| 38 | product_variables: { |
Fabien Sanglard | 98bfd4f | 2017-06-22 11:13:49 -0700 | [diff] [blame] | 39 | eng: { |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 40 | cppflags: [ |
| 41 | "-UDEBUG_ONLY_CODE", |
| 42 | "-DDEBUG_ONLY_CODE=1", |
| 43 | ], |
| 44 | }, |
| 45 | }, |
| 46 | |
| 47 | srcs: [ |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 48 | "BitTube.cpp", |
Jiwen 'Steve' Cai | a2a27b2 | 2018-02-07 17:29:56 -0800 | [diff] [blame] | 49 | "BufferHubConsumer.cpp", |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 50 | "BufferHubProducer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 51 | "BufferItem.cpp", |
| 52 | "BufferItemConsumer.cpp", |
| 53 | "BufferQueue.cpp", |
| 54 | "BufferQueueConsumer.cpp", |
| 55 | "BufferQueueCore.cpp", |
| 56 | "BufferQueueProducer.cpp", |
Jayant Chowdhary | ad9fe27 | 2019-03-07 22:36:06 -0800 | [diff] [blame] | 57 | "BufferQueueThreadState.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 58 | "BufferSlot.cpp", |
| 59 | "ConsumerBase.cpp", |
| 60 | "CpuConsumer.cpp", |
| 61 | "DisplayEventReceiver.cpp", |
Brian Anderson | d6927fb | 2016-07-23 23:37:30 -0700 | [diff] [blame] | 62 | "FrameTimestamps.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 63 | "GLConsumer.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame^] | 64 | "GLConsumerUtils.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 65 | "GuiConfig.cpp", |
Courtney Goeltzenleuchter | 9bad0d7 | 2017-12-19 12:34:34 -0700 | [diff] [blame] | 66 | "HdrMetadata.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 67 | "IDisplayEventConnection.cpp", |
Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 68 | "IConsumerListener.cpp", |
Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 69 | "IGraphicBufferConsumer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 70 | "IGraphicBufferProducer.cpp", |
| 71 | "IProducerListener.cpp", |
Dan Stoza | 84ab937 | 2018-12-17 15:27:57 -0800 | [diff] [blame] | 72 | "IRegionSamplingListener.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 73 | "ISurfaceComposer.cpp", |
| 74 | "ISurfaceComposerClient.cpp", |
Marissa Wall | 7a9b6ff | 2018-08-21 17:26:20 -0700 | [diff] [blame] | 75 | "ITransactionCompletedListener.cpp", |
Kalle Raita | a099a24 | 2017-01-11 11:17:29 -0800 | [diff] [blame] | 76 | "LayerDebugInfo.cpp", |
Evan Rosky | 1f6d6d5 | 2018-12-06 10:47:26 -0800 | [diff] [blame] | 77 | "LayerMetadata.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 78 | "LayerState.cpp", |
| 79 | "OccupancyTracker.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 80 | "StreamSplitter.cpp", |
| 81 | "Surface.cpp", |
| 82 | "SurfaceControl.cpp", |
| 83 | "SurfaceComposerClient.cpp", |
| 84 | "SyncFeatures.cpp", |
Mathias Agopian | 05debe1 | 2017-02-08 17:04:18 -0800 | [diff] [blame] | 85 | "view/Surface.cpp", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 86 | "bufferqueue/1.0/B2HProducerListener.cpp", |
Chong Zhang | 20288fd | 2019-03-21 15:15:27 -0700 | [diff] [blame] | 87 | "bufferqueue/1.0/Conversion.cpp", |
Lloyd Pique | 3b74578 | 2018-08-31 17:34:40 -0700 | [diff] [blame] | 88 | "bufferqueue/1.0/H2BGraphicBufferProducer.cpp", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 89 | "bufferqueue/1.0/H2BProducerListener.cpp", |
Chong Zhang | 20288fd | 2019-03-21 15:15:27 -0700 | [diff] [blame] | 90 | "bufferqueue/1.0/WProducerListener.cpp", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 91 | "bufferqueue/2.0/B2HGraphicBufferProducer.cpp", |
| 92 | "bufferqueue/2.0/B2HProducerListener.cpp", |
| 93 | "bufferqueue/2.0/H2BGraphicBufferProducer.cpp", |
| 94 | "bufferqueue/2.0/H2BProducerListener.cpp", |
| 95 | "bufferqueue/2.0/types.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 96 | ], |
| 97 | |
| 98 | shared_libs: [ |
Fan Xu | 021776e | 2018-12-05 13:34:48 -0800 | [diff] [blame] | 99 | "android.frameworks.bufferhub@1.0", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 100 | "android.hardware.graphics.bufferqueue@1.0", |
| 101 | "android.hardware.graphics.bufferqueue@2.0", |
Peiyong Lin | a52f029 | 2018-03-14 17:26:31 -0700 | [diff] [blame] | 102 | "android.hardware.graphics.common@1.1", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 103 | "android.hardware.graphics.common@1.2", |
| 104 | "android.hidl.token@1.0-utils", |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 105 | "libbase", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 106 | "libbinder", |
Jiwen 'Steve' Cai | 57ae3ee | 2018-05-03 17:51:52 -0700 | [diff] [blame] | 107 | "libbufferhub", |
Lloyd Pique | 3b74578 | 2018-08-31 17:34:40 -0700 | [diff] [blame] | 108 | "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui. |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 109 | "libcutils", |
| 110 | "libEGL", |
| 111 | "libGLESv2", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 112 | "libhidlbase", |
Courtney Goeltzenleuchter | a0c93e1 | 2017-03-17 16:16:48 -0600 | [diff] [blame] | 113 | "libhidltransport", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 114 | "libhwbinder", |
| 115 | "libinput", |
| 116 | "liblog", |
| 117 | "libnativewindow", |
| 118 | "libpdx_default_transport", |
| 119 | "libsync", |
| 120 | "libui", |
| 121 | "libutils", |
Jayant Chowdhary | ad9fe27 | 2019-03-07 22:36:06 -0800 | [diff] [blame] | 122 | "libvndksupport", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 123 | ], |
| 124 | |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 125 | // bufferhub is not used when building libgui for vendors |
| 126 | target: { |
| 127 | vendor: { |
Jayant Chowdhary | ad9fe27 | 2019-03-07 22:36:06 -0800 | [diff] [blame] | 128 | cflags: [ |
| 129 | "-DNO_BUFFERHUB", |
| 130 | "-DNO_INPUT", |
| 131 | ], |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 132 | exclude_srcs: [ |
| 133 | "BufferHubConsumer.cpp", |
| 134 | "BufferHubProducer.cpp", |
| 135 | ], |
| 136 | exclude_shared_libs: [ |
Fan Xu | 021776e | 2018-12-05 13:34:48 -0800 | [diff] [blame] | 137 | "android.frameworks.bufferhub@1.0", |
Jiwen 'Steve' Cai | 57ae3ee | 2018-05-03 17:51:52 -0700 | [diff] [blame] | 138 | "libbufferhub", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 139 | "libbufferhubqueue", |
Jayant Chowdhary | ad9fe27 | 2019-03-07 22:36:06 -0800 | [diff] [blame] | 140 | "libinput", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 141 | "libpdx_default_transport", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 142 | ], |
| 143 | }, |
| 144 | }, |
| 145 | |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 146 | header_libs: [ |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 147 | "libdvr_headers", |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 148 | "libgui_headers", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 149 | "libnativebase_headers", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 150 | "libpdx_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 151 | ], |
| 152 | |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 153 | export_shared_lib_headers: [ |
| 154 | "libbinder", |
Steven Moreland | 33f6484 | 2017-06-22 17:50:49 -0700 | [diff] [blame] | 155 | "libEGL", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 156 | "libnativewindow", |
Steven Moreland | 33f6484 | 2017-06-22 17:50:49 -0700 | [diff] [blame] | 157 | "libui", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 158 | "android.hardware.graphics.bufferqueue@1.0", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 159 | "android.hardware.graphics.bufferqueue@2.0", |
Peiyong Lin | a52f029 | 2018-03-14 17:26:31 -0700 | [diff] [blame] | 160 | "android.hardware.graphics.common@1.1", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 161 | "android.hardware.graphics.common@1.2", |
| 162 | "android.hidl.token@1.0-utils", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 163 | ], |
Dan Stoza | 1e438d2 | 2017-03-31 16:18:10 -0700 | [diff] [blame] | 164 | |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 165 | export_header_lib_headers: [ |
| 166 | "libgui_headers", |
| 167 | ], |
| 168 | |
Dan Stoza | 1e438d2 | 2017-03-31 16:18:10 -0700 | [diff] [blame] | 169 | export_include_dirs: [ |
| 170 | "include", |
| 171 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 172 | } |
| 173 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame^] | 174 | // Used by media codec services exclusively as a static lib for |
| 175 | // core bufferqueuesupport only. |
| 176 | cc_library_static { |
| 177 | name: "libgui_bufferqueue_static", |
| 178 | vendor_available: true, |
| 179 | |
| 180 | clang: true, |
| 181 | cflags: [ |
| 182 | "-Wall", |
| 183 | "-Werror", |
| 184 | "-DNO_BUFFERHUB", |
| 185 | ], |
| 186 | |
| 187 | cppflags: [ |
| 188 | "-Wextra", |
| 189 | "-DDEBUG_ONLY_CODE=0", |
| 190 | ], |
| 191 | |
| 192 | product_variables: { |
| 193 | eng: { |
| 194 | cppflags: [ |
| 195 | "-UDEBUG_ONLY_CODE", |
| 196 | "-DDEBUG_ONLY_CODE=1", |
| 197 | ], |
| 198 | }, |
| 199 | }, |
| 200 | |
| 201 | srcs: [ |
| 202 | "BufferItem.cpp", |
| 203 | "BufferQueue.cpp", |
| 204 | "BufferQueueConsumer.cpp", |
| 205 | "BufferQueueCore.cpp", |
| 206 | "BufferQueueProducer.cpp", |
| 207 | "BufferQueueThreadState.cpp", |
| 208 | "BufferSlot.cpp", |
| 209 | "FrameTimestamps.cpp", |
| 210 | "GLConsumerUtils.cpp", |
| 211 | "HdrMetadata.cpp", |
| 212 | "IConsumerListener.cpp", |
| 213 | "IGraphicBufferConsumer.cpp", |
| 214 | "IGraphicBufferProducer.cpp", |
| 215 | "IProducerListener.cpp", |
| 216 | "OccupancyTracker.cpp", |
| 217 | "bufferqueue/1.0/B2HProducerListener.cpp", |
| 218 | "bufferqueue/1.0/Conversion.cpp", |
| 219 | "bufferqueue/1.0/H2BGraphicBufferProducer.cpp", |
| 220 | "bufferqueue/1.0/H2BProducerListener.cpp", |
| 221 | "bufferqueue/1.0/WProducerListener.cpp", |
| 222 | "bufferqueue/2.0/B2HGraphicBufferProducer.cpp", |
| 223 | "bufferqueue/2.0/B2HProducerListener.cpp", |
| 224 | "bufferqueue/2.0/H2BGraphicBufferProducer.cpp", |
| 225 | "bufferqueue/2.0/H2BProducerListener.cpp", |
| 226 | "bufferqueue/2.0/types.cpp", |
| 227 | ], |
| 228 | |
| 229 | shared_libs: [ |
| 230 | "android.hardware.graphics.bufferqueue@1.0", |
| 231 | "android.hardware.graphics.bufferqueue@2.0", |
| 232 | "android.hardware.graphics.common@1.1", |
| 233 | "android.hardware.graphics.common@1.2", |
| 234 | "android.hidl.token@1.0-utils", |
| 235 | "libbase", |
| 236 | "libbinder", |
| 237 | "libcutils", |
| 238 | "libEGL", |
| 239 | "libGLESv2", |
| 240 | "libhidlbase", |
| 241 | "libhidltransport", |
| 242 | "libhwbinder", |
| 243 | "liblog", |
| 244 | "libnativewindow", |
| 245 | "libsync", |
| 246 | "libui", |
| 247 | "libutils", |
| 248 | "libvndksupport", |
| 249 | ], |
| 250 | |
| 251 | header_libs: [ |
| 252 | "libgui_headers", |
| 253 | "libnativebase_headers", |
| 254 | ], |
| 255 | |
| 256 | export_shared_lib_headers: [ |
| 257 | "libbinder", |
| 258 | "libEGL", |
| 259 | "libnativewindow", |
| 260 | "libui", |
| 261 | "android.hardware.graphics.bufferqueue@1.0", |
| 262 | "android.hardware.graphics.bufferqueue@2.0", |
| 263 | "android.hardware.graphics.common@1.1", |
| 264 | "android.hardware.graphics.common@1.2", |
| 265 | "android.hidl.token@1.0-utils", |
| 266 | ], |
| 267 | |
| 268 | export_header_lib_headers: [ |
| 269 | "libgui_headers", |
| 270 | ], |
| 271 | |
| 272 | export_include_dirs: [ |
| 273 | "include", |
| 274 | ], |
| 275 | } |
| 276 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 277 | subdirs = ["tests"] |