blob: 1d2cdb1ad34e7f55dad34288ba4a65dcca11185e [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",
Valerie Hau9758ae02018-10-09 16:05:09 -070028 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080029 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070030 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070031 "android.hardware.graphics.composer@2.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080032 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010033 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080034 "libbase",
35 "libbinder",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080036 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080037 "libcutils",
38 "libdl",
39 "libEGL",
40 "libfmq",
41 "libGLESv1_CM",
42 "libGLESv2",
43 "libgui",
44 "libhardware",
45 "libhidlbase",
46 "libhidltransport",
47 "libhwbinder",
48 "liblayers_proto",
49 "liblog",
Alec Mouri05483a02018-09-10 21:03:42 +000050 "libnativewindow",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080051 "libpdx_default_transport",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080052 "libprotobuf-cpp-lite",
53 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -070054 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080055 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070056 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080057 "libutils",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080058 ],
59 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070060 "libcompositionengine",
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: [
Lloyd Pique70d91362018-10-18 16:02:55 -070073 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070074 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080075 "libserviceutils",
76 ],
77 export_shared_lib_headers: [
78 "android.hardware.graphics.allocator@2.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 Pique70d91362018-10-18 16:02:55 -0700176 cflags: [
177 "-DLOG_TAG=\"SurfaceFlinger\"",
178 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800179 whole_static_libs: [
180 "libsigchain",
181 ],
182 shared_libs: [
183 "android.frameworks.displayservice@1.0",
184 "android.hardware.configstore-utils",
185 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700186 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800187 "android.hardware.graphics.allocator@2.0",
188 "libbinder",
189 "libcutils",
190 "libdisplayservicehidl",
191 "libhidlbase",
192 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700193 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800194 "liblayers_proto",
195 "liblog",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800196 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700197 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800198 "libutils",
199 ],
200 static_libs: [
201 "libserviceutils",
202 "libtrace_proto",
203 ],
204 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700205}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800206
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700207filegroup {
208 name: "surfaceflinger_binary_sources",
209 srcs: ["main_surfaceflinger.cpp"],
210}
211
212cc_binary {
213 name: "surfaceflinger",
214 defaults: ["libsurfaceflinger_binary"],
215 init_rc: ["surfaceflinger.rc"],
216 srcs: [":surfaceflinger_binary_sources"],
217 shared_libs: ["libsurfaceflinger"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800218}
219
220cc_library_shared {
221 name: "libsurfaceflinger_ddmconnection",
222 defaults: ["surfaceflinger_defaults"],
223 srcs: ["DdmConnection.cpp"],
224 shared_libs: [
225 "libcutils",
226 "libdl",
227 "liblog",
228 ],
229 product_variables: {
230 // uses jni which may not be available in PDK
231 pdk: {
232 enabled: false,
233 },
234 },
235}
236
237subdirs = [
238 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700239 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800240 "tests",
241]