blob: 8d1258a71324b4e238bab0bfb3113582481851e3 [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",
Marin Shalamanovbed7fd32020-12-21 20:02:20 +01006 "-Wextra",
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",
Ady Abrahamb0dbdaa2020-01-06 16:19:42 -080011 "-Wconversion",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080012 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080013}
14
15cc_defaults {
16 name: "libsurfaceflinger_defaults",
John Reck67b1e2b2020-08-26 13:17:24 -070017 defaults: [
18 "surfaceflinger_defaults",
19 "skia_deps",
20 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080021 cflags: [
Lloyd Pique70d91362018-10-18 16:02:55 -070022 "-DLOG_TAG=\"SurfaceFlinger\"",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080023 "-DGL_GLEXT_PROTOTYPES",
24 "-DEGL_EGLEXT_PROTOTYPES",
25 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -080026 shared_libs: [
Lloyd Pique66ce40d2018-01-23 16:42:19 -080027 "android.hardware.configstore-utils",
28 "android.hardware.configstore@1.0",
Iris Chang7501ed62018-04-30 14:45:42 +080029 "android.hardware.configstore@1.1",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080030 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080031 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070032 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080033 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070034 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070035 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070036 "android.hardware.graphics.composer@2.4",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080037 "android.hardware.power@1.0",
Michael Wright5d22d4f2018-06-21 02:50:34 +010038 "android.hardware.power@1.3",
Jeongik Cha830c5002021-01-28 00:49:48 +090039 "android.hardware.power-V1-cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080040 "libbase",
41 "libbinder",
42 "libcutils",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080043 "libEGL",
44 "libfmq",
45 "libGLESv1_CM",
46 "libGLESv2",
47 "libgui",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080048 "libhidlbase",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080049 "liblayers_proto",
50 "liblog",
Inseob Kimd6e835b2019-02-14 12:33:30 +090051 "libnativewindow",
Suren Baghdasaryancd829052018-11-02 19:15:37 -070052 "libprocessgroup",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080053 "libprotobuf-cpp-lite",
Alec Mouri989ddbe2020-02-06 09:26:19 -080054 "libstatslog",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080055 "libsync",
Yiwei Zhangd7927052020-01-13 16:05:01 -080056 "libtimestats",
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",
Inseob Kimd6e835b2019-02-14 12:33:30 +090060 "libSurfaceFlingerProp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080061 ],
62 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070063 "libcompositionengine",
Adithya Srinivasanf279e042020-08-17 14:56:27 -070064 "libframetimeline",
Mikael Pessa2e1608f2019-07-19 11:25:35 -070065 "libperfetto_client_experimental",
Peiyong Lincbc184f2018-08-22 13:24:10 -070066 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080067 "libserviceutils",
68 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080069 ],
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",
Peiyong Linafa0f572020-01-13 16:35:02 -080074 "android.hardware.graphics.composer@2.4-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080075 ],
76 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070077 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070078 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080079 "libserviceutils",
80 ],
81 export_shared_lib_headers: [
82 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080083 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070084 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080085 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070086 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070087 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070088 "android.hardware.graphics.composer@2.4",
Michael Wright5d22d4f2018-06-21 02:50:34 +010089 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080090 "libhidlbase",
Yiwei Zhangd7927052020-01-13 16:05:01 -080091 "libtimestats",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080092 ],
Marissa Wall48586522019-11-19 14:01:36 -080093 // TODO (marissaw): this library is not used by surfaceflinger. This is here so
94 // the library compiled in a way that is accessible to system partition when running
95 // IMapper's VTS.
96 required: ["libgralloctypes"]
Lloyd Pique66ce40d2018-01-23 16:42:19 -080097}
98
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -070099cc_defaults {
100 name: "libsurfaceflinger_production_defaults",
101 defaults: ["libsurfaceflinger_defaults"],
102 cflags: [
103 "-fvisibility=hidden",
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700104 ],
105 lto: {
106 thin: true,
107 },
Yi Kongbf2aa782020-09-21 01:25:16 +0800108 whole_program_vtables: true, // Requires ThinLTO
Mitch Phillipsc2049af2019-05-14 13:08:29 -0700109 // TODO(b/131771163): Fix broken fuzzer support with LTO.
110 sanitize: {
111 fuzzer: false,
112 },
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700113}
114
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800115cc_library_headers {
116 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800117 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800118 static_libs: ["libserviceutils"],
119 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800120}
Kalle Raitaa099a242017-01-11 11:17:29 -0800121
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800122filegroup {
123 name: "libsurfaceflinger_sources",
124 srcs: [
125 "BufferLayer.cpp",
126 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700127 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700128 "BufferStateLayer.cpp",
Marissa Wall947d34e2019-03-29 14:03:53 -0700129 "ClientCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800130 "Client.cpp",
Vishnu Nairfa247b12020-02-11 08:58:26 -0800131 "EffectLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800132 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800133 "DisplayDevice.cpp",
134 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700135 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800136 "DisplayHardware/FramebufferSurface.cpp",
137 "DisplayHardware/HWC2.cpp",
138 "DisplayHardware/HWComposer.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100139 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800140 "DisplayHardware/VirtualDisplaySurface.cpp",
Marin Shalamanovf6b5d182020-06-12 02:08:51 +0200141 "DisplayRenderArea.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800142 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800143 "EventLog/EventLog.cpp",
Mikael Pessa90092f42019-08-26 17:22:04 -0700144 "FrameTracer/FrameTracer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800145 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800146 "Layer.cpp",
147 "LayerProtoHelper.cpp",
148 "LayerRejecter.cpp",
Marin Shalamanovf6b5d182020-06-12 02:08:51 +0200149 "LayerRenderArea.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800150 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800151 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700152 "NativeWindowSurface.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700153 "RefreshRateOverlay.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800154 "RegionSamplingThread.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700155 "RenderArea.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700156 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700157 "Scheduler/EventThread.cpp",
Ana Krulecf2c006d2019-06-21 15:37:07 -0700158 "Scheduler/OneShotTimer.cpp",
Marin Shalamanov1bc43ee2020-11-20 16:56:52 +0100159 "Scheduler/LayerHistory.cpp",
160 "Scheduler/LayerInfo.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700161 "Scheduler/MessageQueue.cpp",
Ady Abrahamb4b1e0a2019-11-20 18:25:35 -0800162 "Scheduler/RefreshRateConfigs.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700163 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100164 "Scheduler/SchedulerUtils.cpp",
Kevin DuBoiscc27b502019-11-13 09:40:07 -0800165 "Scheduler/Timer.cpp",
Kevin DuBois1678e2c2019-08-22 12:26:24 -0700166 "Scheduler/VSyncDispatchTimerQueue.cpp",
167 "Scheduler/VSyncPredictor.cpp",
Dominik Laskowskia93a5312020-07-23 15:10:03 -0700168 "Scheduler/VsyncModulator.cpp",
Kevin DuBoisb2501ba2019-11-12 14:20:29 -0800169 "Scheduler/VSyncReactor.cpp",
Ady Abrahamc581d3c2020-08-06 17:34:27 -0700170 "Scheduler/VsyncConfiguration.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800171 "StartPropertySetThread.cpp",
172 "SurfaceFlinger.cpp",
Lloyd Pique24f3bfe2019-10-02 19:29:10 -0700173 "SurfaceFlingerDefaultFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800174 "SurfaceInterceptor.cpp",
175 "SurfaceTracing.cpp",
Robert Carr9a803c32021-01-14 16:57:58 -0800176 "TransactionCallbackInvoker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800177 ],
178}
179
John Reck8b1ae3f2020-09-10 17:01:09 +0000180cc_defaults {
181 name: "libsurfaceflinger_binary",
182 defaults: [
183 "surfaceflinger_defaults",
184 "libsurfaceflinger_production_defaults",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800185 ],
mamik94e91f62019-08-19 09:11:33 -0700186 cflags: [
John Reck8b1ae3f2020-09-10 17:01:09 +0000187 "-DLOG_TAG=\"SurfaceFlinger\"",
mamik94e91f62019-08-19 09:11:33 -0700188 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800189 shared_libs: [
190 "android.frameworks.displayservice@1.0",
191 "android.hardware.configstore-utils",
192 "android.hardware.configstore@1.0",
193 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800194 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800195 "libbinder",
196 "libcutils",
197 "libdisplayservicehidl",
198 "libhidlbase",
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",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800204 "libutils",
205 ],
206 static_libs: [
207 "libserviceutils",
208 "libtrace_proto",
209 ],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700210}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800211
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700212filegroup {
213 name: "surfaceflinger_binary_sources",
John Reck8b1ae3f2020-09-10 17:01:09 +0000214 srcs: [
215 ":libsurfaceflinger_sources",
Lloyd Piqued777be42020-09-11 15:38:53 -0700216 "main_surfaceflinger.cpp",
John Reck8b1ae3f2020-09-10 17:01:09 +0000217 ],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700218}
219
220cc_binary {
221 name: "surfaceflinger",
222 defaults: ["libsurfaceflinger_binary"],
223 init_rc: ["surfaceflinger.rc"],
Lloyd Piqued777be42020-09-11 15:38:53 -0700224 srcs: [
225 ":surfaceflinger_binary_sources",
226 // Note: SurfaceFlingerFactory is not in the filegroup so that it
227 // can be easily replaced.
228 "SurfaceFlingerFactory.cpp",
229 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900230 shared_libs: [
Inseob Kimd6e835b2019-02-14 12:33:30 +0900231 "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900232 ],
Alec Mouri0a9bc472020-09-10 18:03:43 -0700233
234 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800235}
236
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800237subdirs = [
238 "layerproto",
239 "tests",
240]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900241
242cc_library_shared {
Inseob Kimd6e835b2019-02-14 12:33:30 +0900243 name: "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900244 srcs: [
245 "SurfaceFlingerProperties.cpp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900246 ],
247 shared_libs: [
248 "android.hardware.configstore-utils",
249 "android.hardware.configstore@1.0",
250 "android.hardware.configstore@1.1",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900251 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900252 "libhidlbase",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900253 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900254 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900255 "liblog",
256 ],
257 static_libs: [
258 "SurfaceFlingerProperties",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900259 ],
260 export_shared_lib_headers: [
Sundong Ahncb20cca2019-02-22 11:57:38 +0900261 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900262 "libhidlbase",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900263 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900264 ],
Inseob Kimd6e835b2019-02-14 12:33:30 +0900265 export_static_lib_headers: [
266 "SurfaceFlingerProperties",
267 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900268}