blob: c453034774ee0ee0748d15285a62cbe523895aac [file] [log] [blame]
Lloyd Pique66ce40d2018-01-23 16:42:19 -08001cc_defaults {
2 name: "surfaceflinger_defaults",
3 cflags: [
4 "-DLOG_TAG=\"SurfaceFlinger\"",
5 "-Wall",
6 "-Werror",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -07007 "-Wformat",
Lloyd Pique755e3192018-01-31 16:46:15 -08008 "-Wthread-safety",
Lloyd Pique66ce40d2018-01-23 16:42:19 -08009 "-Wunused",
10 "-Wunreachable-code",
11 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080012}
13
14cc_defaults {
15 name: "libsurfaceflinger_defaults",
16 defaults: ["surfaceflinger_defaults"],
17 cflags: [
18 "-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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080053 "libprotobuf-cpp-lite",
54 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070055 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080056 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070057 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080058 "libutils",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080059 ],
60 static_libs: [
Peiyong Lincbc184f2018-08-22 13:24:10 -070061 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080062 "libserviceutils",
63 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080064 "libvr_manager",
65 "libvrflinger",
66 ],
67 header_libs: [
68 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070069 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070070 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080071 ],
72 export_static_lib_headers: [
Peiyong Lincbc184f2018-08-22 13:24:10 -070073 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080074 "libserviceutils",
75 ],
76 export_shared_lib_headers: [
77 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080078 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070079 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080080 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070081 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070082 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010083 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080084 "libhidlbase",
85 "libhidltransport",
86 "libhwbinder",
87 ],
88}
89
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070090cc_defaults {
91 name: "libsurfaceflinger_production_defaults",
92 defaults: ["libsurfaceflinger_defaults"],
93 cflags: [
94 "-fvisibility=hidden",
95 "-fwhole-program-vtables", // requires ThinLTO
96 ],
97 lto: {
98 thin: true,
99 },
100}
101
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800102cc_library_headers {
103 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800104 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800105 static_libs: ["libserviceutils"],
106 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800107}
Kalle Raitaa099a242017-01-11 11:17:29 -0800108
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800109filegroup {
110 name: "libsurfaceflinger_sources",
111 srcs: [
112 "BufferLayer.cpp",
113 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700114 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700115 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800116 "Client.cpp",
117 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800118 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800119 "DisplayDevice.cpp",
120 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700121 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800122 "DisplayHardware/FramebufferSurface.cpp",
123 "DisplayHardware/HWC2.cpp",
124 "DisplayHardware/HWComposer.cpp",
125 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100126 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800127 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800128 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700132 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "LayerProtoHelper.cpp",
134 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800135 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800136 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700138 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700140 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700141 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700142 "Scheduler/EventControlThread.cpp",
143 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100144 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100145 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700146 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700147 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100148 "Scheduler/SchedulerUtils.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800149 "StartPropertySetThread.cpp",
150 "SurfaceFlinger.cpp",
151 "SurfaceInterceptor.cpp",
152 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700153 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700154 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800155 ],
156}
157
158cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700159 // Please use libsurfaceflinger_defaults to configure how the sources are
160 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800161 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700162 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800163 srcs: [
164 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700165
166 // Note: SurfaceFlingerFactory is not in the default sources so that it
167 // can be easily replaced.
168 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800169 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800170 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800171}
172
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700173cc_defaults {
174 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800175 defaults: ["surfaceflinger_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800176 whole_static_libs: [
177 "libsigchain",
178 ],
179 shared_libs: [
180 "android.frameworks.displayservice@1.0",
181 "android.hardware.configstore-utils",
182 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700183 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800184 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800185 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800186 "libbinder",
187 "libcutils",
188 "libdisplayservicehidl",
189 "libhidlbase",
190 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700191 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800192 "liblayers_proto",
193 "liblog",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800194 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700195 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800196 "libutils",
197 ],
198 static_libs: [
199 "libserviceutils",
200 "libtrace_proto",
201 ],
202 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700203}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800204
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700205filegroup {
206 name: "surfaceflinger_binary_sources",
207 srcs: ["main_surfaceflinger.cpp"],
208}
209
210cc_binary {
211 name: "surfaceflinger",
212 defaults: ["libsurfaceflinger_binary"],
213 init_rc: ["surfaceflinger.rc"],
214 srcs: [":surfaceflinger_binary_sources"],
215 shared_libs: ["libsurfaceflinger"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800216}
217
218cc_library_shared {
219 name: "libsurfaceflinger_ddmconnection",
220 defaults: ["surfaceflinger_defaults"],
221 srcs: ["DdmConnection.cpp"],
222 shared_libs: [
223 "libcutils",
224 "libdl",
225 "liblog",
226 ],
227 product_variables: {
228 // uses jni which may not be available in PDK
229 pdk: {
230 enabled: false,
231 },
232 },
233}
234
235subdirs = [
236 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700237 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800238 "tests",
239]