blob: e934f8b8d96ebfb2b56ab9c23d414fba4fa2a5ad [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: [
Lloyd Pique37c2c9b2018-12-04 17:25:10 -08008 "android.frameworks.vr.composer@1.0",
Lloyd Pique441d5042018-10-18 16:49:51 -07009 "android.hardware.graphics.allocator@2.0",
10 "android.hardware.graphics.composer@2.1",
11 "android.hardware.graphics.composer@2.2",
12 "android.hardware.graphics.composer@2.3",
13 "android.hardware.power@1.0",
14 "android.hardware.power@1.3",
15 "libbase",
16 "libcutils",
17 "libgui",
18 "liblayers_proto",
19 "liblog",
Lloyd Pique31cb2942018-10-19 17:23:03 -070020 "libnativewindow",
21 "libsync",
Lloyd Pique441d5042018-10-18 16:49:51 -070022 "libtimestats_proto",
23 "libui",
24 "libutils",
25 ],
26 static_libs: [
27 "libmath",
28 "librenderengine",
29 "libtrace_proto",
30 ],
31 header_libs: [
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080032 "android.hardware.graphics.composer@2.1-command-buffer",
33 "android.hardware.graphics.composer@2.2-command-buffer",
34 "android.hardware.graphics.composer@2.3-command-buffer",
Lloyd Pique441d5042018-10-18 16:49:51 -070035 "libsurfaceflinger_headers",
36 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070037}
38
39cc_library {
40 name: "libcompositionengine",
41 defaults: ["libcompositionengine_defaults"],
42 srcs: [
43 "src/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070044 "src/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070045 "src/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070046 "src/DisplaySurface.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070047 "src/DumpHelpers.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080048 "src/HwcBufferCache.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080049 "src/Layer.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070050 "src/Output.cpp",
51 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080052 "src/OutputLayer.cpp",
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080053 "src/OutputLayerCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070054 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070055 ],
56 local_include_dirs: ["include"],
57 export_include_dirs: ["include"],
58}
59
60cc_library {
61 name: "libcompositionengine_mocks",
62 defaults: ["libcompositionengine_defaults"],
63 srcs: [
64 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070065 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070066 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070067 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080068 "mock/Layer.cpp",
69 "mock/LayerFE.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070070 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080071 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070072 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070073 ],
74 static_libs: [
75 "libgtest",
76 "libgmock",
77 "libcompositionengine",
78 ],
79 local_include_dirs: ["include"],
80 export_include_dirs: ["include"],
81}
82
83cc_test {
84 name: "libcompositionengine_test",
85 test_suites: ["device-tests"],
86 defaults: ["libcompositionengine_defaults"],
87 srcs: [
88 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070089 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070090 "tests/DisplayTest.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080091 "tests/HwcBufferCacheTest.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080092 "tests/LayerTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070093 "tests/MockHWComposer.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070094 "tests/OutputTest.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080095 "tests/OutputLayerTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070096 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070097 ],
98 static_libs: [
99 "libcompositionengine",
100 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -0700101 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -0700102 "libgmock",
103 "libgtest",
104 ],
105 sanitize: {
106 // By using the address sanitizer, we not only uncover any issues
107 // with the test, but also any issues with the code under test.
108 //
109 // Note: If you get an runtime link error like:
110 //
111 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
112 //
113 // it is because the address sanitizer shared objects are not installed
114 // by default in the system image.
115 //
116 // You can either "make dist tests" before flashing, or set this
117 // option to false temporarily.
118 address: true,
119 },
120}