blob: 49fa84a7ecb38b6b7919207f7716c32b06dd796f [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 Pique3d0c02e2018-10-19 18:38:12 -070041 "src/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070042 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070043 "src/DumpHelpers.cpp",
44 "src/Output.cpp",
45 "src/OutputCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070046 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070047 ],
48 local_include_dirs: ["include"],
49 export_include_dirs: ["include"],
50}
51
52cc_library {
53 name: "libcompositionengine_mocks",
54 defaults: ["libcompositionengine_defaults"],
55 srcs: [
56 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070057 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070058 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070059 "mock/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070060 "mock/Output.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070061 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070062 ],
63 static_libs: [
64 "libgtest",
65 "libgmock",
66 "libcompositionengine",
67 ],
68 local_include_dirs: ["include"],
69 export_include_dirs: ["include"],
70}
71
72cc_test {
73 name: "libcompositionengine_test",
74 test_suites: ["device-tests"],
75 defaults: ["libcompositionengine_defaults"],
76 srcs: [
77 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070078 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070079 "tests/DisplayTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070080 "tests/MockHWComposer.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070081 "tests/OutputTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070082 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070083 ],
84 static_libs: [
85 "libcompositionengine",
86 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070087 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070088 "libgmock",
89 "libgtest",
90 ],
91 sanitize: {
92 // By using the address sanitizer, we not only uncover any issues
93 // with the test, but also any issues with the code under test.
94 //
95 // Note: If you get an runtime link error like:
96 //
97 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
98 //
99 // it is because the address sanitizer shared objects are not installed
100 // by default in the system image.
101 //
102 // You can either "make dist tests" before flashing, or set this
103 // option to false temporarily.
104 address: true,
105 },
106}