blob: 033ed668c0c372f0d46a505aa48bfb8f6dd01bc2 [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",
Valerie Haue9e843a2018-12-18 13:39:23 -080050 "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",
Ady Abraham8164d482019-01-11 14:47:59 -080058 "libutilscallstack",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080059 ],
60 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070061 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070062 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080063 "libserviceutils",
64 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080065 "libvr_manager",
66 "libvrflinger",
67 ],
68 header_libs: [
69 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070070 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070071 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080072 ],
73 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070074 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070075 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080076 "libserviceutils",
77 ],
78 export_shared_lib_headers: [
79 "android.hardware.graphics.allocator@2.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070080 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080081 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070082 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070083 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010084 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080085 "libhidlbase",
86 "libhidltransport",
87 "libhwbinder",
88 ],
89}
90
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070091cc_defaults {
92 name: "libsurfaceflinger_production_defaults",
93 defaults: ["libsurfaceflinger_defaults"],
94 cflags: [
95 "-fvisibility=hidden",
96 "-fwhole-program-vtables", // requires ThinLTO
97 ],
98 lto: {
99 thin: true,
100 },
101}
102
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800103cc_library_headers {
104 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800105 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800106 static_libs: ["libserviceutils"],
107 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800108}
Kalle Raitaa099a242017-01-11 11:17:29 -0800109
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800110filegroup {
111 name: "libsurfaceflinger_sources",
112 srcs: [
113 "BufferLayer.cpp",
114 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700115 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700116 "BufferStateLayer.cpp",
Marissa Wallebc2c052019-01-16 19:16:55 -0800117 "BufferStateLayerCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800118 "Client.cpp",
119 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800120 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800121 "DisplayDevice.cpp",
122 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700123 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800124 "DisplayHardware/FramebufferSurface.cpp",
125 "DisplayHardware/HWC2.cpp",
126 "DisplayHardware/HWComposer.cpp",
127 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100128 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700134 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "LayerProtoHelper.cpp",
136 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800137 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800138 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700140 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800141 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700142 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700143 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700144 "Scheduler/EventControlThread.cpp",
145 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100146 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100147 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700148 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700149 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100150 "Scheduler/SchedulerUtils.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800151 "StartPropertySetThread.cpp",
152 "SurfaceFlinger.cpp",
153 "SurfaceInterceptor.cpp",
154 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700155 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700156 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800157 ],
158}
159
160cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700161 // Please use libsurfaceflinger_defaults to configure how the sources are
162 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800163 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700164 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800165 srcs: [
166 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700167
168 // Note: SurfaceFlingerFactory is not in the default sources so that it
169 // can be easily replaced.
170 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800171 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800172 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800173}
174
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700175cc_defaults {
176 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800177 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700178 cflags: [
179 "-DLOG_TAG=\"SurfaceFlinger\"",
180 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800181 whole_static_libs: [
182 "libsigchain",
183 ],
184 shared_libs: [
185 "android.frameworks.displayservice@1.0",
186 "android.hardware.configstore-utils",
187 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700188 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800189 "android.hardware.graphics.allocator@2.0",
190 "libbinder",
191 "libcutils",
192 "libdisplayservicehidl",
193 "libhidlbase",
194 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700195 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800196 "liblayers_proto",
197 "liblog",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800198 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700199 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800200 "libutils",
201 ],
202 static_libs: [
203 "libserviceutils",
204 "libtrace_proto",
205 ],
206 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700207}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800208
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700209filegroup {
210 name: "surfaceflinger_binary_sources",
211 srcs: ["main_surfaceflinger.cpp"],
212}
213
214cc_binary {
215 name: "surfaceflinger",
216 defaults: ["libsurfaceflinger_binary"],
217 init_rc: ["surfaceflinger.rc"],
218 srcs: [":surfaceflinger_binary_sources"],
219 shared_libs: ["libsurfaceflinger"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800220}
221
222cc_library_shared {
223 name: "libsurfaceflinger_ddmconnection",
224 defaults: ["surfaceflinger_defaults"],
225 srcs: ["DdmConnection.cpp"],
226 shared_libs: [
227 "libcutils",
228 "libdl",
229 "liblog",
230 ],
231 product_variables: {
232 // uses jni which may not be available in PDK
233 pdk: {
234 enabled: false,
235 },
236 },
237}
238
239subdirs = [
240 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700241 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800242 "tests",
243]