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