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 | |
| 28 | clang: true, |
Chih-Hung Hsieh | d66be0a | 2017-10-05 13:51:32 -0700 | [diff] [blame] | 29 | cflags: [ |
| 30 | "-Wall", |
| 31 | "-Werror", |
| 32 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 33 | cppflags: [ |
| 34 | "-Weverything", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 35 | |
| 36 | // The static constructors and destructors in this library have not been noted to |
| 37 | // introduce significant overheads |
| 38 | "-Wno-exit-time-destructors", |
| 39 | "-Wno-global-constructors", |
| 40 | |
| 41 | // We only care about compiling as C++14 |
| 42 | "-Wno-c++98-compat-pedantic", |
| 43 | |
| 44 | // We don't need to enumerate every case in a switch as long as a default case |
| 45 | // is present |
| 46 | "-Wno-switch-enum", |
| 47 | |
| 48 | // Allow calling variadic macros without a __VA_ARGS__ list |
| 49 | "-Wno-gnu-zero-variadic-macro-arguments", |
| 50 | |
| 51 | // Don't warn about struct padding |
| 52 | "-Wno-padded", |
| 53 | |
Dan Stoza | 71bded5 | 2016-10-19 11:10:33 -0700 | [diff] [blame] | 54 | // We are aware of the risks inherent in comparing floats for equality |
| 55 | "-Wno-float-equal", |
| 56 | |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 57 | // Pure abstract classes trigger this warning |
| 58 | "-Wno-weak-vtables", |
| 59 | |
| 60 | // Allow four-character integer literals |
Lloyd Pique | 3b74578 | 2018-08-31 17:34:40 -0700 | [diff] [blame] | 61 | "-Wno-four-char-constants", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 62 | |
| 63 | // Allow documentation warnings |
| 64 | "-Wno-documentation", |
| 65 | |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 66 | // Allow implicit instantiation for templated class function |
| 67 | "-Wno-undefined-func-template", |
| 68 | |
Jiwen 'Steve' Cai | dc82be7 | 2018-02-08 21:28:22 -0800 | [diff] [blame] | 69 | // Allow explicitly marking struct as packed even when unnecessary |
| 70 | "-Wno-packed", |
| 71 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 72 | "-DDEBUG_ONLY_CODE=0", |
| 73 | ], |
| 74 | |
| 75 | product_variables: { |
Fabien Sanglard | 98bfd4f | 2017-06-22 11:13:49 -0700 | [diff] [blame] | 76 | eng: { |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 77 | cppflags: [ |
| 78 | "-UDEBUG_ONLY_CODE", |
| 79 | "-DDEBUG_ONLY_CODE=1", |
| 80 | ], |
| 81 | }, |
| 82 | }, |
| 83 | |
| 84 | srcs: [ |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 85 | "BitTube.cpp", |
Jiwen 'Steve' Cai | a2a27b2 | 2018-02-07 17:29:56 -0800 | [diff] [blame] | 86 | "BufferHubConsumer.cpp", |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 87 | "BufferHubProducer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 88 | "BufferItem.cpp", |
| 89 | "BufferItemConsumer.cpp", |
| 90 | "BufferQueue.cpp", |
| 91 | "BufferQueueConsumer.cpp", |
| 92 | "BufferQueueCore.cpp", |
| 93 | "BufferQueueProducer.cpp", |
| 94 | "BufferSlot.cpp", |
| 95 | "ConsumerBase.cpp", |
| 96 | "CpuConsumer.cpp", |
| 97 | "DisplayEventReceiver.cpp", |
Brian Anderson | d6927fb | 2016-07-23 23:37:30 -0700 | [diff] [blame] | 98 | "FrameTimestamps.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 99 | "GLConsumer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 100 | "GuiConfig.cpp", |
Courtney Goeltzenleuchter | 9bad0d7 | 2017-12-19 12:34:34 -0700 | [diff] [blame] | 101 | "HdrMetadata.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 102 | "IDisplayEventConnection.cpp", |
Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 103 | "IConsumerListener.cpp", |
Mathias Agopian | 801ea09 | 2017-03-06 15:05:04 -0800 | [diff] [blame] | 104 | "IGraphicBufferConsumer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 105 | "IGraphicBufferProducer.cpp", |
| 106 | "IProducerListener.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 107 | "ISurfaceComposer.cpp", |
| 108 | "ISurfaceComposerClient.cpp", |
Marissa Wall | 7a9b6ff | 2018-08-21 17:26:20 -0700 | [diff] [blame] | 109 | "ITransactionCompletedListener.cpp", |
Kalle Raita | a099a24 | 2017-01-11 11:17:29 -0800 | [diff] [blame] | 110 | "LayerDebugInfo.cpp", |
Evan Rosky | 1f6d6d5 | 2018-12-06 10:47:26 -0800 | [diff] [blame] | 111 | "LayerMetadata.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 112 | "LayerState.cpp", |
| 113 | "OccupancyTracker.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 114 | "StreamSplitter.cpp", |
| 115 | "Surface.cpp", |
| 116 | "SurfaceControl.cpp", |
| 117 | "SurfaceComposerClient.cpp", |
| 118 | "SyncFeatures.cpp", |
Mathias Agopian | 05debe1 | 2017-02-08 17:04:18 -0800 | [diff] [blame] | 119 | "view/Surface.cpp", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 120 | "bufferqueue/1.0/B2HProducerListener.cpp", |
Lloyd Pique | 3b74578 | 2018-08-31 17:34:40 -0700 | [diff] [blame] | 121 | "bufferqueue/1.0/H2BGraphicBufferProducer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 122 | ], |
| 123 | |
| 124 | shared_libs: [ |
Fan Xu | 021776e | 2018-12-05 13:34:48 -0800 | [diff] [blame] | 125 | "android.frameworks.bufferhub@1.0", |
Peiyong Lin | a52f029 | 2018-03-14 17:26:31 -0700 | [diff] [blame] | 126 | "android.hardware.graphics.common@1.1", |
Yiwei Zhang | 5434a78 | 2018-12-05 18:06:32 -0800 | [diff] [blame] | 127 | "libbase", |
Jesse Hall | 153fbc8 | 2017-01-03 16:18:15 -0800 | [diff] [blame] | 128 | "libsync", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 129 | "libbinder", |
Jiwen 'Steve' Cai | 57ae3ee | 2018-05-03 17:51:52 -0700 | [diff] [blame] | 130 | "libbufferhub", |
Lloyd Pique | 3b74578 | 2018-08-31 17:34:40 -0700 | [diff] [blame] | 131 | "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui. |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 132 | "libpdx_default_transport", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 133 | "libcutils", |
| 134 | "libEGL", |
| 135 | "libGLESv2", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 136 | "libui", |
| 137 | "libutils", |
Mathias Agopian | 89ed4c8 | 2017-02-09 18:48:34 -0800 | [diff] [blame] | 138 | "libnativewindow", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 139 | "liblog", |
Robert Carr | 2c358bf | 2018-08-08 15:58:15 -0700 | [diff] [blame] | 140 | "libinput", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 141 | "libhidlbase", |
Courtney Goeltzenleuchter | a0c93e1 | 2017-03-17 16:16:48 -0600 | [diff] [blame] | 142 | "libhidltransport", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 143 | "android.hidl.token@1.0-utils", |
| 144 | "android.hardware.graphics.bufferqueue@1.0", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 145 | ], |
| 146 | |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 147 | // bufferhub is not used when building libgui for vendors |
| 148 | target: { |
| 149 | vendor: { |
Robert Carr | 2c358bf | 2018-08-08 15:58:15 -0700 | [diff] [blame] | 150 | cflags: ["-DNO_BUFFERHUB", "-DNO_INPUT"], |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 151 | exclude_srcs: [ |
| 152 | "BufferHubConsumer.cpp", |
| 153 | "BufferHubProducer.cpp", |
| 154 | ], |
| 155 | exclude_shared_libs: [ |
Fan Xu | 021776e | 2018-12-05 13:34:48 -0800 | [diff] [blame] | 156 | "android.frameworks.bufferhub@1.0", |
Jiwen 'Steve' Cai | 57ae3ee | 2018-05-03 17:51:52 -0700 | [diff] [blame] | 157 | "libbufferhub", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 158 | "libbufferhubqueue", |
| 159 | "libpdx_default_transport", |
Robert Carr | 2c358bf | 2018-08-08 15:58:15 -0700 | [diff] [blame] | 160 | "libinput" |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 161 | ], |
| 162 | }, |
| 163 | }, |
| 164 | |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 165 | header_libs: [ |
Jiwen 'Steve' Cai | 0f95084 | 2018-01-16 17:05:54 -0800 | [diff] [blame] | 166 | "libdvr_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 167 | "libnativebase_headers", |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 168 | "libgui_headers", |
Jiyong Park | a75d3d6 | 2018-04-09 12:16:30 +0900 | [diff] [blame] | 169 | "libpdx_headers", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 170 | ], |
| 171 | |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 172 | export_shared_lib_headers: [ |
| 173 | "libbinder", |
Steven Moreland | 33f6484 | 2017-06-22 17:50:49 -0700 | [diff] [blame] | 174 | "libEGL", |
Mathias Agopian | 6a3c05b | 2017-04-27 20:06:55 -0700 | [diff] [blame] | 175 | "libnativewindow", |
Steven Moreland | 33f6484 | 2017-06-22 17:50:49 -0700 | [diff] [blame] | 176 | "libui", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 177 | "android.hidl.token@1.0-utils", |
| 178 | "android.hardware.graphics.bufferqueue@1.0", |
Peiyong Lin | a52f029 | 2018-03-14 17:26:31 -0700 | [diff] [blame] | 179 | "android.hardware.graphics.common@1.1", |
Pawin Vongmasa | 6e1193a | 2017-03-07 13:08:40 -0800 | [diff] [blame] | 180 | ], |
Dan Stoza | 1e438d2 | 2017-03-31 16:18:10 -0700 | [diff] [blame] | 181 | |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 182 | export_header_lib_headers: [ |
| 183 | "libgui_headers", |
| 184 | ], |
| 185 | |
Dan Stoza | 1e438d2 | 2017-03-31 16:18:10 -0700 | [diff] [blame] | 186 | export_include_dirs: [ |
| 187 | "include", |
| 188 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | subdirs = ["tests"] |