blob: 78f8104915a1d9fd53e81458be46db3aaf5ccb34 [file] [log] [blame]
Lloyd Pique70d91362018-10-18 16:02:55 -07001cc_defaults {
2 name: "libcompositionengine_defaults",
3 defaults: ["surfaceflinger_defaults"],
4 cflags: [
5 "-DLOG_TAG=\"CompositionEngine\"",
Lloyd Pique05b67b92019-09-25 13:16:44 -07006 "-DATRACE_TAG=ATRACE_TAG_GRAPHICS",
Lloyd Pique70d91362018-10-18 16:02:55 -07007 ],
Lloyd Pique441d5042018-10-18 16:49:51 -07008 shared_libs: [
mamik94e91f62019-08-19 09:11:33 -07009 "android.frameworks.vr.composer@2.0",
Lloyd Pique441d5042018-10-18 16:49:51 -070010 "android.hardware.graphics.allocator@2.0",
11 "android.hardware.graphics.composer@2.1",
12 "android.hardware.graphics.composer@2.2",
13 "android.hardware.graphics.composer@2.3",
Dominik Laskowski25a4e7d2019-09-20 14:50:10 -070014 "android.hardware.graphics.composer@2.4",
Lloyd Pique441d5042018-10-18 16:49:51 -070015 "android.hardware.power@1.0",
16 "android.hardware.power@1.3",
17 "libbase",
18 "libcutils",
19 "libgui",
20 "liblayers_proto",
21 "liblog",
Lloyd Pique31cb2942018-10-19 17:23:03 -070022 "libnativewindow",
Alec Mourie4034bb2019-11-19 12:45:54 -080023 "libprotobuf-cpp-lite",
Lloyd Pique31cb2942018-10-19 17:23:03 -070024 "libsync",
Lloyd Pique441d5042018-10-18 16:49:51 -070025 "libtimestats_proto",
26 "libui",
27 "libutils",
28 ],
29 static_libs: [
30 "libmath",
31 "librenderengine",
Alec Mourie4034bb2019-11-19 12:45:54 -080032 "libtimestats",
Lloyd Pique441d5042018-10-18 16:49:51 -070033 "libtrace_proto",
34 ],
35 header_libs: [
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080036 "android.hardware.graphics.composer@2.1-command-buffer",
37 "android.hardware.graphics.composer@2.2-command-buffer",
38 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique441d5042018-10-18 16:49:51 -070039 "libsurfaceflinger_headers",
40 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070041}
42
43cc_library {
44 name: "libcompositionengine",
45 defaults: ["libcompositionengine_defaults"],
46 srcs: [
47 "src/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070048 "src/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070049 "src/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070050 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070051 "src/DumpHelpers.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080052 "src/HwcBufferCache.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080053 "src/Layer.cpp",
Lloyd Pique9755fb72019-03-26 14:44:40 -070054 "src/LayerFECompositionState.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070055 "src/Output.cpp",
56 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080057 "src/OutputLayer.cpp",
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080058 "src/OutputLayerCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070059 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070060 ],
61 local_include_dirs: ["include"],
62 export_include_dirs: ["include"],
63}
64
65cc_library {
66 name: "libcompositionengine_mocks",
67 defaults: ["libcompositionengine_defaults"],
68 srcs: [
69 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070070 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070071 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070072 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080073 "mock/Layer.cpp",
74 "mock/LayerFE.cpp",
chaviw8beb4142019-04-11 13:09:05 -070075 "mock/NativeWindow.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070076 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080077 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070078 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070079 ],
80 static_libs: [
81 "libgtest",
82 "libgmock",
83 "libcompositionengine",
84 ],
85 local_include_dirs: ["include"],
86 export_include_dirs: ["include"],
87}
88
89cc_test {
90 name: "libcompositionengine_test",
91 test_suites: ["device-tests"],
92 defaults: ["libcompositionengine_defaults"],
93 srcs: [
94 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070095 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070096 "tests/DisplayTest.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080097 "tests/HwcBufferCacheTest.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080098 "tests/LayerTest.cpp",
Lloyd Pique35d58242018-12-18 16:33:25 -080099 "tests/MockHWC2.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -0700100 "tests/MockHWComposer.cpp",
Lloyd Pique688abd42019-02-15 15:42:24 -0800101 "tests/MockPowerAdvisor.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -0700102 "tests/OutputTest.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -0800103 "tests/OutputLayerTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -0700104 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700105 ],
106 static_libs: [
107 "libcompositionengine",
108 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -0700109 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -0700110 "libgmock",
111 "libgtest",
112 ],
113 sanitize: {
114 // By using the address sanitizer, we not only uncover any issues
115 // with the test, but also any issues with the code under test.
116 //
117 // Note: If you get an runtime link error like:
118 //
119 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
120 //
121 // it is because the address sanitizer shared objects are not installed
122 // by default in the system image.
123 //
124 // You can either "make dist tests" before flashing, or set this
125 // option to false temporarily.
Yi Kongf43b6642019-08-20 17:37:52 -0700126
127
128 // FIXME: ASAN build is broken for a while, but was not discovered
129 // since new PM silently suppressed ASAN. Temporarily turn off ASAN
130 // to unblock the compiler upgrade process.
131 // address: true,
132 // http://b/139747256
133 address: false,
Lloyd Pique70d91362018-10-18 16:02:55 -0700134 },
135}