blob: 3304fd14ab440118d5e6a7eda42c0f5c10304efa [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",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100131 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800136 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700137 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800138 "LayerProtoHelper.cpp",
139 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800140 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800141 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700143 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800144 "RenderArea.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800145 "RegionSamplingThread.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",
Ana Krulec757f63a2019-01-25 10:46:18 -0800155 "Scheduler/PhaseOffsets.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800156 "StartPropertySetThread.cpp",
157 "SurfaceFlinger.cpp",
158 "SurfaceInterceptor.cpp",
159 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700160 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700161 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800162 ],
163}
164
165cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700166 // Please use libsurfaceflinger_defaults to configure how the sources are
167 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800168 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700169 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800170 srcs: [
171 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700172
173 // Note: SurfaceFlingerFactory is not in the default sources so that it
174 // can be easily replaced.
175 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800176 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800177 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800178}
179
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700180cc_defaults {
181 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800182 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700183 cflags: [
184 "-DLOG_TAG=\"SurfaceFlinger\"",
185 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800186 whole_static_libs: [
187 "libsigchain",
188 ],
189 shared_libs: [
190 "android.frameworks.displayservice@1.0",
191 "android.hardware.configstore-utils",
192 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700193 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800194 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800195 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800196 "libbinder",
197 "libcutils",
198 "libdisplayservicehidl",
199 "libhidlbase",
200 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700201 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800202 "liblayers_proto",
203 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700204 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800205 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700206 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800207 "libutils",
208 ],
209 static_libs: [
210 "libserviceutils",
211 "libtrace_proto",
212 ],
213 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700214}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800215
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700216filegroup {
217 name: "surfaceflinger_binary_sources",
218 srcs: ["main_surfaceflinger.cpp"],
219}
220
221cc_binary {
222 name: "surfaceflinger",
223 defaults: ["libsurfaceflinger_binary"],
224 init_rc: ["surfaceflinger.rc"],
225 srcs: [":surfaceflinger_binary_sources"],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900226 shared_libs: [
227 "libsurfaceflinger",
228 "libSurfaceFlingerProperties",
229 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800230}
231
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800232subdirs = [
233 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700234 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800235 "tests",
236]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900237
238cc_library_shared {
239 name: "libSurfaceFlingerProperties",
240 srcs: [
241 "SurfaceFlingerProperties.cpp",
242 "sysprop/*.sysprop",
243 ],
244 shared_libs: [
245 "android.hardware.configstore-utils",
246 "android.hardware.configstore@1.0",
247 "android.hardware.configstore@1.1",
248 "android.hardware.configstore@1.2",
249 "libhidlbase",
250 "libhidltransport",
251 "libhwbinder",
252 "libutils",
253 ],
254 export_shared_lib_headers: [
255 "libhidlbase",
256 "libhidltransport",
257 "libhwbinder",
258 ],
259}