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