blob: ef3e592c0986c60ecc95ce0ba0f2e0bc38ad03a6 [file] [log] [blame]
Dan Willemsen3106c1c2016-10-03 23:56:51 -07001// 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 Park172bd722017-06-21 12:14:18 +090014cc_library_headers {
15 name: "libgui_headers",
16 vendor_available: true,
17 export_include_dirs: ["include"],
18}
Dan Willemsen3106c1c2016-10-03 23:56:51 -070019
20cc_library_shared {
21 name: "libgui",
Jiyong Park99c514e2017-11-17 19:09:31 +090022 vendor_available: false,
Justin Yun71d6c8852017-07-24 15:19:45 +090023 vndk: {
24 enabled: true,
25 },
Jiyong Parka75d3d62018-04-09 12:16:30 +090026 double_loadable: true,
Dan Willemsen3106c1c2016-10-03 23:56:51 -070027
28 clang: true,
Chih-Hung Hsiehd66be0a2017-10-05 13:51:32 -070029 cflags: [
30 "-Wall",
31 "-Werror",
32 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -070033 cppflags: [
34 "-Weverything",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070035
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 Stoza71bded52016-10-19 11:10:33 -070054 // We are aware of the risks inherent in comparing floats for equality
55 "-Wno-float-equal",
56
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -080057 // Pure abstract classes trigger this warning
58 "-Wno-weak-vtables",
59
60 // Allow four-character integer literals
61 "-Wno-four-char-constants",
62
63 // Allow documentation warnings
64 "-Wno-documentation",
65
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080066 // Allow implicit instantiation for templated class function
67 "-Wno-undefined-func-template",
68
Jiwen 'Steve' Caidc82be72018-02-08 21:28:22 -080069 // Allow explicitly marking struct as packed even when unnecessary
70 "-Wno-packed",
71
Dan Willemsen3106c1c2016-10-03 23:56:51 -070072 "-DDEBUG_ONLY_CODE=0",
73 ],
74
75 product_variables: {
Fabien Sanglard98bfd4f2017-06-22 11:13:49 -070076 eng: {
Dan Willemsen3106c1c2016-10-03 23:56:51 -070077 cppflags: [
78 "-UDEBUG_ONLY_CODE",
79 "-DDEBUG_ONLY_CODE=1",
80 ],
81 },
82 },
83
84 srcs: [
Dan Willemsen3106c1c2016-10-03 23:56:51 -070085 "BitTube.cpp",
Jiwen 'Steve' Caia2a27b22018-02-07 17:29:56 -080086 "BufferHubConsumer.cpp",
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -080087 "BufferHubProducer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070088 "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 Andersond6927fb2016-07-23 23:37:30 -070098 "FrameTimestamps.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -070099 "GLConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700100 "GuiConfig.cpp",
Courtney Goeltzenleuchter9bad0d72017-12-19 12:34:34 -0700101 "HdrMetadata.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700102 "IDisplayEventConnection.cpp",
Mathias Agopian801ea092017-03-06 15:05:04 -0800103 "IConsumerListener.cpp",
Mathias Agopian801ea092017-03-06 15:05:04 -0800104 "IGraphicBufferConsumer.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700105 "IGraphicBufferProducer.cpp",
106 "IProducerListener.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700107 "ISurfaceComposer.cpp",
108 "ISurfaceComposerClient.cpp",
Kalle Raitaa099a242017-01-11 11:17:29 -0800109 "LayerDebugInfo.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700110 "LayerState.cpp",
111 "OccupancyTracker.cpp",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700112 "StreamSplitter.cpp",
113 "Surface.cpp",
114 "SurfaceControl.cpp",
115 "SurfaceComposerClient.cpp",
116 "SyncFeatures.cpp",
Mathias Agopian05debe12017-02-08 17:04:18 -0800117 "view/Surface.cpp",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800118 "bufferqueue/1.0/B2HProducerListener.cpp",
119 "bufferqueue/1.0/H2BGraphicBufferProducer.cpp"
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700120 ],
121
122 shared_libs: [
Peiyong Lina52f0292018-03-14 17:26:31 -0700123 "android.hardware.graphics.common@1.1",
Jesse Hall153fbc82017-01-03 16:18:15 -0800124 "libsync",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700125 "libbinder",
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -0700126 "libbufferhub",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -0800127 "libbufferhubqueue", // TODO(b/70046255): Remove this once BufferHub is integrated into libgui.
128 "libpdx_default_transport",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700129 "libcutils",
130 "libEGL",
131 "libGLESv2",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700132 "libui",
133 "libutils",
Mathias Agopian89ed4c82017-02-09 18:48:34 -0800134 "libnativewindow",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700135 "liblog",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800136 "libhidlbase",
Courtney Goeltzenleuchtera0c93e12017-03-17 16:16:48 -0600137 "libhidltransport",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800138 "android.hidl.token@1.0-utils",
139 "android.hardware.graphics.bufferqueue@1.0",
Courtney Goeltzenleuchtera0c93e12017-03-17 16:16:48 -0600140 "android.hardware.configstore@1.0",
Jaesoo Lee3e85cbe2017-03-30 15:24:15 +0900141 "android.hardware.configstore-utils",
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700142 ],
143
Jiyong Parka75d3d62018-04-09 12:16:30 +0900144 // bufferhub is not used when building libgui for vendors
145 target: {
146 vendor: {
147 cflags: ["-DNO_BUFFERHUB"],
148 exclude_srcs: [
149 "BufferHubConsumer.cpp",
150 "BufferHubProducer.cpp",
151 ],
152 exclude_shared_libs: [
Jiwen 'Steve' Cai57ae3ee2018-05-03 17:51:52 -0700153 "libbufferhub",
Jiyong Parka75d3d62018-04-09 12:16:30 +0900154 "libbufferhubqueue",
155 "libpdx_default_transport",
156 ],
157 },
158 },
159
Mathias Agopian6a3c05b2017-04-27 20:06:55 -0700160 header_libs: [
Jiwen 'Steve' Cai0f950842018-01-16 17:05:54 -0800161 "libdvr_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -0700162 "libnativebase_headers",
Jiyong Park172bd722017-06-21 12:14:18 +0900163 "libgui_headers",
Jiyong Parka75d3d62018-04-09 12:16:30 +0900164 "libpdx_headers",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -0700165 ],
166
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800167 export_shared_lib_headers: [
168 "libbinder",
Steven Moreland33f64842017-06-22 17:50:49 -0700169 "libEGL",
Mathias Agopian6a3c05b2017-04-27 20:06:55 -0700170 "libnativewindow",
Steven Moreland33f64842017-06-22 17:50:49 -0700171 "libui",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800172 "android.hidl.token@1.0-utils",
173 "android.hardware.graphics.bufferqueue@1.0",
Peiyong Lina52f0292018-03-14 17:26:31 -0700174 "android.hardware.graphics.common@1.1",
Pawin Vongmasa6e1193a2017-03-07 13:08:40 -0800175 ],
Dan Stoza1e438d22017-03-31 16:18:10 -0700176
Jiyong Park172bd722017-06-21 12:14:18 +0900177 export_header_lib_headers: [
178 "libgui_headers",
179 ],
180
Dan Stoza1e438d22017-03-31 16:18:10 -0700181 export_include_dirs: [
182 "include",
183 ],
Dan Willemsen3106c1c2016-10-03 23:56:51 -0700184}
185
186subdirs = ["tests"]