1// Copyright (C) 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. 14 15package { 16 default_applicable_licenses: ["frameworks_native_libs_ui_license"], 17 default_team: "trendy_team_android_core_graphics_stack", 18} 19 20// Added automatically by a large-scale-change 21// See: http://go/android-license-faq 22license { 23 name: "frameworks_native_libs_ui_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 ], 28 license_text: [ 29 "NOTICE", 30 ], 31} 32 33cc_library_headers { 34 name: "libui_fuzzableDataspaces_headers", 35 export_include_dirs: ["include/ui/fuzzer/"], 36} 37 38cc_defaults { 39 name: "libui-defaults", 40 cflags: [ 41 "-Wall", 42 "-Werror", 43 ], 44 cppflags: [ 45 "-Wextra", 46 ], 47 48 sanitize: { 49 integer_overflow: true, 50 misc_undefined: ["bounds"], 51 }, 52} 53 54cc_library_static { 55 name: "libui-types", 56 vendor_available: true, 57 host_supported: true, 58 target: { 59 windows: { 60 enabled: true, 61 }, 62 }, 63 64 defaults: [ 65 "libui-defaults", 66 ], 67 68 apex_available: [ 69 "//apex_available:anyapex", 70 "//apex_available:platform", 71 ], 72 min_sdk_version: "apex_inherit", 73 74 shared_libs: [ 75 "libbase", 76 "libutils", 77 ], 78 79 static_libs: [ 80 "libarect", 81 "libmath", 82 ], 83 84 srcs: [ 85 "ColorSpace.cpp", 86 "Rect.cpp", 87 "Region.cpp", 88 "Transform.cpp", 89 ], 90 91 export_include_dirs: [ 92 "include", 93 "include_mock", 94 "include_private", 95 "include_types", 96 ], 97 98 export_static_lib_headers: [ 99 "libarect", 100 "libmath", 101 ], 102 103} 104 105cc_library_shared { 106 name: "libui", 107 vendor_available: true, 108 double_loadable: true, 109 110 cflags: [ 111 "-Wall", 112 "-Werror", 113 ], 114 cppflags: [ 115 "-Wextra", 116 ], 117 118 sanitize: { 119 integer_overflow: true, 120 misc_undefined: ["bounds"], 121 }, 122 123 srcs: [ 124 "DebugUtils.cpp", 125 "DeviceProductInfo.cpp", 126 "DisplayIdentification.cpp", 127 "DynamicDisplayInfo.cpp", 128 "Fence.cpp", 129 "FenceTime.cpp", 130 "FrameStats.cpp", 131 "Gralloc.cpp", 132 "Gralloc2.cpp", 133 "Gralloc3.cpp", 134 "Gralloc4.cpp", 135 "Gralloc5.cpp", 136 "GraphicBuffer.cpp", 137 "GraphicBufferAllocator.cpp", 138 "GraphicBufferMapper.cpp", 139 "PictureProfileHandle.cpp", 140 "PixelFormat.cpp", 141 "PublicFormat.cpp", 142 "StaticAsserts.cpp", 143 ], 144 145 include_dirs: [ 146 "frameworks/native/include", 147 ], 148 export_include_dirs: [ 149 "include", 150 "include_private", 151 ], 152 153 defaults: [ 154 "android.hardware.graphics.allocator-ndk_shared", 155 "android.hardware.graphics.common-ndk_shared", 156 "libui-defaults", 157 // Uncomment the following line to enable VALIDATE_REGIONS traces 158 //defaults: ["libui-validate-regions-defaults"], 159 ], 160 161 shared_libs: [ 162 "[email protected]", 163 "[email protected]", 164 "[email protected]", 165 "[email protected]", 166 "[email protected]", 167 "[email protected]", 168 "[email protected]", 169 "[email protected]", 170 "libbase", 171 "libbinder_ndk", 172 "libcutils", 173 "libgralloctypes", 174 "libhidlbase", 175 "libsync", 176 "libutils", 177 "liblog", 178 "libvndksupport", 179 ], 180 181 export_shared_lib_headers: [ 182 "[email protected]", 183 "[email protected]", 184 "libgralloctypes", 185 ], 186 187 static_libs: [ 188 "libaidlcommonsupport", 189 "libarect", 190 "libgrallocusage", 191 "libmath", 192 ], 193 194 whole_static_libs: [ 195 "libui-types", 196 ], 197 198 // bufferhub is not used when building libgui for vendors 199 target: { 200 vendor: { 201 cflags: ["-DLIBUI_IN_VNDK"], 202 exclude_srcs: [ 203 ], 204 exclude_header_libs: [ 205 ], 206 exclude_shared_libs: [ 207 ], 208 }, 209 }, 210 211 header_libs: [ 212 "libbase_headers", 213 "libnativebase_headers", 214 "libnativewindow_headers", 215 "libhardware_headers", 216 "libui_headers", 217 "libimapper_stablec", 218 "libimapper_providerutils", 219 ], 220 221 export_static_lib_headers: [ 222 "libarect", 223 "libmath", 224 ], 225 226 export_header_lib_headers: [ 227 "libbase_headers", 228 "libnativebase_headers", 229 "libnativewindow_headers", 230 "libhardware_headers", 231 "libui_headers", 232 ], 233 min_sdk_version: "29", 234 // TODO(b/214400477) to remove use of GraphicBuffer 235 apex_available: [ 236 "//apex_available:platform", 237 "com.android.media.swcodec", 238 "test_com.android.media.swcodec", 239 ], 240 241 afdo: true, 242} 243 244cc_library_headers { 245 name: "libui_headers", 246 export_include_dirs: ["include"], 247 vendor_available: true, 248 target: { 249 vendor: { 250 cflags: ["-DLIBUI_IN_VNDK"], 251 override_export_include_dirs: ["include_vndk"], 252 }, 253 }, 254 header_libs: [ 255 "libnativewindow_headers", 256 "libmath_headers", 257 ], 258 export_header_lib_headers: [ 259 "libnativewindow_headers", 260 "libmath_headers", 261 ], 262 min_sdk_version: "29", 263 apex_available: [ 264 "//apex_available:platform", 265 "com.android.media.swcodec", 266 "test_com.android.media.swcodec", 267 ], 268} 269 270// defaults to enable VALIDATE_REGIONS traces 271cc_defaults { 272 name: "libui-validate-regions-defaults", 273 shared_libs: ["libutilscallstack"], 274 cflags: ["-DVALIDATE_REGIONS"], 275} 276 277subdirs = [ 278 "tests", 279 "tools", 280] 281