blob: 948b689507c39dcfcb41aab4bbe61984c9d0fb0c [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",
Sundong Ahnd5e08f62018-12-12 20:27:28 +090060 "libSurfaceFlingerProperties",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080061 ],
62 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070063 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070064 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080065 "libserviceutils",
66 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080067 "libvr_manager",
68 "libvrflinger",
69 ],
70 header_libs: [
71 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070072 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070073 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080074 ],
75 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070076 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070077 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080078 "libserviceutils",
79 ],
80 export_shared_lib_headers: [
81 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080082 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070083 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080084 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070085 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070086 "android.hardware.graphics.composer@2.3",
Michael Wright5d22d4f2018-06-21 02:50:34 +010087 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080088 "libhidlbase",
89 "libhidltransport",
90 "libhwbinder",
91 ],
92}
93
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070094cc_defaults {
95 name: "libsurfaceflinger_production_defaults",
96 defaults: ["libsurfaceflinger_defaults"],
97 cflags: [
98 "-fvisibility=hidden",
99 "-fwhole-program-vtables", // requires ThinLTO
100 ],
101 lto: {
102 thin: true,
103 },
104}
105
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800106cc_library_headers {
107 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800108 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800109 static_libs: ["libserviceutils"],
110 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800111}
Kalle Raitaa099a242017-01-11 11:17:29 -0800112
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800113filegroup {
114 name: "libsurfaceflinger_sources",
115 srcs: [
116 "BufferLayer.cpp",
117 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700118 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700119 "BufferStateLayer.cpp",
Marissa Wallebc2c052019-01-16 19:16:55 -0800120 "BufferStateLayerCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800121 "Client.cpp",
122 "ColorLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800123 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800124 "DisplayDevice.cpp",
125 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700126 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800127 "DisplayHardware/FramebufferSurface.cpp",
128 "DisplayHardware/HWC2.cpp",
129 "DisplayHardware/HWComposer.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100130 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "DisplayHardware/VirtualDisplaySurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "EventLog/EventLog.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "Layer.cpp",
136 "LayerProtoHelper.cpp",
137 "LayerRejecter.cpp",
Yiwei Zhang7124ad32018-02-21 13:02:45 -0800138 "LayerStats.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800140 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700141 "NativeWindowSurface.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 "RenderArea.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800143 "RegionSamplingThread.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700144 "Scheduler/DispSync.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700145 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700146 "Scheduler/EventControlThread.cpp",
147 "Scheduler/EventThread.cpp",
Ana Krulecfb772822018-11-30 10:44:07 +0100148 "Scheduler/IdleTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100149 "Scheduler/LayerHistory.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700150 "Scheduler/MessageQueue.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700151 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100152 "Scheduler/SchedulerUtils.cpp",
Ana Krulec757f63a2019-01-25 10:46:18 -0800153 "Scheduler/PhaseOffsets.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800154 "StartPropertySetThread.cpp",
155 "SurfaceFlinger.cpp",
156 "SurfaceInterceptor.cpp",
157 "SurfaceTracing.cpp",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700158 "TimeStats/TimeStats.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700159 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800160 ],
161}
162
163cc_library_shared {
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700164 // Please use libsurfaceflinger_defaults to configure how the sources are
165 // built, so the same settings can be used elsewhere.
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800166 name: "libsurfaceflinger",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700167 defaults: ["libsurfaceflinger_production_defaults"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800168 srcs: [
169 ":libsurfaceflinger_sources",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700170
171 // Note: SurfaceFlingerFactory is not in the default sources so that it
172 // can be easily replaced.
173 "SurfaceFlingerFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800174 ],
Lloyd Piquef58625d2017-12-19 13:22:33 -0800175 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800176}
177
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700178cc_defaults {
179 name: "libsurfaceflinger_binary",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800180 defaults: ["surfaceflinger_defaults"],
Lloyd Pique70d91362018-10-18 16:02:55 -0700181 cflags: [
182 "-DLOG_TAG=\"SurfaceFlinger\"",
183 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800184 whole_static_libs: [
185 "libsigchain",
186 ],
187 shared_libs: [
188 "android.frameworks.displayservice@1.0",
189 "android.hardware.configstore-utils",
190 "android.hardware.configstore@1.0",
Peiyong Lin13effd12018-07-24 17:01:47 -0700191 "android.hardware.configstore@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800192 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800193 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800194 "libbinder",
195 "libcutils",
196 "libdisplayservicehidl",
197 "libhidlbase",
198 "libhidltransport",
Robert Carr720e5062018-07-30 17:45:14 -0700199 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800200 "liblayers_proto",
201 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700202 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800203 "libsync",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700204 "libtimestats_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800205 "libutils",
206 ],
207 static_libs: [
208 "libserviceutils",
209 "libtrace_proto",
210 ],
211 ldflags: ["-Wl,--export-dynamic"],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700212}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800213
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700214filegroup {
215 name: "surfaceflinger_binary_sources",
216 srcs: ["main_surfaceflinger.cpp"],
217}
218
219cc_binary {
220 name: "surfaceflinger",
221 defaults: ["libsurfaceflinger_binary"],
222 init_rc: ["surfaceflinger.rc"],
223 srcs: [":surfaceflinger_binary_sources"],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900224 shared_libs: [
225 "libsurfaceflinger",
226 "libSurfaceFlingerProperties",
227 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800228}
229
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800230subdirs = [
231 "layerproto",
Yiwei Zhangfaf3ded2018-05-02 17:37:17 -0700232 "TimeStats/timestatsproto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800233 "tests",
234]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900235
236cc_library_shared {
237 name: "libSurfaceFlingerProperties",
238 srcs: [
239 "SurfaceFlingerProperties.cpp",
240 "sysprop/*.sysprop",
241 ],
242 shared_libs: [
243 "android.hardware.configstore-utils",
244 "android.hardware.configstore@1.0",
245 "android.hardware.configstore@1.1",
246 "android.hardware.configstore@1.2",
247 "libhidlbase",
248 "libhidltransport",
249 "libhwbinder",
250 "libutils",
251 ],
252 export_shared_lib_headers: [
253 "libhidlbase",
254 "libhidltransport",
255 "libhwbinder",
256 ],
257}