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