blob: ed0d75b17611a5c1f3a3ee1f592788048a211f1e [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",
Ady Abrahamb0dbdaa2020-01-06 16:19:42 -080010 "-Wconversion",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080011 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080012}
13
14cc_defaults {
15 name: "libsurfaceflinger_defaults",
John Reck67b1e2b2020-08-26 13:17:24 -070016 defaults: [
17 "surfaceflinger_defaults",
18 "skia_deps",
19 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080020 cflags: [
Lloyd Pique70d91362018-10-18 16:02:55 -070021 "-DLOG_TAG=\"SurfaceFlinger\"",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080022 "-DGL_GLEXT_PROTOTYPES",
23 "-DEGL_EGLEXT_PROTOTYPES",
24 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080025 shared_libs: [
Lloyd Pique66ce40d2018-01-23 16:42:19 -080026 "android.hardware.configstore-utils",
27 "android.hardware.configstore@1.0",
Iris Chang7501ed62018-04-30 14:45:42 +080028 "android.hardware.configstore@1.1",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080029 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080030 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070031 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080032 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070033 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070034 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070035 "android.hardware.graphics.composer@2.4",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080036 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010037 "android.hardware.power@1.3",
Dan Stoza030fbc12020-02-19 15:32:01 -080038 "android.hardware.power-cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080039 "libbase",
40 "libbinder",
41 "libcutils",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080042 "libEGL",
43 "libfmq",
44 "libGLESv1_CM",
45 "libGLESv2",
46 "libgui",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080047 "libhidlbase",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080048 "liblayers_proto",
49 "liblog",
Inseob Kimd6e835b2019-02-14 12:33:30 +090050 "libnativewindow",
Suren Baghdasaryancd829052018-11-02 19:15:37 -070051 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080052 "libprotobuf-cpp-lite",
Alec Mouri989ddbe2020-02-06 09:26:19 -080053 "libstatslog",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080054 "libsync",
Yiwei Zhangd7927052020-01-13 16:05:01 -080055 "libtimestats",
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",
Inseob Kimd6e835b2019-02-14 12:33:30 +090059 "libSurfaceFlingerProp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080060 ],
61 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070062 "libcompositionengine",
Adithya Srinivasanf279e042020-08-17 14:56:27 -070063 "libframetimeline",
Mikael Pessa2e1608f2019-07-19 11:25:35 -070064 "libperfetto_client_experimental",
Peiyong Lincbc184f2018-08-22 13:24:10 -070065 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080066 "libserviceutils",
67 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080068 ],
69 header_libs: [
70 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070071 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070072 "android.hardware.graphics.composer@2.3-command-buffer",
Peiyong Linafa0f572020-01-13 16:35:02 -080073 "android.hardware.graphics.composer@2.4-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",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070087 "android.hardware.graphics.composer@2.4",
Michael Wright5d22d4f2018-06-21 02:50:34 +010088 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080089 "libhidlbase",
Yiwei Zhangd7927052020-01-13 16:05:01 -080090 "libtimestats",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080091 ],
Marissa Wall48586522019-11-19 14:01:36 -080092 // TODO (marissaw): this library is not used by surfaceflinger. This is here so
93 // the library compiled in a way that is accessible to system partition when running
94 // IMapper's VTS.
95 required: ["libgralloctypes"]
Lloyd Pique66ce40d2018-01-23 16:42:19 -080096}
97
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070098cc_defaults {
99 name: "libsurfaceflinger_production_defaults",
100 defaults: ["libsurfaceflinger_defaults"],
101 cflags: [
102 "-fvisibility=hidden",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700103 ],
104 lto: {
105 thin: true,
106 },
Yi Kongbf2aa782020-09-21 01:25:16 +0800107 whole_program_vtables: true, // Requires ThinLTO
Mitch Phillipsc2049af2019-05-14 13:08:29 -0700108 // TODO(b/131771163): Fix broken fuzzer support with LTO.
109 sanitize: {
110 fuzzer: false,
111 },
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700112}
113
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800114cc_library_headers {
115 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800116 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800117 static_libs: ["libserviceutils"],
118 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800119}
Kalle Raitaa099a242017-01-11 11:17:29 -0800120
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800121filegroup {
122 name: "libsurfaceflinger_sources",
123 srcs: [
124 "BufferLayer.cpp",
125 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700126 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700127 "BufferStateLayer.cpp",
Marissa Wall947d34e2019-03-29 14:03:53 -0700128 "ClientCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800129 "Client.cpp",
Vishnu Nairfa247b12020-02-11 08:58:26 -0800130 "EffectLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800131 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800132 "DisplayDevice.cpp",
133 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700134 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800135 "DisplayHardware/FramebufferSurface.cpp",
136 "DisplayHardware/HWC2.cpp",
137 "DisplayHardware/HWComposer.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100138 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800139 "DisplayHardware/VirtualDisplaySurface.cpp",
Marin Shalamanovf6b5d182020-06-12 02:08:51 +0200140 "DisplayRenderArea.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800141 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 "EventLog/EventLog.cpp",
Mikael Pessa90092f42019-08-26 17:22:04 -0700143 "FrameTracer/FrameTracer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800144 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800145 "Layer.cpp",
146 "LayerProtoHelper.cpp",
147 "LayerRejecter.cpp",
Marin Shalamanovf6b5d182020-06-12 02:08:51 +0200148 "LayerRenderArea.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800149 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800150 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700151 "NativeWindowSurface.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700152 "RefreshRateOverlay.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800153 "RegionSamplingThread.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700154 "RenderArea.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700155 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700156 "Scheduler/EventThread.cpp",
Ana Krulecf2c006d2019-06-21 15:37:07 -0700157 "Scheduler/OneShotTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100158 "Scheduler/LayerHistory.cpp",
Ady Abraham8a82ba62020-01-17 12:43:17 -0800159 "Scheduler/LayerHistoryV2.cpp",
Ady Abraham09bd3922019-04-08 10:44:56 -0700160 "Scheduler/LayerInfo.cpp",
Ady Abraham8a82ba62020-01-17 12:43:17 -0800161 "Scheduler/LayerInfoV2.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700162 "Scheduler/MessageQueue.cpp",
Ady Abrahamb4b1e0a2019-11-20 18:25:35 -0800163 "Scheduler/RefreshRateConfigs.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700164 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100165 "Scheduler/SchedulerUtils.cpp",
Kevin DuBoiscc27b502019-11-13 09:40:07 -0800166 "Scheduler/Timer.cpp",
Kevin DuBois1678e2c2019-08-22 12:26:24 -0700167 "Scheduler/VSyncDispatchTimerQueue.cpp",
168 "Scheduler/VSyncPredictor.cpp",
Dominik Laskowskia93a5312020-07-23 15:10:03 -0700169 "Scheduler/VsyncModulator.cpp",
Kevin DuBoisb2501ba2019-11-12 14:20:29 -0800170 "Scheduler/VSyncReactor.cpp",
Ady Abrahamc581d3c2020-08-06 17:34:27 -0700171 "Scheduler/VsyncConfiguration.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800172 "StartPropertySetThread.cpp",
173 "SurfaceFlinger.cpp",
Lloyd Pique24f3bfe2019-10-02 19:29:10 -0700174 "SurfaceFlingerDefaultFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800175 "SurfaceInterceptor.cpp",
176 "SurfaceTracing.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700177 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800178 ],
179}
180
John Reck8b1ae3f2020-09-10 17:01:09 +0000181cc_defaults {
182 name: "libsurfaceflinger_binary",
183 defaults: [
184 "surfaceflinger_defaults",
185 "libsurfaceflinger_production_defaults",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800186 ],
mamik94e91f62019-08-19 09:11:33 -0700187 cflags: [
John Reck8b1ae3f2020-09-10 17:01:09 +0000188 "-DLOG_TAG=\"SurfaceFlinger\"",
mamik94e91f62019-08-19 09:11:33 -0700189 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800190 shared_libs: [
191 "android.frameworks.displayservice@1.0",
192 "android.hardware.configstore-utils",
193 "android.hardware.configstore@1.0",
194 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800195 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800196 "libbinder",
197 "libcutils",
198 "libdisplayservicehidl",
199 "libhidlbase",
Robert Carr720e5062018-07-30 17:45:14 -0700200 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800201 "liblayers_proto",
202 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700203 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800204 "libsync",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800205 "libutils",
206 ],
207 static_libs: [
208 "libserviceutils",
209 "libtrace_proto",
210 ],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700211}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800212
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700213filegroup {
214 name: "surfaceflinger_binary_sources",
John Reck8b1ae3f2020-09-10 17:01:09 +0000215 srcs: [
216 ":libsurfaceflinger_sources",
Lloyd Piqued777be42020-09-11 15:38:53 -0700217 "main_surfaceflinger.cpp",
John Reck8b1ae3f2020-09-10 17:01:09 +0000218 ],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700219}
220
221cc_binary {
222 name: "surfaceflinger",
223 defaults: ["libsurfaceflinger_binary"],
224 init_rc: ["surfaceflinger.rc"],
Lloyd Piqued777be42020-09-11 15:38:53 -0700225 srcs: [
226 ":surfaceflinger_binary_sources",
227 // Note: SurfaceFlingerFactory is not in the filegroup so that it
228 // can be easily replaced.
229 "SurfaceFlingerFactory.cpp",
230 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900231 shared_libs: [
Inseob Kimd6e835b2019-02-14 12:33:30 +0900232 "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900233 ],
Alec Mouri0a9bc472020-09-10 18:03:43 -0700234
235 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800236}
237
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800238subdirs = [
239 "layerproto",
240 "tests",
241]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900242
243cc_library_shared {
Inseob Kimd6e835b2019-02-14 12:33:30 +0900244 name: "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900245 srcs: [
246 "SurfaceFlingerProperties.cpp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900247 ],
248 shared_libs: [
249 "android.hardware.configstore-utils",
250 "android.hardware.configstore@1.0",
251 "android.hardware.configstore@1.1",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900252 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900253 "libhidlbase",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900254 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900255 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900256 "liblog",
257 ],
258 static_libs: [
259 "SurfaceFlingerProperties",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900260 ],
261 export_shared_lib_headers: [
Sundong Ahncb20cca2019-02-22 11:57:38 +0900262 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900263 "libhidlbase",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900264 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900265 ],
Inseob Kimd6e835b2019-02-14 12:33:30 +0900266 export_static_lib_headers: [
267 "SurfaceFlingerProperties",
268 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900269}