blob: 6f076ad11f2eacf43c3c432d4b3d71dbbbc8907d [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 Pique3d0c02e2018-10-19 18:38:12 -070097 "tests/OutputTest.cpp",
Lloyd Piquecc01a452018-12-04 17:24:00 -080098 "tests/OutputLayerTest.cpp",
Lloyd Pique31cb2942018-10-19 17:23:03 -070099 "tests/RenderSurfaceTest.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -0700100 ],
101 static_libs: [
102 "libcompositionengine",
103 "libcompositionengine_mocks",
Lloyd Piqueb97e04f2018-10-18 17:07:05 -0700104 "librenderengine_mocks",
Lloyd Pique70d91362018-10-18 16:02:55 -0700105 "libgmock",
106 "libgtest",
107 ],
108 sanitize: {
109 // By using the address sanitizer, we not only uncover any issues
110 // with the test, but also any issues with the code under test.
111 //
112 // Note: If you get an runtime link error like:
113 //
114 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
115 //
116 // it is because the address sanitizer shared objects are not installed
117 // by default in the system image.
118 //
119 // You can either "make dist tests" before flashing, or set this
120 // option to false temporarily.
Stephen Hinesd3e75892020-08-19 08:52:56 -0700121 address: true,
Lloyd Pique70d91362018-10-18 16:02:55 -0700122 },
123}