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