Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "surfaceflinger_defaults", |
| 3 | cflags: [ |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 4 | "-Wall", |
| 5 | "-Werror", |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 6 | "-Wformat", |
Lloyd Pique | 755e319 | 2018-01-31 16:46:15 -0800 | [diff] [blame] | 7 | "-Wthread-safety", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 8 | "-Wunused", |
| 9 | "-Wunreachable-code", |
| 10 | ], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | cc_defaults { |
| 14 | name: "libsurfaceflinger_defaults", |
| 15 | defaults: ["surfaceflinger_defaults"], |
| 16 | cflags: [ |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 17 | "-DLOG_TAG=\"SurfaceFlinger\"", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 18 | "-DGL_GLEXT_PROTOTYPES", |
| 19 | "-DEGL_EGLEXT_PROTOTYPES", |
| 20 | ], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 21 | shared_libs: [ |
| 22 | "android.frameworks.vr.composer@1.0", |
| 23 | "android.hardware.configstore-utils", |
| 24 | "android.hardware.configstore@1.0", |
Iris Chang | 7501ed6 | 2018-04-30 14:45:42 +0800 | [diff] [blame] | 25 | "android.hardware.configstore@1.1", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 26 | "android.hardware.graphics.allocator@2.0", |
Marissa Wall | 925bf7f | 2018-12-29 14:27:11 -0800 | [diff] [blame] | 27 | "android.hardware.graphics.allocator@3.0", |
Valerie Hau | 9758ae0 | 2018-10-09 16:05:09 -0700 | [diff] [blame] | 28 | "android.hardware.graphics.common@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 29 | "android.hardware.graphics.composer@2.1", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 30 | "android.hardware.graphics.composer@2.2", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 31 | "android.hardware.graphics.composer@2.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 32 | "android.hardware.power@1.0", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 33 | "android.hardware.power@1.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 34 | "libbase", |
| 35 | "libbinder", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 36 | "libbufferhubqueue", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 37 | "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", |
Valerie Hau | e9e843a | 2018-12-18 13:39:23 -0800 | [diff] [blame] | 50 | "libnativewindow", |
Jiwen 'Steve' Cai | 037f35a | 2018-01-25 19:40:23 -0800 | [diff] [blame] | 51 | "libpdx_default_transport", |
Suren Baghdasaryan | cd82905 | 2018-11-02 19:15:37 -0700 | [diff] [blame] | 52 | "libprocessgroup", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 53 | "libprotobuf-cpp-lite", |
| 54 | "libsync", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 55 | "libtimestats_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 56 | "libui", |
Robert Carr | 720e506 | 2018-07-30 17:45:14 -0700 | [diff] [blame] | 57 | "libinput", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 58 | "libutils", |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 59 | "libSurfaceFlingerProperties", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 60 | ], |
| 61 | static_libs: [ |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 62 | "libcompositionengine", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 63 | "librenderengine", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 64 | "libserviceutils", |
| 65 | "libtrace_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 66 | "libvr_manager", |
| 67 | "libvrflinger", |
| 68 | ], |
| 69 | header_libs: [ |
| 70 | "android.hardware.graphics.composer@2.1-command-buffer", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 71 | "android.hardware.graphics.composer@2.2-command-buffer", |
Peiyong Lin | 698147a | 2018-09-14 13:27:18 -0700 | [diff] [blame] | 72 | "android.hardware.graphics.composer@2.3-command-buffer", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 73 | ], |
| 74 | export_static_lib_headers: [ |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 75 | "libcompositionengine", |
Peiyong Lin | cbc184f | 2018-08-22 13:24:10 -0700 | [diff] [blame] | 76 | "librenderengine", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 77 | "libserviceutils", |
| 78 | ], |
| 79 | export_shared_lib_headers: [ |
| 80 | "android.hardware.graphics.allocator@2.0", |
Marissa Wall | 925bf7f | 2018-12-29 14:27:11 -0800 | [diff] [blame] | 81 | "android.hardware.graphics.allocator@3.0", |
Valerie Hau | 9758ae0 | 2018-10-09 16:05:09 -0700 | [diff] [blame] | 82 | "android.hardware.graphics.common@1.2", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 83 | "android.hardware.graphics.composer@2.1", |
Courtney Goeltzenleuchter | f9c98e5 | 2018-02-12 07:23:17 -0700 | [diff] [blame] | 84 | "android.hardware.graphics.composer@2.2", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 85 | "android.hardware.graphics.composer@2.3", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 86 | "android.hardware.power@1.3", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 87 | "libhidlbase", |
| 88 | "libhidltransport", |
| 89 | "libhwbinder", |
| 90 | ], |
| 91 | } |
| 92 | |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 93 | cc_defaults { |
| 94 | name: "libsurfaceflinger_production_defaults", |
| 95 | defaults: ["libsurfaceflinger_defaults"], |
| 96 | cflags: [ |
| 97 | "-fvisibility=hidden", |
| 98 | "-fwhole-program-vtables", // requires ThinLTO |
| 99 | ], |
| 100 | lto: { |
| 101 | thin: true, |
| 102 | }, |
| 103 | } |
| 104 | |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 105 | cc_library_headers { |
| 106 | name: "libsurfaceflinger_headers", |
Alex Vakulenko | 06a7634 | 2017-02-01 22:25:44 -0800 | [diff] [blame] | 107 | export_include_dirs: ["."], |
Logan Chien | 3ac6c96 | 2018-02-27 16:46:00 +0800 | [diff] [blame] | 108 | static_libs: ["libserviceutils"], |
| 109 | export_static_lib_headers: ["libserviceutils"], |
Alex Vakulenko | 06a7634 | 2017-02-01 22:25:44 -0800 | [diff] [blame] | 110 | } |
Kalle Raita | a099a24 | 2017-01-11 11:17:29 -0800 | [diff] [blame] | 111 | |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 112 | filegroup { |
| 113 | name: "libsurfaceflinger_sources", |
| 114 | srcs: [ |
| 115 | "BufferLayer.cpp", |
| 116 | "BufferLayerConsumer.cpp", |
Marissa Wall | fd66862 | 2018-05-10 10:21:13 -0700 | [diff] [blame] | 117 | "BufferQueueLayer.cpp", |
Marissa Wall | 61c5862 | 2018-07-18 10:12:20 -0700 | [diff] [blame] | 118 | "BufferStateLayer.cpp", |
Marissa Wall | ebc2c05 | 2019-01-16 19:16:55 -0800 | [diff] [blame] | 119 | "BufferStateLayerCache.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 120 | "Client.cpp", |
| 121 | "ColorLayer.cpp", |
Robert Carr | cdf8320 | 2018-03-07 12:48:34 -0800 | [diff] [blame] | 122 | "ContainerLayer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 123 | "DisplayDevice.cpp", |
| 124 | "DisplayHardware/ComposerHal.cpp", |
Dominik Laskowski | e9ef7c4 | 2018-03-12 19:34:30 -0700 | [diff] [blame] | 125 | "DisplayHardware/DisplayIdentification.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 126 | "DisplayHardware/FramebufferSurface.cpp", |
| 127 | "DisplayHardware/HWC2.cpp", |
| 128 | "DisplayHardware/HWComposer.cpp", |
Michael Wright | 5d22d4f | 2018-06-21 02:50:34 +0100 | [diff] [blame] | 129 | "DisplayHardware/PowerAdvisor.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 130 | "DisplayHardware/VirtualDisplaySurface.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 131 | "Effects/Daltonizer.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 132 | "EventLog/EventLog.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 133 | "FrameTracker.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 134 | "Layer.cpp", |
| 135 | "LayerProtoHelper.cpp", |
| 136 | "LayerRejecter.cpp", |
Yiwei Zhang | 7124ad3 | 2018-02-21 13:02:45 -0800 | [diff] [blame] | 137 | "LayerStats.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 138 | "LayerVector.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 139 | "MonitoredProducer.cpp", |
Lloyd Pique | 2209836 | 2018-09-13 11:46:49 -0700 | [diff] [blame] | 140 | "NativeWindowSurface.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 141 | "RenderArea.cpp", |
Dan Stoza | ec46008 | 2018-12-17 15:35:09 -0800 | [diff] [blame] | 142 | "RegionSamplingThread.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 143 | "Scheduler/DispSync.cpp", |
Ana Krulec | 241cf83 | 2018-08-10 15:03:23 -0700 | [diff] [blame] | 144 | "Scheduler/DispSyncSource.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 145 | "Scheduler/EventControlThread.cpp", |
| 146 | "Scheduler/EventThread.cpp", |
Ana Krulec | fb77282 | 2018-11-30 10:44:07 +0100 | [diff] [blame] | 147 | "Scheduler/IdleTimer.cpp", |
Ana Krulec | 61f86db | 2018-11-19 14:16:35 +0100 | [diff] [blame] | 148 | "Scheduler/LayerHistory.cpp", |
Ana Krulec | fefcb58 | 2018-08-07 14:22:37 -0700 | [diff] [blame] | 149 | "Scheduler/MessageQueue.cpp", |
Ana Krulec | 98b5b24 | 2018-08-10 15:03:23 -0700 | [diff] [blame] | 150 | "Scheduler/Scheduler.cpp", |
Ana Krulec | 434c22d | 2018-11-28 13:48:36 +0100 | [diff] [blame] | 151 | "Scheduler/SchedulerUtils.cpp", |
Ana Krulec | 757f63a | 2019-01-25 10:46:18 -0800 | [diff] [blame] | 152 | "Scheduler/PhaseOffsets.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 153 | "StartPropertySetThread.cpp", |
| 154 | "SurfaceFlinger.cpp", |
| 155 | "SurfaceInterceptor.cpp", |
| 156 | "SurfaceTracing.cpp", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 157 | "TimeStats/TimeStats.cpp", |
Marissa Wall | e2ffb42 | 2018-10-12 11:33:52 -0700 | [diff] [blame] | 158 | "TransactionCompletedThread.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 159 | ], |
| 160 | } |
| 161 | |
| 162 | cc_library_shared { |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 163 | // Please use libsurfaceflinger_defaults to configure how the sources are |
| 164 | // built, so the same settings can be used elsewhere. |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 165 | name: "libsurfaceflinger", |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 166 | defaults: ["libsurfaceflinger_production_defaults"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 167 | srcs: [ |
| 168 | ":libsurfaceflinger_sources", |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 169 | |
| 170 | // Note: SurfaceFlingerFactory is not in the default sources so that it |
| 171 | // can be easily replaced. |
| 172 | "SurfaceFlingerFactory.cpp", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 173 | ], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 174 | logtags: ["EventLog/EventLogTags.logtags"], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 175 | } |
| 176 | |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 177 | cc_defaults { |
| 178 | name: "libsurfaceflinger_binary", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 179 | defaults: ["surfaceflinger_defaults"], |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 180 | cflags: [ |
| 181 | "-DLOG_TAG=\"SurfaceFlinger\"", |
| 182 | ], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 183 | whole_static_libs: [ |
| 184 | "libsigchain", |
| 185 | ], |
| 186 | shared_libs: [ |
| 187 | "android.frameworks.displayservice@1.0", |
| 188 | "android.hardware.configstore-utils", |
| 189 | "android.hardware.configstore@1.0", |
| 190 | "android.hardware.graphics.allocator@2.0", |
Marissa Wall | 925bf7f | 2018-12-29 14:27:11 -0800 | [diff] [blame] | 191 | "android.hardware.graphics.allocator@3.0", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 192 | "libbinder", |
| 193 | "libcutils", |
| 194 | "libdisplayservicehidl", |
| 195 | "libhidlbase", |
| 196 | "libhidltransport", |
Robert Carr | 720e506 | 2018-07-30 17:45:14 -0700 | [diff] [blame] | 197 | "libinput", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 198 | "liblayers_proto", |
| 199 | "liblog", |
Suren Baghdasaryan | cd82905 | 2018-11-02 19:15:37 -0700 | [diff] [blame] | 200 | "libprocessgroup", |
Alec Mouri | 0a9c7b8 | 2018-11-16 13:05:25 -0800 | [diff] [blame] | 201 | "libsync", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 202 | "libtimestats_proto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 203 | "libutils", |
| 204 | ], |
| 205 | static_libs: [ |
| 206 | "libserviceutils", |
| 207 | "libtrace_proto", |
| 208 | ], |
| 209 | ldflags: ["-Wl,--export-dynamic"], |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 210 | } |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 211 | |
Lloyd Pique | ea0a5fb | 2018-09-12 15:04:56 -0700 | [diff] [blame] | 212 | filegroup { |
| 213 | name: "surfaceflinger_binary_sources", |
| 214 | srcs: ["main_surfaceflinger.cpp"], |
| 215 | } |
| 216 | |
| 217 | cc_binary { |
| 218 | name: "surfaceflinger", |
| 219 | defaults: ["libsurfaceflinger_binary"], |
| 220 | init_rc: ["surfaceflinger.rc"], |
| 221 | srcs: [":surfaceflinger_binary_sources"], |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 222 | shared_libs: [ |
| 223 | "libsurfaceflinger", |
| 224 | "libSurfaceFlingerProperties", |
| 225 | ], |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 226 | } |
| 227 | |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 228 | subdirs = [ |
| 229 | "layerproto", |
Yiwei Zhang | faf3ded | 2018-05-02 17:37:17 -0700 | [diff] [blame] | 230 | "TimeStats/timestatsproto", |
Lloyd Pique | 66ce40d | 2018-01-23 16:42:19 -0800 | [diff] [blame] | 231 | "tests", |
| 232 | ] |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 233 | |
| 234 | cc_library_shared { |
| 235 | name: "libSurfaceFlingerProperties", |
| 236 | srcs: [ |
| 237 | "SurfaceFlingerProperties.cpp", |
| 238 | "sysprop/*.sysprop", |
| 239 | ], |
| 240 | shared_libs: [ |
| 241 | "android.hardware.configstore-utils", |
| 242 | "android.hardware.configstore@1.0", |
| 243 | "android.hardware.configstore@1.1", |
Sundong Ahn | cb20cca | 2019-02-22 11:57:38 +0900 | [diff] [blame^] | 244 | "android.hardware.graphics.common@1.2", |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 245 | "libhidlbase", |
| 246 | "libhidltransport", |
| 247 | "libhwbinder", |
Sundong Ahn | cb20cca | 2019-02-22 11:57:38 +0900 | [diff] [blame^] | 248 | "libui", |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 249 | "libutils", |
| 250 | ], |
| 251 | export_shared_lib_headers: [ |
Sundong Ahn | cb20cca | 2019-02-22 11:57:38 +0900 | [diff] [blame^] | 252 | "android.hardware.graphics.common@1.2", |
Sundong Ahn | d5e08f6 | 2018-12-12 20:27:28 +0900 | [diff] [blame] | 253 | "libhidlbase", |
| 254 | "libhidltransport", |
| 255 | "libhwbinder", |
| 256 | ], |
| 257 | } |