blob: 2a702939eb5aa8cc667abeede554d8e5b69bfc10 [file] [log] [blame]
Lloyd Pique66ce40d2018-01-23 16:42:19 -08001cc_defaults {
2 name: "surfaceflinger_defaults",
3 cflags: [
Lloyd Pique66ce40d2018-01-23 16:42:19 -08004 "-Wall",
5 "-Werror",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -07006 "-Wformat",
Lloyd Pique755e3192018-01-31 16:46:15 -08007 "-Wthread-safety",
Lloyd Pique66ce40d2018-01-23 16:42:19 -08008 "-Wunused",
9 "-Wunreachable-code",
10 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080011}
12
13cc_defaults {
14 name: "libsurfaceflinger_defaults",
15 defaults: ["surfaceflinger_defaults"],
16 cflags: [
Lloyd Pique70d91362018-10-18 16:02:55 -070017 "-DLOG_TAG=\"SurfaceFlinger\"",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080018 "-DGL_GLEXT_PROTOTYPES",
19 "-DEGL_EGLEXT_PROTOTYPES",
20 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080021 shared_libs: [
22 "android.frameworks.vr.composer@1.0",
23 "android.hardware.configstore-utils",
24 "android.hardware.configstore@1.0",
Iris Chang7501ed62018-04-30 14:45:42 +080025 "android.hardware.configstore@1.1",
Peiyong Lin13effd12018-07-24 17:01:47 -070026 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080027 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080028 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070029 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080030 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070031 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070032 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080033 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010034 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080035 "libbase",
36 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080037 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080038 "libcutils",
39 "libdl",
40 "libEGL",
41 "libfmq",
42 "libGLESv1_CM",
43 "libGLESv2",
44 "libgui",
45 "libhardware",
46 "libhidlbase",
47 "libhidltransport",
48 "libhwbinder",
49 "liblayers_proto",
50 "liblog",
Valerie Haue9e843a2018-12-18 13:39:23 -080051 "libnativewindow",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080052 "libpdx_default_transport",
Suren Baghdasaryancd829052018-11-02 19:15:37 -070053 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080054 "libprotobuf-cpp-lite",
55 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070056 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080057 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070058 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080059 "libutils",
Ady Abraham8164d482019-01-11 14:47:59 -080060 "libutilscallstack",
Sundong Ahnd5e08f62018-12-12 20:27:28 +090061 "libSurfaceFlingerProperties",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080062 ],
63 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070064 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070065 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080066 "libserviceutils",
67 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080068 "libvr_manager",
69 "libvrflinger",
70 ],
71 header_libs: [
72 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070073 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070074 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080075 ],
76 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070077 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070078 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080079 "libserviceutils",
80 ],
81 export_shared_lib_headers: [
82 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080083 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070084 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080085 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070086 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070087 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010088 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080089 "libhidlbase",
90 "libhidltransport",
91 "libhwbinder",
92 ],
93}
94
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070095cc_defaults {
96 name: "libsurfaceflinger_production_defaults",
97 defaults: ["libsurfaceflinger_defaults"],
98 cflags: [
99 "-fvisibility=hidden",
100 "-fwhole-program-vtables", // requires ThinLTO
101 ],
102 lto: {
103 thin: true,
104 },
105}
106
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800107cc_library_headers {
108 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800109 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800110 static_libs: ["libserviceutils"],
111 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800112}
Kalle Raitaa099a242017-01-11 11:17:29 -0800113
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800114filegroup {
115 name: "libsurfaceflinger_sources",
116 srcs: [
117 "BufferLayer.cpp",
118 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700119 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700120 "BufferStateLayer.cpp",
Marissa Wallebc2c052019-01-16 19:16:55 -0800121 "BufferStateLayerCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800122 "Client.cpp",
123 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800124 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800125 "DisplayDevice.cpp",
126 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700127 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800128 "DisplayHardware/FramebufferSurface.cpp",
129 "DisplayHardware/HWC2.cpp",
130 "DisplayHardware/HWComposer.cpp",
131 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100132 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800136 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700138 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "LayerProtoHelper.cpp",
140 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800141 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800143 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700144 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800145 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700146 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700147 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700148 "Scheduler/EventControlThread.cpp",
149 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100150 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100151 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700152 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700153 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100154 "Scheduler/SchedulerUtils.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800155 "StartPropertySetThread.cpp",
156 "SurfaceFlinger.cpp",
157 "SurfaceInterceptor.cpp",
158 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700159 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700160 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800161 ],
162}
163
164cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700165 // Please use libsurfaceflinger_defaults to configure how the sources are
166 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800167 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700168 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800169 srcs: [
170 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700171
172 // Note: SurfaceFlingerFactory is not in the default sources so that it
173 // can be easily replaced.
174 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800175 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800176 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800177}
178
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700179cc_defaults {
180 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800181 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700182 cflags: [
183 "-DLOG_TAG=\"SurfaceFlinger\"",
184 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800185 whole_static_libs: [
186 "libsigchain",
187 ],
188 shared_libs: [
189 "android.frameworks.displayservice@1.0",
190 "android.hardware.configstore-utils",
191 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700192 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800193 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800194 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800195 "libbinder",
196 "libcutils",
197 "libdisplayservicehidl",
198 "libhidlbase",
199 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700200 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800201 "liblayers_proto",
202 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700203 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800204 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700205 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800206 "libutils",
207 ],
208 static_libs: [
209 "libserviceutils",
210 "libtrace_proto",
211 ],
212 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700213}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800214
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700215filegroup {
216 name: "surfaceflinger_binary_sources",
217 srcs: ["main_surfaceflinger.cpp"],
218}
219
220cc_binary {
221 name: "surfaceflinger",
222 defaults: ["libsurfaceflinger_binary"],
223 init_rc: ["surfaceflinger.rc"],
224 srcs: [":surfaceflinger_binary_sources"],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900225 shared_libs: [
226 "libsurfaceflinger",
227 "libSurfaceFlingerProperties",
228 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800229}
230
231cc_library_shared {
232 name: "libsurfaceflinger_ddmconnection",
233 defaults: ["surfaceflinger_defaults"],
234 srcs: ["DdmConnection.cpp"],
235 shared_libs: [
236 "libcutils",
237 "libdl",
238 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700239 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800240 ],
241 product_variables: {
242 // uses jni which may not be available in PDK
243 pdk: {
244 enabled: false,
245 },
246 },
247}
248
249subdirs = [
250 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700251 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800252 "tests",
253]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900254
255cc_library_shared {
256 name: "libSurfaceFlingerProperties",
257 srcs: [
258 "SurfaceFlingerProperties.cpp",
259 "sysprop/*.sysprop",
260 ],
261 shared_libs: [
262 "android.hardware.configstore-utils",
263 "android.hardware.configstore@1.0",
264 "android.hardware.configstore@1.1",
265 "android.hardware.configstore@1.2",
266 "libhidlbase",
267 "libhidltransport",
268 "libhwbinder",
269 "libutils",
270 ],
271 export_shared_lib_headers: [
272 "libhidlbase",
273 "libhidltransport",
274 "libhwbinder",
275 ],
276}