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"], |
Lajos Molnar | 7aa71e7 | 2019-04-01 15:34:32 -0700 | [diff] [blame] | 18 | |
| 19 | // we must build this module to get the required header as that is generated |
Marco Nelissen | cb04dee | 2019-10-28 12:55:47 -0700 | [diff] [blame] | 20 | 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 Han | 7bcb893 | 2020-04-16 18:48:32 +0900 | [diff] [blame] | 30 | min_sdk_version: "29", |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 31 | } |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 32 | |
Pablo Gamito | 6ee484d | 2020-07-30 14:26:28 +0000 | [diff] [blame^] | 33 | filegroup { |
| 34 | name: "libgui_aidl", |
| 35 | srcs: ["aidl/**/*.aidl"], |
| 36 | path: "aidl/", |
| 37 | } |
| 38 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 39 | cc_library_shared { |
| 40 | name: "libgui", |
Jiyong Park | 99c514e | 2017-11-17 19:09:31 +0900 | [diff] [blame] | 41 | vendor_available: false, |
Justin Yun | 71d6c885 | 2017-07-24 15:19:45 +0900 | [diff] [blame] | 42 | vndk: { |
| 43 | enabled: true, |
| 44 | }, |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 45 | double_loadable: true, |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 46 | |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 47 | defaults: ["libgui_bufferqueue-defaults"], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 48 | |
| 49 | srcs: [ |
Daichi Hirono | f474d3d | 2019-11-05 08:54:07 +0900 | [diff] [blame] | 50 | ":framework_native_aidl", |
Pablo Gamito | 6ee484d | 2020-07-30 14:26:28 +0000 | [diff] [blame^] | 51 | ":libgui_aidl", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 52 | ":libgui_bufferqueue_sources", |
| 53 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 54 | "BitTube.cpp", |
Robert Carr | 78c25dd | 2019-08-15 14:10:33 -0700 | [diff] [blame] | 55 | "BLASTBufferQueue.cpp", |
Jiwen 'Steve' Cai | a2a27b2 | 2018-02-07 17:29:56 -0800 | [diff] [blame] | 56 | "BufferHubConsumer.cpp", |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 57 | "BufferHubProducer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 58 | "BufferItemConsumer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 59 | "ConsumerBase.cpp", |
| 60 | "CpuConsumer.cpp", |
Ady Abraham | a3b08ef | 2019-07-15 18:43:10 -0700 | [diff] [blame] | 61 | "DebugEGLImageTracker.cpp", |
Alec Mouri | 77a5387 | 2019-10-28 16:44:36 -0700 | [diff] [blame] | 62 | "DisplayEventDispatcher.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 63 | "DisplayEventReceiver.cpp", |
| 64 | "GLConsumer.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 65 | "IConsumerListener.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 66 | "IDisplayEventConnection.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 67 | "IGraphicBufferConsumer.cpp", |
| 68 | "IGraphicBufferProducer.cpp", |
| 69 | "IProducerListener.cpp", |
Dan Stoza | 84ab937 | 2018-12-17 15:27:57 -0800 | [diff] [blame] | 70 | "IRegionSamplingListener.cpp", |
chaviw | 85bf55a | 2020-08-17 17:54:24 -0700 | [diff] [blame] | 71 | "IScreenCaptureListener.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 72 | "ISurfaceComposer.cpp", |
| 73 | "ISurfaceComposerClient.cpp", |
Marissa Wall | 7a9b6ff | 2018-08-21 17:26:20 -0700 | [diff] [blame] | 74 | "ITransactionCompletedListener.cpp", |
Kalle Raita | a099a24 | 2017-01-11 11:17:29 -0800 | [diff] [blame] | 75 | "LayerDebugInfo.cpp", |
Evan Rosky | 1f6d6d5 | 2018-12-06 10:47:26 -0800 | [diff] [blame] | 76 | "LayerMetadata.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 77 | "LayerState.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 78 | "OccupancyTracker.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 79 | "StreamSplitter.cpp", |
| 80 | "Surface.cpp", |
| 81 | "SurfaceControl.cpp", |
| 82 | "SurfaceComposerClient.cpp", |
| 83 | "SyncFeatures.cpp", |
Pablo Gamito | 6ee484d | 2020-07-30 14:26:28 +0000 | [diff] [blame^] | 84 | "TransactionTracing.cpp", |
Mathias Agopian | 05debe1 | 2017-02-08 17:04:18 -0800 | [diff] [blame] | 85 | "view/Surface.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 86 | "bufferqueue/1.0/B2HProducerListener.cpp", |
| 87 | "bufferqueue/1.0/H2BGraphicBufferProducer.cpp", |
| 88 | "bufferqueue/2.0/B2HProducerListener.cpp", |
| 89 | "bufferqueue/2.0/H2BGraphicBufferProducer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 90 | ], |
| 91 | |
| 92 | shared_libs: [ |
Fan Xu | 021776e | 2018-12-05 13:34:48 -0800 | [diff] [blame] | 93 | "android.frameworks.bufferhub@1.0", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 94 | "libbinder", |
Jiwen 'Steve' Cai | 57ae3ee | 2018-05-03 17:51:52 -0700 | [diff] [blame] | 95 | "libbufferhub", |
Lloyd Pique | 3b74578 | 2018-08-31 17:34:40 -0700 | [diff] [blame] | 96 | "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui. |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 97 | "libinput", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 98 | "libpdx_default_transport", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 99 | ], |
| 100 | |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 101 | export_shared_lib_headers: [ |
| 102 | "libbinder", |
Vishnu Nair | e798b47 | 2020-07-23 13:52:21 -0700 | [diff] [blame] | 103 | "libinput", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 104 | ], |
| 105 | |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 106 | // bufferhub is not used when building libgui for vendors |
| 107 | target: { |
| 108 | vendor: { |
Jayant Chowdhary | ad9fe27 | 2019-03-07 22:36:06 -0800 | [diff] [blame] | 109 | cflags: [ |
| 110 | "-DNO_BUFFERHUB", |
| 111 | "-DNO_INPUT", |
| 112 | ], |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 113 | exclude_srcs: [ |
| 114 | "BufferHubConsumer.cpp", |
| 115 | "BufferHubProducer.cpp", |
| 116 | ], |
| 117 | exclude_shared_libs: [ |
Fan Xu | 021776e | 2018-12-05 13:34:48 -0800 | [diff] [blame] | 118 | "android.frameworks.bufferhub@1.0", |
Jiwen 'Steve' Cai | 57ae3ee | 2018-05-03 17:51:52 -0700 | [diff] [blame] | 119 | "libbufferhub", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 120 | "libbufferhubqueue", |
Jayant Chowdhary | ad9fe27 | 2019-03-07 22:36:06 -0800 | [diff] [blame] | 121 | "libinput", |
Pawin Vongmasa | e672cd0 | 2019-02-14 16:01:29 -0800 | [diff] [blame] | 122 | "libpdx_default_transport", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 123 | ], |
| 124 | }, |
| 125 | }, |
| 126 | |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 127 | header_libs: [ |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 128 | "libdvr_headers", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 129 | "libpdx_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 130 | ], |
Daichi Hirono | f474d3d | 2019-11-05 08:54:07 +0900 | [diff] [blame] | 131 | |
| 132 | aidl: { |
| 133 | export_aidl_headers: true, |
| 134 | } |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 135 | } |
| 136 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 137 | // Used by media codec services exclusively as a static lib for |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 138 | // core bufferqueue support only. |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 139 | cc_library_static { |
| 140 | name: "libgui_bufferqueue_static", |
| 141 | vendor_available: true, |
Jooyung Han | 54042e0 | 2020-05-13 16:04:07 +0900 | [diff] [blame] | 142 | apex_available: [ |
| 143 | "//apex_available:platform", |
| 144 | "com.android.media.swcodec", |
| 145 | ], |
| 146 | min_sdk_version: "29", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 147 | |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 148 | cflags: [ |
| 149 | "-DNO_BUFFERHUB", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 150 | "-DNO_BINDER", |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 151 | ], |
| 152 | |
| 153 | defaults: ["libgui_bufferqueue-defaults"], |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 154 | |
| 155 | srcs: [ |
Pablo Gamito | 6ee484d | 2020-07-30 14:26:28 +0000 | [diff] [blame^] | 156 | ":libgui_aidl", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 157 | ":libgui_bufferqueue_sources", |
| 158 | ], |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 159 | } |
| 160 | |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 161 | filegroup { |
| 162 | name: "libgui_bufferqueue_sources", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 163 | srcs: [ |
| 164 | "BufferItem.cpp", |
| 165 | "BufferQueue.cpp", |
| 166 | "BufferQueueConsumer.cpp", |
| 167 | "BufferQueueCore.cpp", |
| 168 | "BufferQueueProducer.cpp", |
| 169 | "BufferQueueThreadState.cpp", |
| 170 | "BufferSlot.cpp", |
| 171 | "FrameTimestamps.cpp", |
| 172 | "GLConsumerUtils.cpp", |
| 173 | "HdrMetadata.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 174 | "QueueBufferInputOutput.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 175 | "bufferqueue/1.0/Conversion.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 176 | "bufferqueue/1.0/H2BProducerListener.cpp", |
| 177 | "bufferqueue/1.0/WProducerListener.cpp", |
| 178 | "bufferqueue/2.0/B2HGraphicBufferProducer.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 179 | "bufferqueue/2.0/H2BProducerListener.cpp", |
| 180 | "bufferqueue/2.0/types.cpp", |
| 181 | ], |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 182 | } |
| 183 | |
| 184 | // Common build config shared by libgui and libgui_bufferqueue_static. |
| 185 | cc_defaults { |
| 186 | name: "libgui_bufferqueue-defaults", |
| 187 | |
| 188 | clang: true, |
| 189 | cflags: [ |
| 190 | "-Wall", |
| 191 | "-Werror", |
| 192 | ], |
| 193 | |
| 194 | cppflags: [ |
| 195 | "-Wextra", |
| 196 | "-DDEBUG_ONLY_CODE=0", |
| 197 | ], |
| 198 | |
| 199 | product_variables: { |
| 200 | eng: { |
| 201 | cppflags: [ |
| 202 | "-UDEBUG_ONLY_CODE", |
| 203 | "-DDEBUG_ONLY_CODE=1", |
| 204 | ], |
| 205 | }, |
| 206 | }, |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 207 | |
David Stevens | 7347f0b | 2020-01-15 20:19:22 +0900 | [diff] [blame] | 208 | whole_static_libs: [ |
| 209 | "LibGuiProperties", |
| 210 | ], |
| 211 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 212 | shared_libs: [ |
| 213 | "android.hardware.graphics.bufferqueue@1.0", |
| 214 | "android.hardware.graphics.bufferqueue@2.0", |
| 215 | "android.hardware.graphics.common@1.1", |
| 216 | "android.hardware.graphics.common@1.2", |
| 217 | "android.hidl.token@1.0-utils", |
| 218 | "libbase", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 219 | "libcutils", |
| 220 | "libEGL", |
| 221 | "libGLESv2", |
| 222 | "libhidlbase", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 223 | "liblog", |
| 224 | "libnativewindow", |
| 225 | "libsync", |
| 226 | "libui", |
| 227 | "libutils", |
| 228 | "libvndksupport", |
| 229 | ], |
| 230 | |
Steven Moreland | 2b3f3cd | 2020-01-31 14:56:45 -0800 | [diff] [blame] | 231 | static_libs: [ |
| 232 | "libbinderthreadstateutils", |
| 233 | ], |
| 234 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 235 | header_libs: [ |
| 236 | "libgui_headers", |
| 237 | "libnativebase_headers", |
| 238 | ], |
| 239 | |
| 240 | export_shared_lib_headers: [ |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 241 | "libEGL", |
| 242 | "libnativewindow", |
| 243 | "libui", |
| 244 | "android.hardware.graphics.bufferqueue@1.0", |
| 245 | "android.hardware.graphics.bufferqueue@2.0", |
| 246 | "android.hardware.graphics.common@1.1", |
| 247 | "android.hardware.graphics.common@1.2", |
| 248 | "android.hidl.token@1.0-utils", |
| 249 | ], |
| 250 | |
| 251 | export_header_lib_headers: [ |
| 252 | "libgui_headers", |
| 253 | ], |
| 254 | |
| 255 | export_include_dirs: [ |
| 256 | "include", |
| 257 | ], |
| 258 | } |
| 259 | |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 260 | // GMocks for use by external code |
| 261 | cc_library_static { |
| 262 | name: "libgui_mocks", |
| 263 | vendor_available: false, |
| 264 | |
| 265 | defaults: ["libgui_bufferqueue-defaults"], |
| 266 | static_libs: [ |
| 267 | "libgtest", |
| 268 | "libgmock", |
| 269 | ], |
| 270 | |
| 271 | srcs: [ |
| 272 | "mock/GraphicBufferConsumer.cpp", |
| 273 | "mock/GraphicBufferProducer.cpp", |
| 274 | ], |
| 275 | } |
| 276 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 277 | subdirs = ["tests"] |