blob: 0106b255caecee9eeb030ebf6f40540cd62eb342 [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",
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: [
Peiyong Lincbc184f2018-08-22 13:24:10 -070060 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080061 "libserviceutils",
62 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080063 "libvr_manager",
64 "libvrflinger",
65 ],
66 header_libs: [
67 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070068 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070069 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080070 ],
71 export_static_lib_headers: [
Peiyong Lincbc184f2018-08-22 13:24:10 -070072 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080073 "libserviceutils",
74 ],
75 export_shared_lib_headers: [
76 "android.hardware.graphics.allocator@2.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070077 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080078 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070079 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070080 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010081 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080082 "libhidlbase",
83 "libhidltransport",
84 "libhwbinder",
85 ],
86}
87
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070088cc_defaults {
89 name: "libsurfaceflinger_production_defaults",
90 defaults: ["libsurfaceflinger_defaults"],
91 cflags: [
92 "-fvisibility=hidden",
93 "-fwhole-program-vtables", // requires ThinLTO
94 ],
95 lto: {
96 thin: true,
97 },
98}
99
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800100cc_library_headers {
101 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800102 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800103 static_libs: ["libserviceutils"],
104 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800105}
Kalle Raitaa099a242017-01-11 11:17:29 -0800106
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800107filegroup {
108 name: "libsurfaceflinger_sources",
109 srcs: [
110 "BufferLayer.cpp",
111 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700112 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700113 "BufferStateLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800114 "Client.cpp",
115 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800116 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800117 "DisplayDevice.cpp",
118 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700119 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800120 "DisplayHardware/FramebufferSurface.cpp",
121 "DisplayHardware/HWC2.cpp",
122 "DisplayHardware/HWComposer.cpp",
123 "DisplayHardware/HWComposerBufferCache.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100124 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800125 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800126 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800127 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800128 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "Layer.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700130 "LayerBE.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "LayerProtoHelper.cpp",
132 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800133 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700136 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "RenderArea.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700138 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700139 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700140 "Scheduler/EventControlThread.cpp",
141 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100142 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100143 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700144 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700145 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100146 "Scheduler/SchedulerUtils.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800147 "StartPropertySetThread.cpp",
148 "SurfaceFlinger.cpp",
149 "SurfaceInterceptor.cpp",
150 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700151 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700152 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800153 ],
154}
155
156cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700157 // Please use libsurfaceflinger_defaults to configure how the sources are
158 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800159 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700160 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800161 srcs: [
162 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700163
164 // Note: SurfaceFlingerFactory is not in the default sources so that it
165 // can be easily replaced.
166 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800167 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800168 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800169}
170
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700171cc_defaults {
172 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800173 defaults: ["surfaceflinger_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800174 whole_static_libs: [
175 "libsigchain",
176 ],
177 shared_libs: [
178 "android.frameworks.displayservice@1.0",
179 "android.hardware.configstore-utils",
180 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700181 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800182 "android.hardware.graphics.allocator@2.0",
183 "libbinder",
184 "libcutils",
185 "libdisplayservicehidl",
186 "libhidlbase",
187 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700188 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800189 "liblayers_proto",
190 "liblog",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800191 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700192 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800193 "libutils",
194 ],
195 static_libs: [
196 "libserviceutils",
197 "libtrace_proto",
198 ],
199 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700200}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800201
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700202filegroup {
203 name: "surfaceflinger_binary_sources",
204 srcs: ["main_surfaceflinger.cpp"],
205}
206
207cc_binary {
208 name: "surfaceflinger",
209 defaults: ["libsurfaceflinger_binary"],
210 init_rc: ["surfaceflinger.rc"],
211 srcs: [":surfaceflinger_binary_sources"],
212 shared_libs: ["libsurfaceflinger"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800213}
214
215cc_library_shared {
216 name: "libsurfaceflinger_ddmconnection",
217 defaults: ["surfaceflinger_defaults"],
218 srcs: ["DdmConnection.cpp"],
219 shared_libs: [
220 "libcutils",
221 "libdl",
222 "liblog",
223 ],
224 product_variables: {
225 // uses jni which may not be available in PDK
226 pdk: {
227 enabled: false,
228 },
229 },
230}
231
232subdirs = [
233 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700234 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800235 "tests",
236]