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