Lloyd Pique | e967d48 | 2018-08-31 11:04:49 -0700 | [diff] [blame] | 1 | // Copyright 2018 The Android Open Source Project |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "frameworks_native_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["frameworks_native_license"], |
John Reck | 38bc8a8 | 2024-02-21 17:08:27 -0500 | [diff] [blame] | 22 | default_team: "trendy_team_android_core_graphics_stack", |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 23 | } |
| 24 | |
Lloyd Pique | e98286f | 2024-09-16 16:23:24 -0700 | [diff] [blame] | 25 | // This is a step towards pulling out the "backend" sources to clean up the |
| 26 | // dependency graph between CompositionEngine and SurfaceFlinger. |
| 27 | // MockNativeWindow doesn't strictly belong here, but this works for now so |
| 28 | // that CompositionEngine tests can use these mocks. |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 29 | filegroup { |
Lloyd Pique | e98286f | 2024-09-16 16:23:24 -0700 | [diff] [blame] | 30 | name: "libsurfaceflinger_backend_mock_sources", |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 31 | srcs: [ |
Matt Buckley | 18b9352 | 2024-08-27 05:30:18 +0000 | [diff] [blame] | 32 | ":poweradvisor_mock_sources", |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 33 | "mock/DisplayHardware/MockComposer.cpp", |
| 34 | "mock/DisplayHardware/MockHWC2.cpp", |
Lloyd Pique | e98286f | 2024-09-16 16:23:24 -0700 | [diff] [blame] | 35 | "mock/DisplayHardware/MockHWComposer.cpp", |
Lloyd Pique | e98286f | 2024-09-16 16:23:24 -0700 | [diff] [blame] | 36 | "mock/system/window/MockNativeWindow.cpp", |
| 37 | ], |
| 38 | } |
| 39 | |
| 40 | cc_library_headers { |
| 41 | name: "libsurfaceflinger_backend_mock_headers", |
| 42 | export_include_dirs: ["."], |
| 43 | static_libs: [ |
| 44 | "libgmock", |
| 45 | "libgtest", |
| 46 | ], |
| 47 | export_static_lib_headers: [ |
| 48 | "libgmock", |
| 49 | "libgtest", |
| 50 | ], |
| 51 | } |
| 52 | |
| 53 | filegroup { |
Matt Buckley | 18b9352 | 2024-08-27 05:30:18 +0000 | [diff] [blame] | 54 | name: "poweradvisor_mock_sources", |
| 55 | srcs: [ |
| 56 | "mock/PowerAdvisor/*.cpp", |
| 57 | ], |
| 58 | } |
| 59 | |
| 60 | filegroup { |
Lloyd Pique | e98286f | 2024-09-16 16:23:24 -0700 | [diff] [blame] | 61 | name: "libsurfaceflinger_mock_sources", |
| 62 | srcs: [ |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 63 | "mock/MockEventThread.cpp", |
| 64 | "mock/MockFrameTimeline.cpp", |
| 65 | "mock/MockFrameTracer.cpp", |
| 66 | "mock/MockNativeWindowSurface.cpp", |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 67 | "mock/MockTimeStats.cpp", |
| 68 | "mock/MockVsyncController.cpp", |
Ady Abraham | 011f8ba | 2022-11-22 15:09:07 -0800 | [diff] [blame] | 69 | "mock/MockVSyncDispatch.cpp", |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 70 | "mock/MockVSyncTracker.cpp", |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 71 | ], |
| 72 | } |
| 73 | |
Ady Abraham | 529bd9f | 2023-10-05 14:55:30 -0700 | [diff] [blame] | 74 | cc_aconfig_library { |
| 75 | name: "libsurfaceflingerflags_test", |
| 76 | aconfig_declarations: "surfaceflinger_flags", |
Zi Wang | 8b7ea53 | 2023-11-09 20:14:35 -0800 | [diff] [blame] | 77 | mode: "test", |
Ady Abraham | 529bd9f | 2023-10-05 14:55:30 -0700 | [diff] [blame] | 78 | } |
| 79 | |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 80 | cc_test { |
| 81 | name: "libsurfaceflinger_unittest", |
rnlee | 756005b | 2021-05-27 10:46:36 -0700 | [diff] [blame] | 82 | defaults: [ |
Vishnu Nair | 4df8eb6 | 2022-02-17 15:32:02 -0800 | [diff] [blame] | 83 | "libsurfaceflinger_mocks_defaults", |
rnlee | 756005b | 2021-05-27 10:46:36 -0700 | [diff] [blame] | 84 | "skia_renderengine_deps", |
| 85 | "surfaceflinger_defaults", |
| 86 | ], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 87 | test_suites: ["device-tests"], |
Vishnu Nair | 532d645 | 2024-07-14 22:05:12 -0700 | [diff] [blame] | 88 | header_libs: ["surfaceflinger_tests_common_headers"], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 89 | srcs: [ |
Lloyd Pique | e98286f | 2024-09-16 16:23:24 -0700 | [diff] [blame] | 90 | ":libsurfaceflinger_backend_mock_sources", |
Alec Mouri | e5eb7de | 2022-01-15 00:34:20 +0000 | [diff] [blame] | 91 | ":libsurfaceflinger_mock_sources", |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 92 | ":libsurfaceflinger_sources", |
Matt Buckley | 18b9352 | 2024-08-27 05:30:18 +0000 | [diff] [blame] | 93 | "*.cpp", |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 94 | ], |
Vishnu Nair | 4df8eb6 | 2022-02-17 15:32:02 -0800 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | cc_defaults { |
| 98 | name: "libsurfaceflinger_mocks_defaults", |
Sally Qi | 6920a2f | 2022-08-26 10:40:05 -0700 | [diff] [blame] | 99 | defaults: [ |
| 100 | "android.hardware.graphics.common-ndk_static", |
| 101 | "android.hardware.graphics.composer3-ndk_static", |
Matt Buckley | cc14642 | 2023-06-28 19:14:02 +0000 | [diff] [blame] | 102 | "android.hardware.power-ndk_static", |
Nolan Scobie | 8ef7e14 | 2022-10-14 10:52:43 -0400 | [diff] [blame] | 103 | "librenderengine_deps", |
Matt Buckley | ffc31d1 | 2024-02-28 16:51:28 +0000 | [diff] [blame] | 104 | "libsurfaceflinger_common_test_deps", |
Vishnu Nair | 6aac09e | 2024-07-26 21:38:58 +0000 | [diff] [blame] | 105 | "libsurfaceflinger_proto_deps", |
Sally Qi | 6920a2f | 2022-08-26 10:40:05 -0700 | [diff] [blame] | 106 | ], |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 107 | static_libs: [ |
Ady Abraham | e7385f7 | 2021-09-05 00:54:25 -0700 | [diff] [blame] | 108 | "android.hardware.common-V2-ndk", |
| 109 | "android.hardware.common.fmq-V1-ndk", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 110 | "android.hardware.graphics.composer@2.1", |
| 111 | "android.hardware.graphics.composer@2.2", |
| 112 | "android.hardware.graphics.composer@2.3", |
| 113 | "android.hardware.graphics.composer@2.4", |
| 114 | "android.hardware.power@1.0", |
| 115 | "android.hardware.power@1.1", |
| 116 | "android.hardware.power@1.2", |
| 117 | "android.hardware.power@1.3", |
Ady Abraham | e7385f7 | 2021-09-05 00:54:25 -0700 | [diff] [blame] | 118 | "libaidlcommonsupport", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 119 | "libcompositionengine_mocks", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 120 | "libcompositionengine", |
Adithya Srinivasan | f279e04 | 2020-08-17 14:56:27 -0700 | [diff] [blame] | 121 | "libframetimeline", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 122 | "libgmock", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 123 | "libgui_mocks", |
Mikael Pessa | 2e1608f | 2019-07-19 11:25:35 -0700 | [diff] [blame] | 124 | "libperfetto_client_experimental", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 125 | "librenderengine", |
Dominik Laskowski | f6b4ba6 | 2021-11-09 12:46:10 -0800 | [diff] [blame] | 126 | "librenderengine_mocks", |
| 127 | "libscheduler", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 128 | "libserviceutils", |
| 129 | "libtimestats", |
Tej Singh | e275177 | 2021-04-06 22:05:29 -0700 | [diff] [blame] | 130 | "libtimestats_atoms_proto", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 131 | "libtimestats_proto", |
Alec Mouri | 465b296 | 2021-10-08 16:22:21 -0700 | [diff] [blame] | 132 | "libtonemap", |
Mikael Pessa | 2e1608f | 2019-07-19 11:25:35 -0700 | [diff] [blame] | 133 | "perfetto_trace_protos", |
| 134 | ], |
| 135 | shared_libs: [ |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 136 | "android.hardware.configstore-utils", |
| 137 | "android.hardware.configstore@1.0", |
| 138 | "android.hardware.configstore@1.1", |
| 139 | "android.hardware.graphics.allocator@2.0", |
| 140 | "android.hardware.graphics.allocator@3.0", |
| 141 | "android.hardware.graphics.common@1.2", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 142 | "libbase", |
| 143 | "libbinder", |
Ady Abraham | e7385f7 | 2021-09-05 00:54:25 -0700 | [diff] [blame] | 144 | "libbinder_ndk", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 145 | "libcutils", |
| 146 | "libEGL", |
| 147 | "libfmq", |
| 148 | "libGLESv1_CM", |
| 149 | "libGLESv2", |
| 150 | "libgui", |
| 151 | "libhidlbase", |
| 152 | "libinput", |
| 153 | "liblog", |
| 154 | "libnativewindow", |
Matt Buckley | 0538cae | 2022-11-08 23:12:04 +0000 | [diff] [blame] | 155 | "libpowermanager", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 156 | "libprocessgroup", |
| 157 | "libprotobuf-cpp-lite", |
Alec Mouri | d05a745 | 2024-09-20 13:44:02 +0000 | [diff] [blame] | 158 | "libstatslog_surfaceflinger", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 159 | "libSurfaceFlingerProp", |
| 160 | "libsync", |
| 161 | "libui", |
| 162 | "libutils", |
Vishnu Nair | 47b6e68 | 2024-07-12 18:46:07 +0000 | [diff] [blame] | 163 | "libtracing_perfetto", |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 164 | ], |
| 165 | header_libs: [ |
Dominik Laskowski | 4e0d20d | 2021-12-06 11:31:02 -0800 | [diff] [blame] | 166 | "android.hardware.graphics.composer3-command-buffer", |
Vishnu Nair | df6a4f6 | 2020-11-11 20:25:34 -0800 | [diff] [blame] | 167 | "android.hardware.graphics.composer@2.1-command-buffer", |
| 168 | "android.hardware.graphics.composer@2.2-command-buffer", |
| 169 | "android.hardware.graphics.composer@2.3-command-buffer", |
| 170 | "android.hardware.graphics.composer@2.4-command-buffer", |
Dominik Laskowski | 4e0d20d | 2021-12-06 11:31:02 -0800 | [diff] [blame] | 171 | "libscheduler_test_headers", |
Lloyd Pique | f58625d | 2017-12-19 13:22:33 -0800 | [diff] [blame] | 172 | "libsurfaceflinger_headers", |
| 173 | ], |
| 174 | } |
Vishnu Nair | 4df8eb6 | 2022-02-17 15:32:02 -0800 | [diff] [blame] | 175 | |
| 176 | cc_library_headers { |
| 177 | name: "libsurfaceflinger_mocks_headers", |
| 178 | export_include_dirs: ["."], |
| 179 | } |