blob: 04e9a2d14f5e7d77dc65e36ec867d2868ae74a40 [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",
Jiwen 'Steve' Cai037f35a2018-01-25 19:40:23 -080041 "libbufferhubqueue",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080042 "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",
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",
Alec Mouri989ddbe2020-02-06 09:26:19 -080055 "libstatslog",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080056 "libsync",
Yiwei Zhangd7927052020-01-13 16:05:01 -080057 "libtimestats",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080058 "libui",
Robert Carr720e5062018-07-30 17:45:14 -070059 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080060 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +090061 "libSurfaceFlingerProp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080062 ],
63 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -070064 "libcompositionengine",
Adithya Srinivasanf279e042020-08-17 14:56:27 -070065 "libframetimeline",
Mikael Pessa2e1608f2019-07-19 11:25:35 -070066 "libperfetto_client_experimental",
Peiyong Lincbc184f2018-08-22 13:24:10 -070067 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080068 "libserviceutils",
69 "libtrace_proto",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080070 ],
71 header_libs: [
72 "android.hardware.graphics.composer@2.1-command-buffer",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070073 "android.hardware.graphics.composer@2.2-command-buffer",
Peiyong Lin698147a2018-09-14 13:27:18 -070074 "android.hardware.graphics.composer@2.3-command-buffer",
Peiyong Linafa0f572020-01-13 16:35:02 -080075 "android.hardware.graphics.composer@2.4-command-buffer",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080076 ],
77 export_static_lib_headers: [
Lloyd Pique70d91362018-10-18 16:02:55 -070078 "libcompositionengine",
Peiyong Lincbc184f2018-08-22 13:24:10 -070079 "librenderengine",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080080 "libserviceutils",
81 ],
82 export_shared_lib_headers: [
83 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -080084 "android.hardware.graphics.allocator@3.0",
Valerie Hau9758ae02018-10-09 16:05:09 -070085 "android.hardware.graphics.common@1.2",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080086 "android.hardware.graphics.composer@2.1",
Courtney Goeltzenleuchterf9c98e52018-02-12 07:23:17 -070087 "android.hardware.graphics.composer@2.2",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -070088 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070089 "android.hardware.graphics.composer@2.4",
Michael Wright5d22d4f2018-06-21 02:50:34 +010090 "android.hardware.power@1.3",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080091 "libhidlbase",
Yiwei Zhangd7927052020-01-13 16:05:01 -080092 "libtimestats",
Lloyd Pique66ce40d2018-01-23 16:42:19 -080093 ],
Marissa Wall48586522019-11-19 14:01:36 -080094 // TODO (marissaw): this library is not used by surfaceflinger. This is here so
95 // the library compiled in a way that is accessible to system partition when running
96 // IMapper's VTS.
97 required: ["libgralloctypes"]
Lloyd Pique66ce40d2018-01-23 16:42:19 -080098}
99
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700100cc_defaults {
101 name: "libsurfaceflinger_production_defaults",
102 defaults: ["libsurfaceflinger_defaults"],
103 cflags: [
104 "-fvisibility=hidden",
105 "-fwhole-program-vtables", // requires ThinLTO
106 ],
107 lto: {
108 thin: true,
109 },
Mitch Phillipsc2049af2019-05-14 13:08:29 -0700110 // TODO(b/131771163): Fix broken fuzzer support with LTO.
111 sanitize: {
112 fuzzer: false,
113 },
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700114}
115
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800116cc_library_headers {
117 name: "libsurfaceflinger_headers",
Alex Vakulenko06a76342017-02-01 22:25:44 -0800118 export_include_dirs: ["."],
Logan Chien3ac6c962018-02-27 16:46:00 +0800119 static_libs: ["libserviceutils"],
120 export_static_lib_headers: ["libserviceutils"],
Alex Vakulenko06a76342017-02-01 22:25:44 -0800121}
Kalle Raitaa099a242017-01-11 11:17:29 -0800122
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800123filegroup {
124 name: "libsurfaceflinger_sources",
125 srcs: [
126 "BufferLayer.cpp",
127 "BufferLayerConsumer.cpp",
Marissa Wallfd668622018-05-10 10:21:13 -0700128 "BufferQueueLayer.cpp",
Marissa Wall61c58622018-07-18 10:12:20 -0700129 "BufferStateLayer.cpp",
Marissa Wall947d34e2019-03-29 14:03:53 -0700130 "ClientCache.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800131 "Client.cpp",
Vishnu Nairfa247b12020-02-11 08:58:26 -0800132 "EffectLayer.cpp",
Robert Carrcdf83202018-03-07 12:48:34 -0800133 "ContainerLayer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800134 "DisplayDevice.cpp",
135 "DisplayHardware/ComposerHal.cpp",
Dominik Laskowskie9ef7c42018-03-12 19:34:30 -0700136 "DisplayHardware/DisplayIdentification.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800137 "DisplayHardware/FramebufferSurface.cpp",
138 "DisplayHardware/HWC2.cpp",
139 "DisplayHardware/HWComposer.cpp",
Michael Wright5d22d4f2018-06-21 02:50:34 +0100140 "DisplayHardware/PowerAdvisor.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800141 "DisplayHardware/VirtualDisplaySurface.cpp",
Marin Shalamanovf6b5d182020-06-12 02:08:51 +0200142 "DisplayRenderArea.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800143 "Effects/Daltonizer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800144 "EventLog/EventLog.cpp",
Mikael Pessa90092f42019-08-26 17:22:04 -0700145 "FrameTracer/FrameTracer.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800146 "FrameTracker.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800147 "Layer.cpp",
148 "LayerProtoHelper.cpp",
149 "LayerRejecter.cpp",
Marin Shalamanovf6b5d182020-06-12 02:08:51 +0200150 "LayerRenderArea.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800151 "LayerVector.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800152 "MonitoredProducer.cpp",
Lloyd Pique22098362018-09-13 11:46:49 -0700153 "NativeWindowSurface.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700154 "RefreshRateOverlay.cpp",
Dan Stozaec460082018-12-17 15:35:09 -0800155 "RegionSamplingThread.cpp",
Ady Abraham03b02dd2019-03-21 15:40:11 -0700156 "RenderArea.cpp",
Ana Krulec241cf832018-08-10 15:03:23 -0700157 "Scheduler/DispSyncSource.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700158 "Scheduler/EventThread.cpp",
Ana Krulecf2c006d2019-06-21 15:37:07 -0700159 "Scheduler/OneShotTimer.cpp",
Ana Krulec61f86db2018-11-19 14:16:35 +0100160 "Scheduler/LayerHistory.cpp",
Ady Abraham8a82ba62020-01-17 12:43:17 -0800161 "Scheduler/LayerHistoryV2.cpp",
Ady Abraham09bd3922019-04-08 10:44:56 -0700162 "Scheduler/LayerInfo.cpp",
Ady Abraham8a82ba62020-01-17 12:43:17 -0800163 "Scheduler/LayerInfoV2.cpp",
Ana Krulecfefcb582018-08-07 14:22:37 -0700164 "Scheduler/MessageQueue.cpp",
Ady Abrahamb4b1e0a2019-11-20 18:25:35 -0800165 "Scheduler/RefreshRateConfigs.cpp",
Ana Krulec98b5b242018-08-10 15:03:23 -0700166 "Scheduler/Scheduler.cpp",
Ana Krulec434c22d2018-11-28 13:48:36 +0100167 "Scheduler/SchedulerUtils.cpp",
Kevin DuBoiscc27b502019-11-13 09:40:07 -0800168 "Scheduler/Timer.cpp",
Kevin DuBois1678e2c2019-08-22 12:26:24 -0700169 "Scheduler/VSyncDispatchTimerQueue.cpp",
170 "Scheduler/VSyncPredictor.cpp",
Dominik Laskowskia93a5312020-07-23 15:10:03 -0700171 "Scheduler/VsyncModulator.cpp",
Kevin DuBoisb2501ba2019-11-12 14:20:29 -0800172 "Scheduler/VSyncReactor.cpp",
Ady Abrahamc581d3c2020-08-06 17:34:27 -0700173 "Scheduler/VsyncConfiguration.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800174 "StartPropertySetThread.cpp",
175 "SurfaceFlinger.cpp",
Lloyd Pique24f3bfe2019-10-02 19:29:10 -0700176 "SurfaceFlingerDefaultFactory.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800177 "SurfaceInterceptor.cpp",
178 "SurfaceTracing.cpp",
Marissa Walle2ffb422018-10-12 11:33:52 -0700179 "TransactionCompletedThread.cpp",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800180 ],
181}
182
John Reck8b1ae3f2020-09-10 17:01:09 +0000183cc_defaults {
184 name: "libsurfaceflinger_binary",
185 defaults: [
186 "surfaceflinger_defaults",
187 "libsurfaceflinger_production_defaults",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800188 ],
mamik94e91f62019-08-19 09:11:33 -0700189 cflags: [
John Reck8b1ae3f2020-09-10 17:01:09 +0000190 "-DLOG_TAG=\"SurfaceFlinger\"",
mamik94e91f62019-08-19 09:11:33 -0700191 ],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800192 shared_libs: [
193 "android.frameworks.displayservice@1.0",
194 "android.hardware.configstore-utils",
195 "android.hardware.configstore@1.0",
196 "android.hardware.graphics.allocator@2.0",
Marissa Wall925bf7f2018-12-29 14:27:11 -0800197 "android.hardware.graphics.allocator@3.0",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800198 "libbinder",
199 "libcutils",
200 "libdisplayservicehidl",
201 "libhidlbase",
Robert Carr720e5062018-07-30 17:45:14 -0700202 "libinput",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800203 "liblayers_proto",
204 "liblog",
Suren Baghdasaryancd829052018-11-02 19:15:37 -0700205 "libprocessgroup",
Alec Mouri0a9c7b82018-11-16 13:05:25 -0800206 "libsync",
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800207 "libutils",
208 ],
209 static_libs: [
210 "libserviceutils",
211 "libtrace_proto",
212 ],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700213}
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800214
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700215filegroup {
216 name: "surfaceflinger_binary_sources",
John Reck8b1ae3f2020-09-10 17:01:09 +0000217 srcs: [
218 ":libsurfaceflinger_sources",
Lloyd Piqued777be42020-09-11 15:38:53 -0700219 "main_surfaceflinger.cpp",
John Reck8b1ae3f2020-09-10 17:01:09 +0000220 ],
Lloyd Piqueea0a5fb2018-09-12 15:04:56 -0700221}
222
223cc_binary {
224 name: "surfaceflinger",
225 defaults: ["libsurfaceflinger_binary"],
226 init_rc: ["surfaceflinger.rc"],
Lloyd Piqued777be42020-09-11 15:38:53 -0700227 srcs: [
228 ":surfaceflinger_binary_sources",
229 // Note: SurfaceFlingerFactory is not in the filegroup so that it
230 // can be easily replaced.
231 "SurfaceFlingerFactory.cpp",
232 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900233 shared_libs: [
Inseob Kimd6e835b2019-02-14 12:33:30 +0900234 "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900235 ],
Alec Mouri0a9bc472020-09-10 18:03:43 -0700236
237 logtags: ["EventLog/EventLogTags.logtags"],
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800238}
239
Lloyd Pique66ce40d2018-01-23 16:42:19 -0800240subdirs = [
241 "layerproto",
242 "tests",
243]
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900244
245cc_library_shared {
Inseob Kimd6e835b2019-02-14 12:33:30 +0900246 name: "libSurfaceFlingerProp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900247 srcs: [
248 "SurfaceFlingerProperties.cpp",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900249 ],
250 shared_libs: [
251 "android.hardware.configstore-utils",
252 "android.hardware.configstore@1.0",
253 "android.hardware.configstore@1.1",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900254 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900255 "libhidlbase",
Sundong Ahncb20cca2019-02-22 11:57:38 +0900256 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900257 "libutils",
Inseob Kimd6e835b2019-02-14 12:33:30 +0900258 "liblog",
259 ],
260 static_libs: [
261 "SurfaceFlingerProperties",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900262 ],
263 export_shared_lib_headers: [
Sundong Ahncb20cca2019-02-22 11:57:38 +0900264 "android.hardware.graphics.common@1.2",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900265 "libhidlbase",
Sundong Ahn204fb1f2020-04-23 21:56:36 +0900266 "libui",
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900267 ],
Inseob Kimd6e835b2019-02-14 12:33:30 +0900268 export_static_lib_headers: [
269 "SurfaceFlingerProperties",
270 ],
Sundong Ahnd5e08f62018-12-12 20:27:28 +0900271}