| Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 1 | package { | 
|  | 2 | // See: http://go/android-license-faq | 
|  | 3 | // A large-scale-change added 'default_applicable_licenses' to import | 
|  | 4 | // all of the 'license_kinds' from "frameworks_native_license" | 
|  | 5 | // to get the below license kinds: | 
|  | 6 | //   SPDX-license-identifier-Apache-2.0 | 
|  | 7 | default_applicable_licenses: ["frameworks_native_license"], | 
|  | 8 | } | 
|  | 9 |  | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 10 | cc_defaults { | 
|  | 11 | name: "libcompositionengine_defaults", | 
|  | 12 | defaults: ["surfaceflinger_defaults"], | 
|  | 13 | cflags: [ | 
|  | 14 | "-DLOG_TAG=\"CompositionEngine\"", | 
| Lloyd Pique | 05b67b9 | 2019-09-25 13:16:44 -0700 | [diff] [blame] | 15 | "-DATRACE_TAG=ATRACE_TAG_GRAPHICS", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 16 | ], | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 17 | shared_libs: [ | 
|  | 18 | "android.hardware.graphics.allocator@2.0", | 
|  | 19 | "android.hardware.graphics.composer@2.1", | 
|  | 20 | "android.hardware.graphics.composer@2.2", | 
|  | 21 | "android.hardware.graphics.composer@2.3", | 
| Dominik Laskowski | 25a4e7d | 2019-09-20 14:50:10 -0700 | [diff] [blame] | 22 | "android.hardware.graphics.composer@2.4", | 
| Ady Abraham | e7385f7 | 2021-09-05 00:54:25 -0700 | [diff] [blame] | 23 | "android.hardware.graphics.composer3-V1-ndk", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 24 | "android.hardware.power@1.0", | 
|  | 25 | "android.hardware.power@1.3", | 
|  | 26 | "libbase", | 
|  | 27 | "libcutils", | 
|  | 28 | "libgui", | 
|  | 29 | "liblayers_proto", | 
|  | 30 | "liblog", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 31 | "libnativewindow", | 
| Alec Mouri | e4034bb | 2019-11-19 12:45:54 -0800 | [diff] [blame] | 32 | "libprotobuf-cpp-lite", | 
| Dan Stoza | 269dc4d | 2021-01-15 15:07:43 -0800 | [diff] [blame] | 33 | "libSurfaceFlingerProp", | 
| Yiwei Zhang | d792705 | 2020-01-13 16:05:01 -0800 | [diff] [blame] | 34 | "libtimestats", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 35 | "libui", | 
|  | 36 | "libutils", | 
|  | 37 | ], | 
|  | 38 | static_libs: [ | 
|  | 39 | "libmath", | 
|  | 40 | "librenderengine", | 
| Alec Mouri | 465b296 | 2021-10-08 16:22:21 -0700 | [diff] [blame] | 41 | "libtonemap", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 42 | "libtrace_proto", | 
| Ady Abraham | e7385f7 | 2021-09-05 00:54:25 -0700 | [diff] [blame] | 43 | "libaidlcommonsupport", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 44 | ], | 
|  | 45 | header_libs: [ | 
| Lloyd Pique | 37c2c9b | 2018-12-04 17:25:10 -0800 | [diff] [blame] | 46 | "android.hardware.graphics.composer@2.1-command-buffer", | 
|  | 47 | "android.hardware.graphics.composer@2.2-command-buffer", | 
|  | 48 | "android.hardware.graphics.composer@2.3-command-buffer", | 
| Peiyong Lin | afa0f57 | 2020-01-13 16:35:02 -0800 | [diff] [blame] | 49 | "android.hardware.graphics.composer@2.4-command-buffer", | 
| Ady Abraham | e7385f7 | 2021-09-05 00:54:25 -0700 | [diff] [blame] | 50 | "android.hardware.graphics.composer3-command-buffer", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 51 | "libsurfaceflinger_headers", | 
|  | 52 | ], | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 53 | } | 
|  | 54 |  | 
|  | 55 | cc_library { | 
|  | 56 | name: "libcompositionengine", | 
|  | 57 | defaults: ["libcompositionengine_defaults"], | 
|  | 58 | srcs: [ | 
| Dan Stoza | 6166c31 | 2021-01-15 16:34:05 -0800 | [diff] [blame] | 59 | "src/planner/CachedSet.cpp", | 
|  | 60 | "src/planner/Flattener.cpp", | 
| Dan Stoza | 269dc4d | 2021-01-15 15:07:43 -0800 | [diff] [blame] | 61 | "src/planner/LayerState.cpp", | 
|  | 62 | "src/planner/Planner.cpp", | 
| Dan Stoza | 47437bb | 2021-01-15 16:21:07 -0800 | [diff] [blame] | 63 | "src/planner/Predictor.cpp", | 
| Alec Mouri | df6201b | 2021-06-01 16:20:42 -0700 | [diff] [blame] | 64 | "src/planner/TexturePool.cpp", | 
| Vishnu Nair | 9b079a2 | 2020-01-21 14:36:08 -0800 | [diff] [blame] | 65 | "src/ClientCompositionRequestCache.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 66 | "src/CompositionEngine.cpp", | 
| Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 67 | "src/Display.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 68 | "src/DisplayColorProfile.cpp", | 
| Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 69 | "src/DisplaySurface.cpp", | 
| Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 70 | "src/DumpHelpers.cpp", | 
| Lloyd Pique | 76ed703 | 2018-12-04 17:24:28 -0800 | [diff] [blame] | 71 | "src/HwcBufferCache.cpp", | 
| Lloyd Pique | 9755fb7 | 2019-03-26 14:44:40 -0700 | [diff] [blame] | 72 | "src/LayerFECompositionState.cpp", | 
| Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 73 | "src/Output.cpp", | 
|  | 74 | "src/OutputCompositionState.cpp", | 
| Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 75 | "src/OutputLayer.cpp", | 
| Lloyd Pique | 37c2c9b | 2018-12-04 17:25:10 -0800 | [diff] [blame] | 76 | "src/OutputLayerCompositionState.cpp", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 77 | "src/RenderSurface.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 78 | ], | 
|  | 79 | local_include_dirs: ["include"], | 
|  | 80 | export_include_dirs: ["include"], | 
|  | 81 | } | 
|  | 82 |  | 
|  | 83 | cc_library { | 
|  | 84 | name: "libcompositionengine_mocks", | 
|  | 85 | defaults: ["libcompositionengine_defaults"], | 
|  | 86 | srcs: [ | 
|  | 87 | "mock/CompositionEngine.cpp", | 
| Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 88 | "mock/Display.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 89 | "mock/DisplayColorProfile.cpp", | 
| Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame] | 90 | "mock/DisplaySurface.cpp", | 
| Lloyd Pique | feb73d7 | 2018-12-04 17:23:44 -0800 | [diff] [blame] | 91 | "mock/LayerFE.cpp", | 
| chaviw | 8beb414 | 2019-04-11 13:09:05 -0700 | [diff] [blame] | 92 | "mock/NativeWindow.cpp", | 
| Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 93 | "mock/Output.cpp", | 
| Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 94 | "mock/OutputLayer.cpp", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 95 | "mock/RenderSurface.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 96 | ], | 
|  | 97 | static_libs: [ | 
|  | 98 | "libgtest", | 
|  | 99 | "libgmock", | 
|  | 100 | "libcompositionengine", | 
|  | 101 | ], | 
|  | 102 | local_include_dirs: ["include"], | 
|  | 103 | export_include_dirs: ["include"], | 
|  | 104 | } | 
|  | 105 |  | 
|  | 106 | cc_test { | 
|  | 107 | name: "libcompositionengine_test", | 
|  | 108 | test_suites: ["device-tests"], | 
|  | 109 | defaults: ["libcompositionengine_defaults"], | 
|  | 110 | srcs: [ | 
| Ady Abraham | cf027d6 | 2021-03-02 18:48:57 -0800 | [diff] [blame] | 111 | "tests/planner/CachedSetTest.cpp", | 
| Ady Abraham | b7db410 | 2021-03-04 12:19:26 -0800 | [diff] [blame] | 112 | "tests/planner/FlattenerTest.cpp", | 
| Alec Mouri | eb920d9 | 2021-03-01 17:48:30 -0800 | [diff] [blame] | 113 | "tests/planner/LayerStateTest.cpp", | 
| Alec Mouri | f6a684b | 2021-03-09 13:00:18 -0800 | [diff] [blame] | 114 | "tests/planner/PredictorTest.cpp", | 
| Alec Mouri | df6201b | 2021-06-01 16:20:42 -0700 | [diff] [blame] | 115 | "tests/planner/TexturePoolTest.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 116 | "tests/CompositionEngineTest.cpp", | 
| Lloyd Pique | 3d0c02e | 2018-10-19 18:38:12 -0700 | [diff] [blame] | 117 | "tests/DisplayColorProfileTest.cpp", | 
| Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 118 | "tests/DisplayTest.cpp", | 
| Lloyd Pique | 76ed703 | 2018-12-04 17:24:28 -0800 | [diff] [blame] | 119 | "tests/HwcBufferCacheTest.cpp", | 
| Lloyd Pique | 35d5824 | 2018-12-18 16:33:25 -0800 | [diff] [blame] | 120 | "tests/MockHWC2.cpp", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 121 | "tests/MockHWComposer.cpp", | 
| Lloyd Pique | 688abd4 | 2019-02-15 15:42:24 -0800 | [diff] [blame] | 122 | "tests/MockPowerAdvisor.cpp", | 
| Lloyd Pique | cc01a45 | 2018-12-04 17:24:00 -0800 | [diff] [blame] | 123 | "tests/OutputLayerTest.cpp", | 
| Marin Shalamanov | 68933fb | 2020-09-10 17:58:12 +0200 | [diff] [blame] | 124 | "tests/OutputTest.cpp", | 
|  | 125 | "tests/ProjectionSpaceTest.cpp", | 
| Lloyd Pique | 31cb294 | 2018-10-19 17:23:03 -0700 | [diff] [blame] | 126 | "tests/RenderSurfaceTest.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 127 | ], | 
|  | 128 | static_libs: [ | 
|  | 129 | "libcompositionengine", | 
|  | 130 | "libcompositionengine_mocks", | 
| Lloyd Pique | aad4ebf | 2019-10-03 17:58:30 -0700 | [diff] [blame] | 131 | "libgui_mocks", | 
| Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 132 | "librenderengine_mocks", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 133 | "libgmock", | 
|  | 134 | "libgtest", | 
|  | 135 | ], | 
|  | 136 | sanitize: { | 
|  | 137 | // By using the address sanitizer, we not only uncover any issues | 
|  | 138 | // with the test, but also any issues with the code under test. | 
|  | 139 | // | 
|  | 140 | // Note: If you get an runtime link error like: | 
|  | 141 | // | 
|  | 142 | //   CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found | 
|  | 143 | // | 
|  | 144 | // it is because the address sanitizer shared objects are not installed | 
|  | 145 | // by default in the system image. | 
|  | 146 | // | 
|  | 147 | // You can either "make dist tests" before flashing, or set this | 
|  | 148 | // option to false temporarily. | 
| Stephen Hines | d3e7589 | 2020-08-19 08:52:56 -0700 | [diff] [blame] | 149 | address: true, | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 150 | }, | 
|  | 151 | } |