Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 1 | // Copyright 2010 The Android Open Source Project |
| 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. |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 14 | package { |
| 15 | // See: http://go/android-license-faq |
| 16 | // A large-scale-change added 'default_applicable_licenses' to import |
| 17 | // all of the 'license_kinds' from "frameworks_native_license" |
| 18 | // to get the below license kinds: |
| 19 | // SPDX-license-identifier-Apache-2.0 |
| 20 | default_applicable_licenses: ["frameworks_native_license"], |
John Reck | 38bc8a8 | 2024-02-21 17:08:27 -0500 | [diff] [blame] | 21 | default_team: "trendy_team_android_core_graphics_stack", |
Bob Badour | 3306e49 | 2021-02-25 15:35:37 -0800 | [diff] [blame] | 22 | } |
| 23 | |
Ady Abraham | 107788e | 2023-10-17 12:31:08 -0700 | [diff] [blame] | 24 | aconfig_declarations { |
| 25 | name: "libgui_flags", |
| 26 | package: "com.android.graphics.libgui.flags", |
Oriol Prieto Gasco | 33fd22e | 2024-02-06 18:34:41 +0000 | [diff] [blame] | 27 | container: "system", |
Ady Abraham | 107788e | 2023-10-17 12:31:08 -0700 | [diff] [blame] | 28 | srcs: ["libgui_flags.aconfig"], |
| 29 | } |
| 30 | |
| 31 | cc_aconfig_library { |
| 32 | name: "libguiflags", |
| 33 | host_supported: true, |
| 34 | vendor_available: true, |
| 35 | min_sdk_version: "29", |
| 36 | apex_available: [ |
| 37 | "//apex_available:platform", |
| 38 | "com.android.media.swcodec", |
| 39 | "test_com.android.media.swcodec", |
| 40 | ], |
| 41 | aconfig_declarations: "libgui_flags", |
| 42 | } |
| 43 | |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 44 | cc_library_headers { |
| 45 | name: "libgui_headers", |
| 46 | vendor_available: true, |
| 47 | export_include_dirs: ["include"], |
Lajos Molnar | 7aa71e7 | 2019-04-01 15:34:32 -0700 | [diff] [blame] | 48 | |
| 49 | // we must build this module to get the required header as that is generated |
Marco Nelissen | cb04dee | 2019-10-28 12:55:47 -0700 | [diff] [blame] | 50 | export_shared_lib_headers: [ |
| 51 | "android.hidl.token@1.0-utils", |
| 52 | "android.hardware.graphics.bufferqueue@1.0", |
| 53 | "android.hardware.graphics.bufferqueue@2.0", |
| 54 | ], |
| 55 | shared_libs: [ |
| 56 | "android.hidl.token@1.0-utils", |
| 57 | "android.hardware.graphics.bufferqueue@1.0", |
| 58 | "android.hardware.graphics.bufferqueue@2.0", |
| 59 | ], |
Ady Abraham | 107788e | 2023-10-17 12:31:08 -0700 | [diff] [blame] | 60 | static_libs: ["libguiflags"], |
| 61 | export_static_lib_headers: ["libguiflags"], |
Jooyung Han | 7bcb893 | 2020-04-16 18:48:32 +0900 | [diff] [blame] | 62 | min_sdk_version: "29", |
Ray Essick | eed53a0 | 2022-02-09 09:40:20 -0800 | [diff] [blame] | 63 | // TODO(b/218719284) can media use be constrained to libgui_bufferqueue_static? |
| 64 | apex_available: [ |
| 65 | "//apex_available:platform", |
| 66 | "com.android.media.swcodec", |
| 67 | "test_com.android.media.swcodec", |
| 68 | ], |
Jiyong Park | 172bd72 | 2017-06-21 12:14:18 +0900 | [diff] [blame] | 69 | } |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 70 | |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 71 | cc_library_headers { |
| 72 | name: "libgui_aidl_headers", |
| 73 | vendor_available: true, |
| 74 | static_libs: [ |
| 75 | "libgui_aidl_static", |
| 76 | ], |
| 77 | |
| 78 | export_static_lib_headers: [ |
| 79 | "libgui_aidl_static", |
| 80 | ], |
| 81 | } |
| 82 | |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 83 | // AIDL files that should be exposed to java |
| 84 | filegroup { |
| 85 | name: "guiconstants_aidl", |
| 86 | srcs: [ |
Vishnu Nair | 9cf4a4d | 2021-09-17 12:16:08 -0700 | [diff] [blame] | 87 | "android/gui/DropInputMode.aidl", |
Patrick Williams | 090ad06 | 2023-08-08 12:30:10 -0500 | [diff] [blame] | 88 | "android/gui/StalledTransactionInfo.aidl", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 89 | "android/**/TouchOcclusionMode.aidl", |
Vishnu Nair | 9e0017e | 2024-05-22 19:02:44 +0000 | [diff] [blame^] | 90 | "android/gui/TrustedOverlay.aidl", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 91 | ], |
| 92 | } |
| 93 | |
Vinh Tran | 6bd7563 | 2023-04-14 18:55:25 -0400 | [diff] [blame] | 94 | filegroup { |
| 95 | name: "android_gui_aidl", |
| 96 | srcs: [ |
| 97 | "android/gui/DisplayInfo.aidl", |
| 98 | "android/gui/FocusRequest.aidl", |
| 99 | "android/gui/InputApplicationInfo.aidl", |
| 100 | "android/gui/IWindowInfosListener.aidl", |
Patrick Williams | acd2258 | 2023-07-12 13:47:28 -0500 | [diff] [blame] | 101 | "android/gui/IWindowInfosPublisher.aidl", |
Vinh Tran | 6bd7563 | 2023-04-14 18:55:25 -0400 | [diff] [blame] | 102 | "android/gui/IWindowInfosReportedListener.aidl", |
| 103 | "android/gui/WindowInfo.aidl", |
Patrick Williams | d828f30 | 2023-04-28 17:52:08 -0500 | [diff] [blame] | 104 | "android/gui/WindowInfosUpdate.aidl", |
Vinh Tran | 6bd7563 | 2023-04-14 18:55:25 -0400 | [diff] [blame] | 105 | ], |
| 106 | } |
| 107 | |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 108 | cc_library_static { |
| 109 | name: "libgui_window_info_static", |
| 110 | vendor_available: true, |
| 111 | host_supported: true, |
| 112 | srcs: [ |
| 113 | ":guiconstants_aidl", |
Prabir Pradhan | de78850 | 2021-12-22 00:26:07 -0800 | [diff] [blame] | 114 | ":inputconstants_aidl", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 115 | "android/gui/DisplayInfo.aidl", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 116 | "android/gui/FocusRequest.aidl", |
| 117 | "android/gui/InputApplicationInfo.aidl", |
chaviw | 60c9d3e | 2021-06-04 12:52:17 -0500 | [diff] [blame] | 118 | "android/gui/IWindowInfosListener.aidl", |
Patrick Williams | acd2258 | 2023-07-12 13:47:28 -0500 | [diff] [blame] | 119 | "android/gui/IWindowInfosPublisher.aidl", |
chaviw | bf023a6 | 2021-06-07 16:00:06 -0500 | [diff] [blame] | 120 | "android/gui/IWindowInfosReportedListener.aidl", |
Patrick Williams | d828f30 | 2023-04-28 17:52:08 -0500 | [diff] [blame] | 121 | "android/gui/WindowInfosUpdate.aidl", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 122 | "android/gui/WindowInfo.aidl", |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 123 | "DisplayInfo.cpp", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 124 | "WindowInfo.cpp", |
Patrick Williams | d828f30 | 2023-04-28 17:52:08 -0500 | [diff] [blame] | 125 | "WindowInfosUpdate.cpp", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 126 | ], |
| 127 | |
| 128 | shared_libs: [ |
| 129 | "libbinder", |
| 130 | ], |
| 131 | |
| 132 | local_include_dirs: [ |
| 133 | "include", |
| 134 | ], |
| 135 | |
| 136 | export_shared_lib_headers: [ |
| 137 | "libbinder", |
| 138 | ], |
| 139 | |
| 140 | static_libs: [ |
| 141 | "libui-types", |
| 142 | ], |
| 143 | |
| 144 | aidl: { |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 145 | export_aidl_headers: true, |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 146 | }, |
| 147 | |
| 148 | include_dirs: [ |
| 149 | "frameworks/native/include", |
| 150 | ], |
Jerome Gaillard | aecaf0a | 2021-07-08 15:34:16 +0100 | [diff] [blame] | 151 | |
| 152 | target: { |
| 153 | darwin: { |
| 154 | enabled: false, |
| 155 | }, |
| 156 | }, |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 157 | } |
| 158 | |
Carlos Martinez Romero | 682a45b | 2024-02-26 10:58:58 -0800 | [diff] [blame] | 159 | filegroup { |
| 160 | name: "libgui_extra_aidl_files", |
| 161 | srcs: [ |
Vinh Tran | cbbf330 | 2023-05-25 09:19:56 -0400 | [diff] [blame] | 162 | "android/gui/DisplayInfo.aidl", |
| 163 | "android/gui/FocusRequest.aidl", |
| 164 | "android/gui/InputApplicationInfo.aidl", |
| 165 | "android/gui/IWindowInfosListener.aidl", |
Patrick Williams | acd2258 | 2023-07-12 13:47:28 -0500 | [diff] [blame] | 166 | "android/gui/IWindowInfosPublisher.aidl", |
Vinh Tran | cbbf330 | 2023-05-25 09:19:56 -0400 | [diff] [blame] | 167 | "android/gui/IWindowInfosReportedListener.aidl", |
Patrick Williams | 090ad06 | 2023-08-08 12:30:10 -0500 | [diff] [blame] | 168 | "android/gui/StalledTransactionInfo.aidl", |
Vinh Tran | cbbf330 | 2023-05-25 09:19:56 -0400 | [diff] [blame] | 169 | "android/gui/WindowInfo.aidl", |
| 170 | "android/gui/WindowInfosUpdate.aidl", |
| 171 | ], |
| 172 | } |
| 173 | |
Carlos Martinez Romero | 682a45b | 2024-02-26 10:58:58 -0800 | [diff] [blame] | 174 | filegroup { |
| 175 | name: "libgui_extra_unstructured_aidl_files", |
| 176 | srcs: [ |
| 177 | "android/gui/DisplayInfo.aidl", |
| 178 | "android/gui/InputApplicationInfo.aidl", |
| 179 | "android/gui/WindowInfo.aidl", |
| 180 | "android/gui/WindowInfosUpdate.aidl", |
| 181 | ], |
| 182 | } |
| 183 | |
| 184 | aidl_library { |
| 185 | name: "libgui_aidl_hdrs", |
| 186 | hdrs: [":libgui_extra_aidl_files"], |
| 187 | } |
| 188 | |
| 189 | aidl_library { |
| 190 | name: "libgui_extra_unstructured_aidl_hdrs", |
| 191 | hdrs: [":libgui_extra_unstructured_aidl_files"], |
| 192 | } |
| 193 | |
Vinh Tran | cbbf330 | 2023-05-25 09:19:56 -0400 | [diff] [blame] | 194 | aidl_library { |
Pablo Gamito | 6ee484d | 2020-07-30 14:26:28 +0000 | [diff] [blame] | 195 | name: "libgui_aidl", |
| 196 | srcs: ["aidl/**/*.aidl"], |
Vinh Tran | cbbf330 | 2023-05-25 09:19:56 -0400 | [diff] [blame] | 197 | strip_import_prefix: "aidl", |
Carlos Martinez Romero | 682a45b | 2024-02-26 10:58:58 -0800 | [diff] [blame] | 198 | deps: [ |
| 199 | "libgui_aidl_hdrs", |
| 200 | "libgui_extra_unstructured_aidl_hdrs", |
| 201 | ], |
Pablo Gamito | 6ee484d | 2020-07-30 14:26:28 +0000 | [diff] [blame] | 202 | } |
| 203 | |
Huihong Luo | 0a81aa3 | 2022-02-22 16:02:36 -0800 | [diff] [blame] | 204 | filegroup { |
| 205 | name: "libgui_frame_event_aidl", |
| 206 | srcs: ["aidl/android/gui/FrameEvent.aidl"], |
| 207 | path: "aidl/", |
| 208 | } |
| 209 | |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 210 | cc_library_static { |
| 211 | name: "libgui_aidl_static", |
| 212 | vendor_available: true, |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 213 | |
| 214 | shared_libs: [ |
| 215 | "libbinder", |
| 216 | "libui", |
| 217 | ], |
| 218 | |
| 219 | local_include_dirs: [ |
| 220 | "include", |
| 221 | ], |
| 222 | |
Huihong Luo | 02186fb | 2022-02-23 14:21:54 -0800 | [diff] [blame] | 223 | include_dirs: [ |
| 224 | "frameworks/native/include", |
| 225 | ], |
| 226 | |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 227 | export_shared_lib_headers: [ |
| 228 | "libbinder", |
| 229 | ], |
| 230 | |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 231 | static_libs: [ |
| 232 | "libui-types", |
Huihong Luo | 02186fb | 2022-02-23 14:21:54 -0800 | [diff] [blame] | 233 | "libgui_window_info_static", |
chaviw | 3277faf | 2021-05-19 16:45:23 -0500 | [diff] [blame] | 234 | ], |
| 235 | |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 236 | aidl: { |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 237 | export_aidl_headers: true, |
Vinh Tran | cbbf330 | 2023-05-25 09:19:56 -0400 | [diff] [blame] | 238 | libs: ["libgui_aidl"], |
Prabir Pradhan | 48f8cb9 | 2021-08-26 14:05:36 -0700 | [diff] [blame] | 239 | }, |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 240 | } |
| 241 | |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 242 | filegroup { |
| 243 | name: "libgui-sources", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 244 | srcs: [ |
Vinh Tran | 9ccb8dd | 2022-08-09 15:38:48 -0400 | [diff] [blame] | 245 | ":framework_native_aidl_binder", |
| 246 | ":framework_native_aidl_gui", |
Siarhei Vishniakou | fc434ac | 2021-01-13 10:28:00 -1000 | [diff] [blame] | 247 | ":inputconstants_aidl", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 248 | ":libgui_bufferqueue_sources", |
| 249 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 250 | "BitTube.cpp", |
Robert Carr | 78c25dd | 2019-08-15 14:10:33 -0700 | [diff] [blame] | 251 | "BLASTBufferQueue.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 252 | "BufferItemConsumer.cpp", |
Rachel Lee | 273c18c | 2022-12-13 14:35:07 -0800 | [diff] [blame] | 253 | "Choreographer.cpp", |
Dominik Laskowski | 5a5e01e | 2022-07-08 07:52:44 -0700 | [diff] [blame] | 254 | "CompositorTiming.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 255 | "ConsumerBase.cpp", |
| 256 | "CpuConsumer.cpp", |
Ady Abraham | a3b08ef | 2019-07-15 18:43:10 -0700 | [diff] [blame] | 257 | "DebugEGLImageTracker.cpp", |
Alec Mouri | 77a5387 | 2019-10-28 16:44:36 -0700 | [diff] [blame] | 258 | "DisplayEventDispatcher.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 259 | "DisplayEventReceiver.cpp", |
Alec Mouri | 0e7d8fd | 2023-05-03 23:58:43 +0000 | [diff] [blame] | 260 | "FenceMonitor.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 261 | "GLConsumer.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 262 | "IConsumerListener.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 263 | "IGraphicBufferConsumer.cpp", |
| 264 | "IGraphicBufferProducer.cpp", |
| 265 | "IProducerListener.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 266 | "ISurfaceComposer.cpp", |
Marissa Wall | 7a9b6ff | 2018-08-21 17:26:20 -0700 | [diff] [blame] | 267 | "ITransactionCompletedListener.cpp", |
Evan Rosky | 1f6d6d5 | 2018-12-06 10:47:26 -0800 | [diff] [blame] | 268 | "LayerMetadata.cpp", |
Chavi Weingarten | c78f53c | 2023-04-14 18:50:53 +0000 | [diff] [blame] | 269 | "LayerStatePermissions.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 270 | "LayerState.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 271 | "OccupancyTracker.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 272 | "StreamSplitter.cpp", |
chaviw | 0ef7caa | 2021-01-05 11:04:50 -0800 | [diff] [blame] | 273 | "ScreenCaptureResults.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 274 | "Surface.cpp", |
| 275 | "SurfaceControl.cpp", |
| 276 | "SurfaceComposerClient.cpp", |
| 277 | "SyncFeatures.cpp", |
Rachel Lee | 18c3437 | 2022-01-20 13:57:18 -0800 | [diff] [blame] | 278 | "VsyncEventData.cpp", |
Mathias Agopian | 05debe1 | 2017-02-08 17:04:18 -0800 | [diff] [blame] | 279 | "view/Surface.cpp", |
chaviw | 60c9d3e | 2021-06-04 12:52:17 -0500 | [diff] [blame] | 280 | "WindowInfosListenerReporter.cpp", |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 281 | "bufferqueue/1.0/B2HProducerListener.cpp", |
| 282 | "bufferqueue/1.0/H2BGraphicBufferProducer.cpp", |
| 283 | "bufferqueue/2.0/B2HProducerListener.cpp", |
| 284 | "bufferqueue/2.0/H2BGraphicBufferProducer.cpp", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 285 | ], |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 286 | } |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 287 | |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 288 | cc_defaults { |
| 289 | name: "libgui-defaults", |
| 290 | defaults: ["libgui_bufferqueue-defaults"], |
| 291 | srcs: [":libgui-sources"], |
| 292 | static_libs: [ |
| 293 | "libgui_aidl_static", |
| 294 | "libgui_window_info_static", |
| 295 | "libguiflags", |
| 296 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 297 | shared_libs: [ |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 298 | "libbinder", |
Liz Kammer | 7994df2 | 2023-05-04 12:25:58 +0000 | [diff] [blame] | 299 | "libGLESv2", |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 300 | ], |
Ady Abraham | 107788e | 2023-10-17 12:31:08 -0700 | [diff] [blame] | 301 | export_static_lib_headers: [ |
| 302 | "libguiflags", |
| 303 | ], |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 304 | } |
| 305 | |
| 306 | cc_library_shared { |
| 307 | name: "libgui", |
| 308 | vendor_available: true, |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 309 | double_loadable: true, |
| 310 | |
| 311 | defaults: [ |
| 312 | "libgui-defaults", |
| 313 | ], |
| 314 | |
| 315 | export_static_lib_headers: [ |
| 316 | "libgui_aidl_static", |
| 317 | "libgui_window_info_static", |
| 318 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 319 | |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 320 | export_shared_lib_headers: [ |
| 321 | "libbinder", |
| 322 | ], |
| 323 | |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 324 | export_header_lib_headers: [ |
| 325 | "libgui_aidl_headers", |
Rachel Lee | 273c18c | 2022-12-13 14:35:07 -0800 | [diff] [blame] | 326 | "jni_headers", |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 327 | ], |
| 328 | |
Daichi Hirono | f474d3d | 2019-11-05 08:54:07 +0900 | [diff] [blame] | 329 | aidl: { |
| 330 | export_aidl_headers: true, |
Yi Kong | ccc1c7c | 2021-02-22 17:44:17 +0800 | [diff] [blame] | 331 | }, |
| 332 | |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 333 | header_libs: [ |
Rachel Lee | 273c18c | 2022-12-13 14:35:07 -0800 | [diff] [blame] | 334 | "jni_headers", |
Alec Mouri | cdedc5d | 2021-03-01 22:39:55 -0800 | [diff] [blame] | 335 | "libdvr_headers", |
| 336 | "libgui_aidl_headers", |
| 337 | "libpdx_headers", |
| 338 | ], |
| 339 | |
Yi Kong | 7cd72c5 | 2021-12-23 15:51:29 +0800 | [diff] [blame] | 340 | afdo: true, |
Yi Kong | b1f2d20 | 2021-02-23 17:52:42 +0800 | [diff] [blame] | 341 | |
| 342 | lto: { |
| 343 | thin: true, |
| 344 | }, |
Chavi Weingarten | e0237bb | 2023-02-06 21:48:32 +0000 | [diff] [blame] | 345 | |
| 346 | cflags: [ |
| 347 | "-Wthread-safety", |
| 348 | ], |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 349 | } |
| 350 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 351 | // Used by media codec services exclusively as a static lib for |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 352 | // core bufferqueue support only. |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 353 | cc_library_static { |
| 354 | name: "libgui_bufferqueue_static", |
| 355 | vendor_available: true, |
Jooyung Han | 54042e0 | 2020-05-13 16:04:07 +0900 | [diff] [blame] | 356 | apex_available: [ |
| 357 | "//apex_available:platform", |
| 358 | "com.android.media.swcodec", |
| 359 | ], |
| 360 | min_sdk_version: "29", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 361 | |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 362 | cflags: [ |
Chong Zhang | 6249309 | 2020-01-15 16:04:47 -0800 | [diff] [blame] | 363 | "-DNO_BINDER", |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 364 | ], |
| 365 | |
| 366 | defaults: ["libgui_bufferqueue-defaults"], |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 367 | |
| 368 | srcs: [ |
Huihong Luo | 02186fb | 2022-02-23 14:21:54 -0800 | [diff] [blame] | 369 | ":libgui_frame_event_aidl", |
Siarhei Vishniakou | fc434ac | 2021-01-13 10:28:00 -1000 | [diff] [blame] | 370 | ":inputconstants_aidl", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 371 | ":libgui_bufferqueue_sources", |
| 372 | ], |
Huihong Luo | 02186fb | 2022-02-23 14:21:54 -0800 | [diff] [blame] | 373 | |
| 374 | aidl: { |
| 375 | include_dirs: [ |
| 376 | "frameworks/native/libs/gui", |
| 377 | ], |
| 378 | }, |
Chong Zhang | dbfaf4d | 2019-05-03 10:33:18 -0700 | [diff] [blame] | 379 | } |
| 380 | |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 381 | filegroup { |
| 382 | name: "libgui_bufferqueue_sources", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 383 | srcs: [ |
Yin-Chia Yeh | 64ee5f5 | 2020-01-02 17:53:18 +0700 | [diff] [blame] | 384 | "BatchBufferOps.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 385 | "BufferItem.cpp", |
| 386 | "BufferQueue.cpp", |
| 387 | "BufferQueueConsumer.cpp", |
| 388 | "BufferQueueCore.cpp", |
| 389 | "BufferQueueProducer.cpp", |
| 390 | "BufferQueueThreadState.cpp", |
| 391 | "BufferSlot.cpp", |
Ady Abraham | 6cdd3fd | 2023-09-07 18:45:58 -0700 | [diff] [blame] | 392 | "FrameRateUtils.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 393 | "FrameTimestamps.cpp", |
| 394 | "GLConsumerUtils.cpp", |
| 395 | "HdrMetadata.cpp", |
Yin-Chia Yeh | 64ee5f5 | 2020-01-02 17:53:18 +0700 | [diff] [blame] | 396 | "IGraphicBufferProducerFlattenables.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 397 | "bufferqueue/1.0/Conversion.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 398 | "bufferqueue/1.0/H2BProducerListener.cpp", |
| 399 | "bufferqueue/1.0/WProducerListener.cpp", |
| 400 | "bufferqueue/2.0/B2HGraphicBufferProducer.cpp", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 401 | "bufferqueue/2.0/H2BProducerListener.cpp", |
| 402 | "bufferqueue/2.0/types.cpp", |
| 403 | ], |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 404 | } |
| 405 | |
| 406 | // Common build config shared by libgui and libgui_bufferqueue_static. |
| 407 | cc_defaults { |
| 408 | name: "libgui_bufferqueue-defaults", |
| 409 | |
Sally Qi | 6920a2f | 2022-08-26 10:40:05 -0700 | [diff] [blame] | 410 | defaults: ["android.hardware.graphics.common-ndk_shared"], |
| 411 | |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 412 | cflags: [ |
| 413 | "-Wall", |
| 414 | "-Werror", |
| 415 | ], |
| 416 | |
| 417 | cppflags: [ |
| 418 | "-Wextra", |
| 419 | "-DDEBUG_ONLY_CODE=0", |
| 420 | ], |
| 421 | |
| 422 | product_variables: { |
| 423 | eng: { |
| 424 | cppflags: [ |
| 425 | "-UDEBUG_ONLY_CODE", |
| 426 | "-DDEBUG_ONLY_CODE=1", |
| 427 | ], |
| 428 | }, |
| 429 | }, |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 430 | |
David Stevens | 7347f0b | 2020-01-15 20:19:22 +0900 | [diff] [blame] | 431 | whole_static_libs: [ |
Trevor Radcliffe | ba8800d | 2022-07-08 17:58:06 +0000 | [diff] [blame] | 432 | "libLibGuiProperties", |
David Stevens | 7347f0b | 2020-01-15 20:19:22 +0900 | [diff] [blame] | 433 | ], |
| 434 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 435 | shared_libs: [ |
| 436 | "android.hardware.graphics.bufferqueue@1.0", |
| 437 | "android.hardware.graphics.bufferqueue@2.0", |
| 438 | "android.hardware.graphics.common@1.1", |
| 439 | "android.hardware.graphics.common@1.2", |
| 440 | "android.hidl.token@1.0-utils", |
| 441 | "libbase", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 442 | "libcutils", |
| 443 | "libEGL", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 444 | "libhidlbase", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 445 | "liblog", |
| 446 | "libnativewindow", |
| 447 | "libsync", |
| 448 | "libui", |
| 449 | "libutils", |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 450 | ], |
| 451 | |
Steven Moreland | 2b3f3cd | 2020-01-31 14:56:45 -0800 | [diff] [blame] | 452 | static_libs: [ |
| 453 | "libbinderthreadstateutils", |
| 454 | ], |
| 455 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 456 | header_libs: [ |
| 457 | "libgui_headers", |
| 458 | "libnativebase_headers", |
| 459 | ], |
| 460 | |
Ady Abraham | 62f216c | 2020-10-13 19:07:23 -0700 | [diff] [blame] | 461 | include_dirs: [ |
| 462 | "frameworks/native/include", |
| 463 | ], |
| 464 | |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 465 | export_shared_lib_headers: [ |
Chong Zhang | 60fa4fd | 2019-04-19 10:00:27 -0700 | [diff] [blame] | 466 | "libEGL", |
| 467 | "libnativewindow", |
| 468 | "libui", |
| 469 | "android.hardware.graphics.bufferqueue@1.0", |
| 470 | "android.hardware.graphics.bufferqueue@2.0", |
| 471 | "android.hardware.graphics.common@1.1", |
| 472 | "android.hardware.graphics.common@1.2", |
| 473 | "android.hidl.token@1.0-utils", |
| 474 | ], |
| 475 | |
| 476 | export_header_lib_headers: [ |
| 477 | "libgui_headers", |
| 478 | ], |
| 479 | |
| 480 | export_include_dirs: [ |
| 481 | "include", |
| 482 | ], |
| 483 | } |
| 484 | |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 485 | // GMocks for use by external code |
| 486 | cc_library_static { |
| 487 | name: "libgui_mocks", |
| 488 | vendor_available: false, |
| 489 | |
| 490 | defaults: ["libgui_bufferqueue-defaults"], |
| 491 | static_libs: [ |
| 492 | "libgtest", |
| 493 | "libgmock", |
Ady Abraham | 107788e | 2023-10-17 12:31:08 -0700 | [diff] [blame] | 494 | "libguiflags", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 495 | ], |
| 496 | |
| 497 | srcs: [ |
Huihong Luo | 0a81aa3 | 2022-02-22 16:02:36 -0800 | [diff] [blame] | 498 | ":libgui_frame_event_aidl", |
Lloyd Pique | 1ebe090 | 2019-10-04 14:47:13 -0700 | [diff] [blame] | 499 | "mock/GraphicBufferConsumer.cpp", |
| 500 | "mock/GraphicBufferProducer.cpp", |
| 501 | ], |
| 502 | } |
| 503 | |
Dan Willemsen | 3106c1c | 2016-10-03 23:56:51 -0700 | [diff] [blame] | 504 | subdirs = ["tests"] |