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