blob: ce6b06c0c7e4a31324a11a45fdceb81118f50dad [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 Pique76ed7032018-12-04 17:24:28 -080044 "src/HwcBufferCache.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080045 "src/Layer.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070046 "src/Output.cpp",
47 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080048 "src/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070049 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070050 ],
51 local_include_dirs: ["include"],
52 export_include_dirs: ["include"],
53}
54
55cc_library {
56 name: "libcompositionengine_mocks",
57 defaults: ["libcompositionengine_defaults"],
58 srcs: [
59 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070060 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070061 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070062 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080063 "mock/Layer.cpp",
64 "mock/LayerFE.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070065 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080066 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070067 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070068 ],
69 static_libs: [
70 "libgtest",
71 "libgmock",
72 "libcompositionengine",
73 ],
74 local_include_dirs: ["include"],
75 export_include_dirs: ["include"],
76}
77
78cc_test {
79 name: "libcompositionengine_test",
80 test_suites: ["device-tests"],
81 defaults: ["libcompositionengine_defaults"],
82 srcs: [
83 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070084 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070085 "tests/DisplayTest.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080086 "tests/HwcBufferCacheTest.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080087 "tests/LayerTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070088 "tests/MockHWComposer.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070089 "tests/OutputTest.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080090 "tests/OutputLayerTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070091 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070092 ],
93 static_libs: [
94 "libcompositionengine",
95 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070096 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070097 "libgmock",
98 "libgtest",
99 ],
100 sanitize: {
101 // By using the address sanitizer, we not only uncover any issues
102 // with the test, but also any issues with the code under test.
103 //
104 // Note: If you get an runtime link error like:
105 //
106 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
107 //
108 // it is because the address sanitizer shared objects are not installed
109 // by default in the system image.
110 //
111 // You can either "make dist tests" before flashing, or set this
112 // option to false temporarily.
113 address: true,
114 },
115}