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