blob: 3862d8b2e85855fabec6f70973609bb199aa4a66 [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\"",
6 ],
Lloyd Pique441d5042018-10-18 16:49:51 -07007 shared_libs: [
8 "android.hardware.graphics.allocator@2.0",
9 "android.hardware.graphics.composer@2.1",
10 "android.hardware.graphics.composer@2.2",
11 "android.hardware.graphics.composer@2.3",
12 "android.hardware.power@1.0",
13 "android.hardware.power@1.3",
14 "libbase",
15 "libcutils",
16 "libgui",
17 "liblayers_proto",
18 "liblog",
19 "libtimestats_proto",
20 "libui",
21 "libutils",
22 ],
23 static_libs: [
24 "libmath",
25 "librenderengine",
26 "libtrace_proto",
27 ],
28 header_libs: [
29 "libsurfaceflinger_headers",
30 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070031}
32
33cc_library {
34 name: "libcompositionengine",
35 defaults: ["libcompositionengine_defaults"],
36 srcs: [
37 "src/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070038 "src/Display.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070039 "src/DumpHelpers.cpp",
40 "src/Output.cpp",
41 "src/OutputCompositionState.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070042 ],
43 local_include_dirs: ["include"],
44 export_include_dirs: ["include"],
45}
46
47cc_library {
48 name: "libcompositionengine_mocks",
49 defaults: ["libcompositionengine_defaults"],
50 srcs: [
51 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070052 "mock/Display.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070053 "mock/Output.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070054 ],
55 static_libs: [
56 "libgtest",
57 "libgmock",
58 "libcompositionengine",
59 ],
60 local_include_dirs: ["include"],
61 export_include_dirs: ["include"],
62}
63
64cc_test {
65 name: "libcompositionengine_test",
66 test_suites: ["device-tests"],
67 defaults: ["libcompositionengine_defaults"],
68 srcs: [
69 "tests/CompositionEngineTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070070 "tests/DisplayTest.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070071 "tests/OutputTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070072 "tests/MockHWComposer.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070073 ],
74 static_libs: [
75 "libcompositionengine",
76 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070077 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070078 "libgmock",
79 "libgtest",
80 ],
81 sanitize: {
82 // By using the address sanitizer, we not only uncover any issues
83 // with the test, but also any issues with the code under test.
84 //
85 // Note: If you get an runtime link error like:
86 //
87 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
88 //
89 // it is because the address sanitizer shared objects are not installed
90 // by default in the system image.
91 //
92 // You can either "make dist tests" before flashing, or set this
93 // option to false temporarily.
94 address: true,
95 },
96}