blob: 1651cc4d828dd83e6916dd52436b83eb77e1709a [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",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080044 "src/Layer.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070045 "src/Output.cpp",
46 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080047 "src/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070048 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070049 ],
50 local_include_dirs: ["include"],
51 export_include_dirs: ["include"],
52}
53
54cc_library {
55 name: "libcompositionengine_mocks",
56 defaults: ["libcompositionengine_defaults"],
57 srcs: [
58 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070059 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070060 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070061 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080062 "mock/Layer.cpp",
63 "mock/LayerFE.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070064 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080065 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070066 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070067 ],
68 static_libs: [
69 "libgtest",
70 "libgmock",
71 "libcompositionengine",
72 ],
73 local_include_dirs: ["include"],
74 export_include_dirs: ["include"],
75}
76
77cc_test {
78 name: "libcompositionengine_test",
79 test_suites: ["device-tests"],
80 defaults: ["libcompositionengine_defaults"],
81 srcs: [
82 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070083 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070084 "tests/DisplayTest.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080085 "tests/LayerTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070086 "tests/MockHWComposer.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070087 "tests/OutputTest.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080088 "tests/OutputLayerTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070089 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070090 ],
91 static_libs: [
92 "libcompositionengine",
93 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070094 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070095 "libgmock",
96 "libgtest",
97 ],
98 sanitize: {
99 // By using the address sanitizer, we not only uncover any issues
100 // with the test, but also any issues with the code under test.
101 //
102 // Note: If you get an runtime link error like:
103 //
104 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
105 //
106 // it is because the address sanitizer shared objects are not installed
107 // by default in the system image.
108 //
109 // You can either "make dist tests" before flashing, or set this
110 // option to false temporarily.
111 address: true,
112 },
113}