| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 1 | cc_defaults { | 
|  | 2 | name: "libcompositionengine_defaults", | 
|  | 3 | defaults: ["surfaceflinger_defaults"], | 
|  | 4 | cflags: [ | 
|  | 5 | "-DLOG_TAG=\"CompositionEngine\"", | 
| Lloyd Pique | 05b67b9 | 2019-09-25 13:16:44 -0700 | [diff] [blame] | 6 | "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 7 | ], | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 8 | shared_libs: [ | 
| mamik | 94e91f6 | 2019-08-19 09:11:33 -0700 | [diff] [blame] | 9 | "android.frameworks.vr.composer@2.0", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 10 | "android.hardware.graphics.allocator@2.0", | 
|  | 11 | "android.hardware.graphics.composer@2.1", | 
|  | 12 | "android.hardware.graphics.composer@2.2", | 
|  | 13 | "android.hardware.graphics.composer@2.3", | 
| Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 14 | "android.hardware.graphics.composer@2.4", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 15 | "android.hardware.power@1.0", | 
|  | 16 | "android.hardware.power@1.3", | 
|  | 17 | "libbase", | 
|  | 18 | "libcutils", | 
|  | 19 | "libgui", | 
|  | 20 | "liblayers_proto", | 
|  | 21 | "liblog", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 22 | "libnativewindow", | 
| Alec Mouri | e4034bb | 2019-11-19 12:45:54 -0800 | [diff] [blame] | 23 | "libprotobuf-cpp-lite", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 24 | "libsync", | 
| Yiwei Zhang | d792705 | 2020-01-13 16:05:01 -0800 | [diff] [blame] | 25 | "libtimestats", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 26 | "libui", | 
|  | 27 | "libutils", | 
|  | 28 | ], | 
|  | 29 | static_libs: [ | 
|  | 30 | "libmath", | 
|  | 31 | "librenderengine", | 
|  | 32 | "libtrace_proto", | 
|  | 33 | ], | 
|  | 34 | header_libs: [ | 
| Lloyd Pique | 37c2c9b | 2018-12-04 17:25:10 -0800 | [diff] [blame] | 35 | "android.hardware.graphics.composer@2.1-command-buffer", | 
|  | 36 | "android.hardware.graphics.composer@2.2-command-buffer", | 
|  | 37 | "android.hardware.graphics.composer@2.3-command-buffer", | 
| Peiyong Lin | afa0f57 | 2020-01-13 16:35:02 -0800 | [diff] [blame] | 38 | "android.hardware.graphics.composer@2.4-command-buffer", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 39 | "libsurfaceflinger_headers", | 
|  | 40 | ], | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 41 | } | 
|  | 42 |  | 
|  | 43 | cc_library { | 
|  | 44 | name: "libcompositionengine", | 
|  | 45 | defaults: ["libcompositionengine_defaults"], | 
|  | 46 | srcs: [ | 
| Vishnu Nair | 9b079a2 | 2020-01-21 14:36:08 -0800 | [diff] [blame] | 47 | "src/ClientCompositionRequestCache.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 48 | "src/CompositionEngine.cpp", | 
| Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 49 | "src/Display.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 50 | "src/DisplayColorProfile.cpp", | 
| Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 51 | "src/DisplaySurface.cpp", | 
| Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 52 | "src/DumpHelpers.cpp", | 
| Lloyd Pique | 76ed703 | 2018-12-04 17:24:28 -0800 | [diff] [blame] | 53 | "src/HwcBufferCache.cpp", | 
| Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 54 | "src/Layer.cpp", | 
| Lloyd Pique | 9755fb7 | 2019-03-26 14:44:40 -0700 | [diff] [blame] | 55 | "src/LayerFECompositionState.cpp", | 
| Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 56 | "src/Output.cpp", | 
|  | 57 | "src/OutputCompositionState.cpp", | 
| Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 58 | "src/OutputLayer.cpp", | 
| Lloyd Pique | 37c2c9b | 2018-12-04 17:25:10 -0800 | [diff] [blame] | 59 | "src/OutputLayerCompositionState.cpp", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 60 | "src/RenderSurface.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 61 | ], | 
|  | 62 | local_include_dirs: ["include"], | 
|  | 63 | export_include_dirs: ["include"], | 
|  | 64 | } | 
|  | 65 |  | 
|  | 66 | cc_library { | 
|  | 67 | name: "libcompositionengine_mocks", | 
|  | 68 | defaults: ["libcompositionengine_defaults"], | 
|  | 69 | srcs: [ | 
|  | 70 | "mock/CompositionEngine.cpp", | 
| Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 71 | "mock/Display.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 72 | "mock/DisplayColorProfile.cpp", | 
| Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 73 | "mock/DisplaySurface.cpp", | 
| Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 74 | "mock/Layer.cpp", | 
|  | 75 | "mock/LayerFE.cpp", | 
| chaviw | 8beb414 | 2019-04-11 13:09:05 -0700 | [diff] [blame] | 76 | "mock/NativeWindow.cpp", | 
| Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 77 | "mock/Output.cpp", | 
| Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 78 | "mock/OutputLayer.cpp", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 79 | "mock/RenderSurface.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 80 | ], | 
|  | 81 | static_libs: [ | 
|  | 82 | "libgtest", | 
|  | 83 | "libgmock", | 
|  | 84 | "libcompositionengine", | 
|  | 85 | ], | 
|  | 86 | local_include_dirs: ["include"], | 
|  | 87 | export_include_dirs: ["include"], | 
|  | 88 | } | 
|  | 89 |  | 
|  | 90 | cc_test { | 
|  | 91 | name: "libcompositionengine_test", | 
|  | 92 | test_suites: ["device-tests"], | 
|  | 93 | defaults: ["libcompositionengine_defaults"], | 
|  | 94 | srcs: [ | 
|  | 95 | "tests/CompositionEngineTest.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 96 | "tests/DisplayColorProfileTest.cpp", | 
| Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 97 | "tests/DisplayTest.cpp", | 
| Lloyd Pique | 76ed703 | 2018-12-04 17:24:28 -0800 | [diff] [blame] | 98 | "tests/HwcBufferCacheTest.cpp", | 
| Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 99 | "tests/LayerTest.cpp", | 
| Lloyd Pique | 35d5824 | 2018-12-18 16:33:25 -0800 | [diff] [blame] | 100 | "tests/MockHWC2.cpp", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 101 | "tests/MockHWComposer.cpp", | 
| Lloyd Pique | 688abd4 | 2019-02-15 15:42:24 -0800 | [diff] [blame] | 102 | "tests/MockPowerAdvisor.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 103 | "tests/OutputTest.cpp", | 
| Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 104 | "tests/OutputLayerTest.cpp", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 105 | "tests/RenderSurfaceTest.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 106 | ], | 
|  | 107 | static_libs: [ | 
|  | 108 | "libcompositionengine", | 
|  | 109 | "libcompositionengine_mocks", | 
| Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 110 | "librenderengine_mocks", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 111 | "libgmock", | 
|  | 112 | "libgtest", | 
|  | 113 | ], | 
|  | 114 | sanitize: { | 
|  | 115 | // By using the address sanitizer, we not only uncover any issues | 
|  | 116 | // with the test, but also any issues with the code under test. | 
|  | 117 | // | 
|  | 118 | // Note: If you get an runtime link error like: | 
|  | 119 | // | 
|  | 120 | //   CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found | 
|  | 121 | // | 
|  | 122 | // it is because the address sanitizer shared objects are not installed | 
|  | 123 | // by default in the system image. | 
|  | 124 | // | 
|  | 125 | // You can either "make dist tests" before flashing, or set this | 
|  | 126 | // option to false temporarily. | 
| Yi Kong | f43b664 | 2019-08-20 17:37:52 -0700 | [diff] [blame] | 127 |  | 
|  | 128 |  | 
|  | 129 | // FIXME: ASAN build is broken for a while, but was not discovered | 
|  | 130 | // since new PM silently suppressed ASAN. Temporarily turn off ASAN | 
|  | 131 | // to unblock the compiler upgrade process. | 
|  | 132 | // address: true, | 
|  | 133 | // http://b/139747256 | 
|  | 134 | address: false, | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 135 | }, | 
|  | 136 | } |