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