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