blob: 6ec0e60e988db7d35383637a2d5bd6607cc62635 [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",
Lloyd Pique31cb2942018-10-19 17:23:03 -070019 "libnativewindow",
20 "libsync",
Lloyd Pique441d5042018-10-18 16:49:51 -070021 "libtimestats_proto",
22 "libui",
23 "libutils",
24 ],
25 static_libs: [
26 "libmath",
27 "librenderengine",
28 "libtrace_proto",
29 ],
30 header_libs: [
31 "libsurfaceflinger_headers",
32 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070033}
34
35cc_library {
36 name: "libcompositionengine",
37 defaults: ["libcompositionengine_defaults"],
38 srcs: [
39 "src/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070040 "src/Display.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070041 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070042 "src/DumpHelpers.cpp",
43 "src/Output.cpp",
44 "src/OutputCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070045 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070046 ],
47 local_include_dirs: ["include"],
48 export_include_dirs: ["include"],
49}
50
51cc_library {
52 name: "libcompositionengine_mocks",
53 defaults: ["libcompositionengine_defaults"],
54 srcs: [
55 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070056 "mock/Display.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070057 "mock/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070058 "mock/Output.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070059 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070060 ],
61 static_libs: [
62 "libgtest",
63 "libgmock",
64 "libcompositionengine",
65 ],
66 local_include_dirs: ["include"],
67 export_include_dirs: ["include"],
68}
69
70cc_test {
71 name: "libcompositionengine_test",
72 test_suites: ["device-tests"],
73 defaults: ["libcompositionengine_defaults"],
74 srcs: [
75 "tests/CompositionEngineTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070076 "tests/DisplayTest.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070077 "tests/OutputTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070078 "tests/MockHWComposer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070079 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070080 ],
81 static_libs: [
82 "libcompositionengine",
83 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070084 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070085 "libgmock",
86 "libgtest",
87 ],
88 sanitize: {
89 // By using the address sanitizer, we not only uncover any issues
90 // with the test, but also any issues with the code under test.
91 //
92 // Note: If you get an runtime link error like:
93 //
94 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
95 //
96 // it is because the address sanitizer shared objects are not installed
97 // by default in the system image.
98 //
99 // You can either "make dist tests" before flashing, or set this
100 // option to false temporarily.
101 address: true,
102 },
103}