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