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