blob: ae6bdbce602e63c5c5540be8ad4f14b7a111ff55 [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 Pique0b785d82018-12-04 17:25:27 -080050 "src/LayerCompositionState.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070051 "src/Output.cpp",
52 "src/OutputCompositionState.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080053 "src/OutputLayer.cpp",
Lloyd Pique37c2c9b2018-12-04 17:25:10 -080054 "src/OutputLayerCompositionState.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070055 "src/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070056 ],
57 local_include_dirs: ["include"],
58 export_include_dirs: ["include"],
59}
60
61cc_library {
62 name: "libcompositionengine_mocks",
63 defaults: ["libcompositionengine_defaults"],
64 srcs: [
65 "mock/CompositionEngine.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070066 "mock/Display.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070067 "mock/DisplayColorProfile.cpp",
Lloyd Pique542307f2018-10-19 13:24:08 -070068 "mock/DisplaySurface.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080069 "mock/Layer.cpp",
70 "mock/LayerFE.cpp",
chaviw8beb4142019-04-11 13:09:05 -070071 "mock/NativeWindow.cpp",
Lloyd Pique32cbe282018-10-19 13:09:22 -070072 "mock/Output.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080073 "mock/OutputLayer.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070074 "mock/RenderSurface.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070075 ],
76 static_libs: [
77 "libgtest",
78 "libgmock",
79 "libcompositionengine",
80 ],
81 local_include_dirs: ["include"],
82 export_include_dirs: ["include"],
83}
84
85cc_test {
86 name: "libcompositionengine_test",
87 test_suites: ["device-tests"],
88 defaults: ["libcompositionengine_defaults"],
89 srcs: [
90 "tests/CompositionEngineTest.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070091 "tests/DisplayColorProfileTest.cpp",
Lloyd Pique45a165a2018-10-19 11:54:47 -070092 "tests/DisplayTest.cpp",
Lloyd Pique76ed7032018-12-04 17:24:28 -080093 "tests/HwcBufferCacheTest.cpp",
Lloyd Piquefeb73d72018-12-04 17:23:44 -080094 "tests/LayerTest.cpp",
Lloyd Pique35d58242018-12-18 16:33:25 -080095 "tests/MockHWC2.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070096 "tests/MockHWComposer.cpp",
Lloyd Pique688abd42019-02-15 15:42:24 -080097 "tests/MockPowerAdvisor.cpp",
Lloyd Pique3d0c02e2018-10-19 18:38:12 -070098 "tests/OutputTest.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080099 "tests/OutputLayerTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -0700100 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700101 ],
102 static_libs: [
103 "libcompositionengine",
104 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -0700105 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -0700106 "libgmock",
107 "libgtest",
108 ],
109 sanitize: {
110 // By using the address sanitizer, we not only uncover any issues
111 // with the test, but also any issues with the code under test.
112 //
113 // Note: If you get an runtime link error like:
114 //
115 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
116 //
117 // it is because the address sanitizer shared objects are not installed
118 // by default in the system image.
119 //
120 // You can either "make dist tests" before flashing, or set this
121 // option to false temporarily.
122 address: true,
123 },
124}