blob: 64db6efe1fc47a677c4f90684988c14a2ab0f43e [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 Pique542307f2018-10-19 13:24:08 -070039 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070040 "src/DumpHelpers.cpp",
41 "src/Output.cpp",
42 "src/OutputCompositionState.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070043 ],
44 local_include_dirs: ["include"],
45 export_include_dirs: ["include"],
46}
47
48cc_library {
49 name: "libcompositionengine_mocks",
50 defaults: ["libcompositionengine_defaults"],
51 srcs: [
52 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070053 "mock/Display.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070054 "mock/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070055 "mock/Output.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070056 ],
57 static_libs: [
58 "libgtest",
59 "libgmock",
60 "libcompositionengine",
61 ],
62 local_include_dirs: ["include"],
63 export_include_dirs: ["include"],
64}
65
66cc_test {
67 name: "libcompositionengine_test",
68 test_suites: ["device-tests"],
69 defaults: ["libcompositionengine_defaults"],
70 srcs: [
71 "tests/CompositionEngineTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070072 "tests/DisplayTest.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070073 "tests/OutputTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070074 "tests/MockHWComposer.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070075 ],
76 static_libs: [
77 "libcompositionengine",
78 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070079 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070080 "libgmock",
81 "libgtest",
82 ],
83 sanitize: {
84 // By using the address sanitizer, we not only uncover any issues
85 // with the test, but also any issues with the code under test.
86 //
87 // Note: If you get an runtime link error like:
88 //
89 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
90 //
91 // it is because the address sanitizer shared objects are not installed
92 // by default in the system image.
93 //
94 // You can either "make dist tests" before flashing, or set this
95 // option to false temporarily.
96 address: true,
97 },
98}