blob: ae2f2dbbf5ba5dd67f25a57175d7a3c9e004640e [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"],
8}
9
Lloyd Pique70d91362018-10-18 16:02:55 -070010cc_defaults {
11 name: "libcompositionengine_defaults",
Sally Qi6920a2f2022-08-26 10:40:05 -070012 defaults: [
13 "android.hardware.graphics.composer3-ndk_shared",
Matt Buckleycc146422023-06-28 19:14:02 +000014 "android.hardware.power-ndk_shared",
Nolan Scobie8ef7e142022-10-14 10:52:43 -040015 "librenderengine_deps",
Devin Moorea1889802023-05-22 21:29:09 +000016 "libtimestats_deps",
Sally Qi6920a2f2022-08-26 10:40:05 -070017 "surfaceflinger_defaults",
18 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070019 cflags: [
20 "-DLOG_TAG=\"CompositionEngine\"",
Lloyd Pique05b67b92019-09-25 13:16:44 -070021 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
Lloyd Pique70d91362018-10-18 16:02:55 -070022 ],
Lloyd Pique441d5042018-10-18 16:49:51 -070023 shared_libs: [
24 "android.hardware.graphics.allocator@2.0",
25 "android.hardware.graphics.composer@2.1",
26 "android.hardware.graphics.composer@2.2",
27 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070028 "android.hardware.graphics.composer@2.4",
Lloyd Pique441d5042018-10-18 16:49:51 -070029 "android.hardware.power@1.0",
30 "android.hardware.power@1.3",
31 "libbase",
32 "libcutils",
33 "libgui",
Lloyd Pique441d5042018-10-18 16:49:51 -070034 "liblog",
Lloyd Pique31cb2942018-10-19 17:23:03 -070035 "libnativewindow",
Alec Mourie4034bb2019-11-19 12:45:54 -080036 "libprotobuf-cpp-lite",
Dan Stoza269dc4d2021-01-15 15:07:43 -080037 "libSurfaceFlingerProp",
Lloyd Pique441d5042018-10-18 16:49:51 -070038 "libui",
39 "libutils",
Alec Mourif97df4d2023-09-06 02:10:05 +000040 "server_configurable_flags",
Lloyd Pique441d5042018-10-18 16:49:51 -070041 ],
42 static_libs: [
Devin Moorea1889802023-05-22 21:29:09 +000043 "liblayers_proto",
Lloyd Pique441d5042018-10-18 16:49:51 -070044 "libmath",
45 "librenderengine",
Devin Moorea1889802023-05-22 21:29:09 +000046 "libtimestats",
Alec Mouri465b2962021-10-08 16:22:21 -070047 "libtonemap",
Ady Abrahame7385f72021-09-05 00:54:25 -070048 "libaidlcommonsupport",
Vishnu Naira3140382022-02-24 14:07:11 -080049 "libprocessgroup",
50 "libcgrouprc",
51 "libjsoncpp",
52 "libcgrouprc_format",
Lloyd Pique441d5042018-10-18 16:49:51 -070053 ],
54 header_libs: [
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080055 "android.hardware.graphics.composer@2.1-command-buffer",
56 "android.hardware.graphics.composer@2.2-command-buffer",
57 "android.hardware.graphics.composer@2.3-command-buffer",
Peiyong Linafa0f572020-01-13 16:35:02 -080058 "android.hardware.graphics.composer@2.4-command-buffer",
Ady Abrahame7385f72021-09-05 00:54:25 -070059 "android.hardware.graphics.composer3-command-buffer",
Lloyd Pique441d5042018-10-18 16:49:51 -070060 "libsurfaceflinger_headers",
61 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070062}
63
Alec Mourif97df4d2023-09-06 02:10:05 +000064filegroup {
65 name: "libcompositionengine_sources",
Lloyd Pique70d91362018-10-18 16:02:55 -070066 srcs: [
Dan Stoza6166c312021-01-15 16:34:05 -080067 "src/planner/CachedSet.cpp",
68 "src/planner/Flattener.cpp",
Dan Stoza269dc4d2021-01-15 15:07:43 -080069 "src/planner/LayerState.cpp",
70 "src/planner/Planner.cpp",
Dan Stoza47437bb2021-01-15 16:21:07 -080071 "src/planner/Predictor.cpp",
Alec Mouridf6201b2021-06-01 16:20:42 -070072 "src/planner/TexturePool.cpp",
Vishnu Nair9b079a22020-01-21 14:36:08 -080073 "src/ClientCompositionRequestCache.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070074 "src/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070075 "src/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070076 "src/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070077 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070078 "src/DumpHelpers.cpp",
Vishnu Naira3140382022-02-24 14:07:11 -080079 "src/HwcAsyncWorker.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080080 "src/HwcBufferCache.cpp",
Lloyd Pique9755fb72019-03-26 14:44:40 -070081 "src/LayerFECompositionState.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070082 "src/Output.cpp",
83 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080084 "src/OutputLayer.cpp",
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080085 "src/OutputLayerCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070086 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070087 ],
Alec Mourif97df4d2023-09-06 02:10:05 +000088}
89
90cc_library {
91 name: "libcompositionengine",
92 defaults: ["libcompositionengine_defaults"],
93 static_libs: [
94 "libsurfaceflinger_common",
95 "libsurfaceflingerflags",
96 ],
97 srcs: [
98 ":libcompositionengine_sources",
99 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700100 local_include_dirs: ["include"],
101 export_include_dirs: ["include"],
Leon Scroggins III2f60d732022-09-12 14:42:38 -0400102 shared_libs: [
103 "server_configurable_flags",
104 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700105}
106
107cc_library {
108 name: "libcompositionengine_mocks",
109 defaults: ["libcompositionengine_defaults"],
110 srcs: [
111 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -0700112 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -0700113 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -0700114 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -0800115 "mock/LayerFE.cpp",
chaviw8beb4142019-04-11 13:09:05 -0700116 "mock/NativeWindow.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -0700117 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -0800118 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -0700119 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700120 ],
121 static_libs: [
122 "libgtest",
123 "libgmock",
124 "libcompositionengine",
Alec Mouri9b133ca2023-11-14 19:00:01 +0000125 "libsurfaceflinger_common_test",
Ady Abraham529bd9f2023-10-05 14:55:30 -0700126 "libsurfaceflingerflags_test",
Lloyd Pique70d91362018-10-18 16:02:55 -0700127 ],
Leon Scroggins III2f60d732022-09-12 14:42:38 -0400128 shared_libs: [
129 "server_configurable_flags",
130 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700131 local_include_dirs: ["include"],
132 export_include_dirs: ["include"],
133}
134
135cc_test {
136 name: "libcompositionengine_test",
137 test_suites: ["device-tests"],
Leon Scroggins IIIab551a32023-11-22 10:08:25 -0500138 include_dirs: [
139 "frameworks/native/services/surfaceflinger/common/include",
140 "frameworks/native/services/surfaceflinger/tests/unittests",
141 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700142 defaults: ["libcompositionengine_defaults"],
143 srcs: [
Alec Mourif97df4d2023-09-06 02:10:05 +0000144 ":libcompositionengine_sources",
Ady Abrahamcf027d62021-03-02 18:48:57 -0800145 "tests/planner/CachedSetTest.cpp",
Ady Abrahamb7db4102021-03-04 12:19:26 -0800146 "tests/planner/FlattenerTest.cpp",
Alec Mourieb920d92021-03-01 17:48:30 -0800147 "tests/planner/LayerStateTest.cpp",
Alec Mourif6a684b2021-03-09 13:00:18 -0800148 "tests/planner/PredictorTest.cpp",
Alec Mouridf6201b2021-06-01 16:20:42 -0700149 "tests/planner/TexturePoolTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700150 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -0700151 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -0700152 "tests/DisplayTest.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -0800153 "tests/HwcBufferCacheTest.cpp",
Lloyd Pique35d58242018-12-18 16:33:25 -0800154 "tests/MockHWC2.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -0700155 "tests/MockHWComposer.cpp",
Lloyd Pique688abd42019-02-15 15:42:24 -0800156 "tests/MockPowerAdvisor.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -0800157 "tests/OutputLayerTest.cpp",
Marin Shalamanov68933fb2020-09-10 17:58:12 +0200158 "tests/OutputTest.cpp",
159 "tests/ProjectionSpaceTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -0700160 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700161 ],
162 static_libs: [
Lloyd Pique70d91362018-10-18 16:02:55 -0700163 "libcompositionengine_mocks",
Lloyd Piqueaad4ebf2019-10-03 17:58:30 -0700164 "libgui_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -0700165 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -0700166 "libgmock",
167 "libgtest",
Alec Mouri9b133ca2023-11-14 19:00:01 +0000168 "libsurfaceflinger_common_test",
Ady Abraham529bd9f2023-10-05 14:55:30 -0700169 "libsurfaceflingerflags_test",
Lloyd Pique70d91362018-10-18 16:02:55 -0700170 ],
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",
Leon Scroggins III2f60d732022-09-12 14:42:38 -0400175 "server_configurable_flags",
Ian Elliott1f0911e2022-09-09 16:31:47 -0600176 ],
Lloyd Pique70d91362018-10-18 16:02:55 -0700177 sanitize: {
Florian Mayerd3fe83a2023-09-13 14:19:28 -0700178 hwaddress: true,
Lloyd Pique70d91362018-10-18 16:02:55 -0700179 },
180}