blob: 564bd5b96b6b38ebd38c792691513976b3787f79 [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 Pique31cb2942018-10-19 17:23:03 -070047 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070048 ],
49 local_include_dirs: ["include"],
50 export_include_dirs: ["include"],
51}
52
53cc_library {
54 name: "libcompositionengine_mocks",
55 defaults: ["libcompositionengine_defaults"],
56 srcs: [
57 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070058 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070059 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070060 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080061 "mock/Layer.cpp",
62 "mock/LayerFE.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070063 "mock/Output.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070064 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070065 ],
66 static_libs: [
67 "libgtest",
68 "libgmock",
69 "libcompositionengine",
70 ],
71 local_include_dirs: ["include"],
72 export_include_dirs: ["include"],
73}
74
75cc_test {
76 name: "libcompositionengine_test",
77 test_suites: ["device-tests"],
78 defaults: ["libcompositionengine_defaults"],
79 srcs: [
80 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070081 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070082 "tests/DisplayTest.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080083 "tests/LayerTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070084 "tests/MockHWComposer.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070085 "tests/OutputTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070086 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070087 ],
88 static_libs: [
89 "libcompositionengine",
90 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -070091 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -070092 "libgmock",
93 "libgtest",
94 ],
95 sanitize: {
96 // By using the address sanitizer, we not only uncover any issues
97 // with the test, but also any issues with the code under test.
98 //
99 // Note: If you get an runtime link error like:
100 //
101 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
102 //
103 // it is because the address sanitizer shared objects are not installed
104 // by default in the system image.
105 //
106 // You can either "make dist tests" before flashing, or set this
107 // option to false temporarily.
108 address: true,
109 },
110}