blob: 5b1aacd959f3c3e9c084ea80a63ce273a4863640 [file] [log] [blame]
Bob Badour3306e492021-02-25 15:35:37 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "frameworks_native_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["frameworks_native_license"],
John Reck38bc8a82024-02-21 17:08:27 -05008 default_team: "trendy_team_android_core_graphics_stack",
Bob Badour3306e492021-02-25 15:35:37 -08009}
10
Lloyd Pique70d91362018-10-18 16:02:55 -070011cc_defaults {
12 name: "libcompositionengine_defaults",
Sally Qi6920a2f2022-08-26 10:40:05 -070013 defaults: [
Ted Baueraaa910d2024-04-30 15:24:50 +000014 "aconfig_lib_cc_static_link.defaults",
Sally Qi6920a2f2022-08-26 10:40:05 -070015 "android.hardware.graphics.composer3-ndk_shared",
Matt Buckleycc146422023-06-28 19:14:02 +000016 "android.hardware.power-ndk_shared",
Nolan Scobie8ef7e142022-10-14 10:52:43 -040017 "librenderengine_deps",
Devin Moorea1889802023-05-22 21:29:09 +000018 "libtimestats_deps",
Sally Qi6920a2f2022-08-26 10:40:05 -070019 "surfaceflinger_defaults",
Vishnu Nair6aac09e2024-07-26 21:38:58 +000020 "libsurfaceflinger_proto_deps",
Sally Qi6920a2f2022-08-26 10:40:05 -070021 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070022 cflags: [
23 "-DLOG_TAG=\"CompositionEngine\"",
Lloyd Pique05b67b92019-09-25 13:16:44 -070024 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
Lloyd Pique70d91362018-10-18 16:02:55 -070025 ],
Lloyd Pique441d5042018-10-18 16:49:51 -070026 shared_libs: [
27 "android.hardware.graphics.allocator@2.0",
28 "android.hardware.graphics.composer@2.1",
29 "android.hardware.graphics.composer@2.2",
30 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070031 "android.hardware.graphics.composer@2.4",
Lloyd Pique441d5042018-10-18 16:49:51 -070032 "android.hardware.power@1.0",
33 "android.hardware.power@1.3",
34 "libbase",
35 "libcutils",
36 "libgui",
Lloyd Pique441d5042018-10-18 16:49:51 -070037 "liblog",
Lloyd Pique31cb2942018-10-19 17:23:03 -070038 "libnativewindow",
Alec Mourie4034bb2019-11-19 12:45:54 -080039 "libprotobuf-cpp-lite",
Dan Stoza269dc4d2021-01-15 15:07:43 -080040 "libSurfaceFlingerProp",
Lloyd Pique441d5042018-10-18 16:49:51 -070041 "libui",
42 "libutils",
43 ],
44 static_libs: [
45 "libmath",
46 "librenderengine",
Devin Moorea1889802023-05-22 21:29:09 +000047 "libtimestats",
Alec Mouri465b2962021-10-08 16:22:21 -070048 "libtonemap",
Ady Abrahame7385f72021-09-05 00:54:25 -070049 "libaidlcommonsupport",
Vishnu Naira3140382022-02-24 14:07:11 -080050 "libprocessgroup",
T.J. Mercier25b772b2024-08-09 20:31:26 +000051 "libprocessgroup_util",
Vishnu Naira3140382022-02-24 14:07:11 -080052 "libcgrouprc",
53 "libjsoncpp",
54 "libcgrouprc_format",
Lloyd Pique441d5042018-10-18 16:49:51 -070055 ],
56 header_libs: [
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080057 "android.hardware.graphics.composer@2.1-command-buffer",
58 "android.hardware.graphics.composer@2.2-command-buffer",
59 "android.hardware.graphics.composer@2.3-command-buffer",
Peiyong Linafa0f572020-01-13 16:35:02 -080060 "android.hardware.graphics.composer@2.4-command-buffer",
Ady Abrahame7385f72021-09-05 00:54:25 -070061 "android.hardware.graphics.composer3-command-buffer",
Lloyd Pique441d5042018-10-18 16:49:51 -070062 "libsurfaceflinger_headers",
63 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070064}
65
Alec Mourif97df4d2023-09-06 02:10:05 +000066filegroup {
67 name: "libcompositionengine_sources",
Lloyd Pique70d91362018-10-18 16:02:55 -070068 srcs: [
Dan Stoza6166c312021-01-15 16:34:05 -080069 "src/planner/CachedSet.cpp",
70 "src/planner/Flattener.cpp",
Dan Stoza269dc4d2021-01-15 15:07:43 -080071 "src/planner/LayerState.cpp",
72 "src/planner/Planner.cpp",
Dan Stoza47437bb2021-01-15 16:21:07 -080073 "src/planner/Predictor.cpp",
Alec Mouridf6201b2021-06-01 16:20:42 -070074 "src/planner/TexturePool.cpp",
Vishnu Nair9b079a22020-01-21 14:36:08 -080075 "src/ClientCompositionRequestCache.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070076 "src/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070077 "src/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070078 "src/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070079 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070080 "src/DumpHelpers.cpp",
Vishnu Naira3140382022-02-24 14:07:11 -080081 "src/HwcAsyncWorker.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080082 "src/HwcBufferCache.cpp",
Lloyd Pique9755fb72019-03-26 14:44:40 -070083 "src/LayerFECompositionState.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070084 "src/Output.cpp",
85 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080086 "src/OutputLayer.cpp",
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080087 "src/OutputLayerCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070088 "src/RenderSurface.cpp",
Pierre-Hugues Husson17486262020-05-25 10:12:24 +000089 "src/UdfpsExtension.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070090 ],
Alec Mourif97df4d2023-09-06 02:10:05 +000091}
92
93cc_library {
94 name: "libcompositionengine",
Matt Buckleyffc31d12024-02-28 16:51:28 +000095 defaults: [
96 "libcompositionengine_defaults",
97 "libsurfaceflinger_common_deps",
Pierre-Hugues Husson17486262020-05-25 10:12:24 +000098 "surfaceflinger_udfps_lib_defaults",
Alec Mourif97df4d2023-09-06 02:10:05 +000099 ],
100 srcs: [
101 ":libcompositionengine_sources",
102 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700103 local_include_dirs: ["include"],
104 export_include_dirs: ["include"],
105}
106
107cc_library {
108 name: "libcompositionengine_mocks",
Matt Buckleyffc31d12024-02-28 16:51:28 +0000109 defaults: [
110 "libcompositionengine_defaults",
111 "libsurfaceflinger_common_test_deps",
112 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700113 srcs: [
114 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -0700115 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -0700116 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -0700117 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -0800118 "mock/LayerFE.cpp",
chaviw8beb4142019-04-11 13:09:05 -0700119 "mock/NativeWindow.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -0700120 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -0800121 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -0700122 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700123 ],
124 static_libs: [
125 "libgtest",
126 "libgmock",
127 "libcompositionengine",
Leon Scroggins III2f60d732022-09-12 14:42:38 -0400128 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700129 local_include_dirs: ["include"],
130 export_include_dirs: ["include"],
131}
132
133cc_test {
134 name: "libcompositionengine_test",
135 test_suites: ["device-tests"],
Leon Scroggins IIIab551a32023-11-22 10:08:25 -0500136 include_dirs: [
137 "frameworks/native/services/surfaceflinger/common/include",
138 "frameworks/native/services/surfaceflinger/tests/unittests",
139 ],
Matt Buckleyffc31d12024-02-28 16:51:28 +0000140 defaults: [
141 "libcompositionengine_defaults",
142 "libsurfaceflinger_common_test_deps",
143 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700144 srcs: [
Alec Mourif97df4d2023-09-06 02:10:05 +0000145 ":libcompositionengine_sources",
Ady Abrahamcf027d62021-03-02 18:48:57 -0800146 "tests/planner/CachedSetTest.cpp",
Ady Abrahamb7db4102021-03-04 12:19:26 -0800147 "tests/planner/FlattenerTest.cpp",
Alec Mourieb920d92021-03-01 17:48:30 -0800148 "tests/planner/LayerStateTest.cpp",
Alec Mourif6a684b2021-03-09 13:00:18 -0800149 "tests/planner/PredictorTest.cpp",
Alec Mouridf6201b2021-06-01 16:20:42 -0700150 "tests/planner/TexturePoolTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700151 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -0700152 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -0700153 "tests/DisplayTest.cpp",
Lloyd Piquec0475922024-06-13 15:27:17 -0700154 "tests/HwcAsyncWorkerTest.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -0800155 "tests/HwcBufferCacheTest.cpp",
Lloyd Pique35d58242018-12-18 16:33:25 -0800156 "tests/MockHWC2.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -0700157 "tests/MockHWComposer.cpp",
Lloyd Pique688abd42019-02-15 15:42:24 -0800158 "tests/MockPowerAdvisor.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -0800159 "tests/OutputLayerTest.cpp",
Marin Shalamanov68933fb2020-09-10 17:58:12 +0200160 "tests/OutputTest.cpp",
161 "tests/ProjectionSpaceTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -0700162 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700163 ],
164 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -0700165 "libcompositionengine_mocks",
Lloyd Piqueaad4ebf2019-10-03 17:58:30 -0700166 "libgui_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -0700167 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -0700168 "libgmock",
169 "libgtest",
170 ],
Ian Elliott1f0911e2022-09-09 16:31:47 -0600171 shared_libs: [
Leon Scroggins III2f60d732022-09-12 14:42:38 -0400172 // For some reason, libvulkan isn't picked up from librenderengine
173 // Probably ASAN related?
Ian Elliott1f0911e2022-09-09 16:31:47 -0600174 "libvulkan",
175 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700176 sanitize: {
Florian Mayerd3fe83a2023-09-13 14:19:28 -0700177 hwaddress: true,
Lloyd Pique70d91362018-10-18 16:02:55 -0700178 },
179}
Pierre-Hugues Husson17486262020-05-25 10:12:24 +0000180
181cc_library_static {
182 name: "surfaceflinger_udfps_lib",
183 srcs: [
184 "src/UdfpsExtension.cpp",
185 ],
186 export_include_dirs: ["include"],
187}