blob: 52092046e34ff38cf3c73cadba12b716da0da2ae [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 Pique70d91362018-10-18 16:02:55 -070039 ],
40 local_include_dirs: ["include"],
41 export_include_dirs: ["include"],
42}
43
44cc_library {
45 name: "libcompositionengine_mocks",
46 defaults: ["libcompositionengine_defaults"],
47 srcs: [
48 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070049 "mock/Display.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070050 ],
51 static_libs: [
52 "libgtest",
53 "libgmock",
54 "libcompositionengine",
55 ],
56 local_include_dirs: ["include"],
57 export_include_dirs: ["include"],
58}
59
60cc_test {
61 name: "libcompositionengine_test",
62 test_suites: ["device-tests"],
63 defaults: ["libcompositionengine_defaults"],
64 srcs: [
65 "tests/CompositionEngineTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070066 "tests/DisplayTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070067 "tests/MockHWComposer.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070068 ],
69 static_libs: [
70 "libcompositionengine",
71 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070072 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070073 "libgmock",
74 "libgtest",
75 ],
76 sanitize: {
77 // By using the address sanitizer, we not only uncover any issues
78 // with the test, but also any issues with the code under test.
79 //
80 // Note: If you get an runtime link error like:
81 //
82 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
83 //
84 // it is because the address sanitizer shared objects are not installed
85 // by default in the system image.
86 //
87 // You can either "make dist tests" before flashing, or set this
88 // option to false temporarily.
89 address: true,
90 },
91}