Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["frameworks_base_libs_hwui_license"], |
| 3 | } |
| 4 | |
| 5 | // Added automatically by a large-scale-change that took the approach of |
| 6 | // 'apply every license found to every target'. While this makes sure we respect |
| 7 | // every license restriction, it may not be entirely correct. |
| 8 | // |
| 9 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 10 | // |
| 11 | // Please consider splitting the single license below into multiple licenses, |
| 12 | // taking care not to lose any license_kind information, and overriding the |
| 13 | // default license using the 'licenses: [...]' property on targets as needed. |
| 14 | // |
| 15 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 16 | // to attach the license to, and including a comment whether the files may be |
| 17 | // used in the current project. |
| 18 | // See: http://go/android-license-faq |
| 19 | license { |
| 20 | name: "frameworks_base_libs_hwui_license", |
| 21 | visibility: [":__subpackages__"], |
| 22 | license_kinds: [ |
| 23 | "SPDX-license-identifier-Apache-2.0", |
| 24 | "SPDX-license-identifier-BSD", |
| 25 | ], |
| 26 | license_text: [ |
| 27 | "NOTICE", |
| 28 | ], |
| 29 | } |
| 30 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 31 | cc_defaults { |
| 32 | name: "hwui_defaults", |
| 33 | defaults: [ |
| 34 | "hwui_static_deps", |
Pirama Arumuga Nainar | 0dfd4be | 2017-11-16 22:40:00 -0800 | [diff] [blame] | 35 | "skia_deps", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 36 | //"hwui_bugreport_font_cache_usage", |
| 37 | //"hwui_compile_for_perf", |
Pirama Arumuga Nainar | 0dfd4be | 2017-11-16 22:40:00 -0800 | [diff] [blame] | 38 | "hwui_pgo", |
Pirama Arumuga Nainar | b7913e1 | 2018-03-09 00:03:57 +0000 | [diff] [blame] | 39 | "hwui_lto", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 40 | ], |
| 41 | |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 42 | cpp_std: "experimental", |
| 43 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 44 | cflags: [ |
| 45 | "-DEGL_EGLEXT_PROTOTYPES", |
| 46 | "-DGL_GLEXT_PROTOTYPES", |
| 47 | "-DATRACE_TAG=ATRACE_TAG_VIEW", |
| 48 | "-DLOG_TAG=\"OpenGLRenderer\"", |
| 49 | "-Wall", |
| 50 | "-Wno-unused-parameter", |
| 51 | "-Wunreachable-code", |
| 52 | "-Werror", |
| 53 | "-fvisibility=hidden", |
| 54 | |
| 55 | // GCC false-positives on this warning, and since we -Werror that's |
| 56 | // a problem |
| 57 | "-Wno-free-nonheap-object", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 58 | ], |
| 59 | |
| 60 | include_dirs: [ |
| 61 | "external/skia/include/private", |
| 62 | "external/skia/src/core", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 63 | ], |
| 64 | |
| 65 | product_variables: { |
John Reck | 2729418 | 2018-07-11 11:21:09 -0700 | [diff] [blame] | 66 | eng: { |
| 67 | lto: { |
| 68 | never: true, |
| 69 | }, |
| 70 | }, |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 71 | }, |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 72 | |
| 73 | target: { |
| 74 | android: { |
| 75 | include_dirs: [ |
| 76 | "external/skia/src/effects", |
| 77 | "external/skia/src/image", |
| 78 | "external/skia/src/utils", |
| 79 | "external/skia/src/gpu", |
| 80 | "external/skia/src/shaders", |
| 81 | ], |
| 82 | }, |
| 83 | host: { |
| 84 | include_dirs: [ |
| 85 | "external/vulkan-headers/include", |
| 86 | ], |
| 87 | cflags: [ |
| 88 | "-Wno-unused-variable", |
| 89 | ], |
| 90 | } |
| 91 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | cc_defaults { |
| 95 | name: "hwui_static_deps", |
| 96 | shared_libs: [ |
Jerome Gaillard | a02a12d | 2019-05-28 18:07:56 +0100 | [diff] [blame] | 97 | "libbase", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 98 | "libharfbuzz_ng", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 99 | "libminikin", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 100 | ], |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 101 | |
Alec Mouri | 4523801 | 2020-01-29 11:04:40 -0800 | [diff] [blame] | 102 | static_libs: [ |
| 103 | "libui-types", |
| 104 | ], |
| 105 | |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 106 | target: { |
| 107 | android: { |
| 108 | shared_libs: [ |
| 109 | "liblog", |
| 110 | "libcutils", |
| 111 | "libstatslog", |
| 112 | "libutils", |
| 113 | "libEGL", |
| 114 | "libGLESv1_CM", |
| 115 | "libGLESv2", |
| 116 | "libGLESv3", |
| 117 | "libvulkan", |
Alec Mouri | 22d753f | 2019-09-05 17:11:45 -0700 | [diff] [blame] | 118 | "libnativedisplay", |
Derek Sollenberger | e78f7c9 | 2019-07-31 15:18:47 -0400 | [diff] [blame] | 119 | "libnativewindow", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 120 | "libprotobuf-cpp-lite", |
| 121 | "libft2", |
| 122 | "libandroidfw", |
| 123 | "libcrypto", |
| 124 | "libsync", |
Stan Iliev | c904381 | 2020-02-03 16:57:09 -0500 | [diff] [blame] | 125 | "libstatspull", |
| 126 | "libstatssocket", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 127 | ], |
| 128 | static_libs: [ |
| 129 | "libEGL_blobCache", |
Stan Iliev | c904381 | 2020-02-03 16:57:09 -0500 | [diff] [blame] | 130 | "libprotoutil", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 131 | ], |
| 132 | }, |
| 133 | host: { |
| 134 | static_libs: [ |
| 135 | "libandroidfw", |
| 136 | "libutils", |
| 137 | ], |
| 138 | } |
| 139 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | cc_defaults { |
| 143 | name: "hwui_bugreport_font_cache_usage", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 144 | cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"], |
| 145 | } |
| 146 | |
| 147 | cc_defaults { |
| 148 | name: "hwui_compile_for_perf", |
| 149 | // TODO: Non-arm? |
| 150 | cflags: [ |
| 151 | "-fno-omit-frame-pointer", |
| 152 | "-marm", |
| 153 | "-mapcs", |
| 154 | ], |
| 155 | } |
| 156 | |
Pirama Arumuga Nainar | 0dfd4be | 2017-11-16 22:40:00 -0800 | [diff] [blame] | 157 | // Build libhwui with PGO by default. |
| 158 | // Location of PGO profile data is defined in build/soong/cc/pgo.go |
| 159 | // and is separate from hwui. |
| 160 | // To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable |
| 161 | // or set enable_profile_use property to false. |
| 162 | cc_defaults { |
| 163 | name: "hwui_pgo", |
| 164 | |
| 165 | pgo: { |
| 166 | instrumentation: true, |
| 167 | profile_file: "hwui/hwui.profdata", |
| 168 | benchmarks: ["hwui"], |
Zhizhou Yang | 58e1b78 | 2017-12-06 16:59:06 -0800 | [diff] [blame] | 169 | enable_profile_use: true, |
Pirama Arumuga Nainar | 0dfd4be | 2017-11-16 22:40:00 -0800 | [diff] [blame] | 170 | }, |
| 171 | } |
| 172 | |
Zhizhou Yang | f30f112 | 2018-02-26 17:59:38 -0800 | [diff] [blame] | 173 | // Build hwui library with ThinLTO by default. |
| 174 | cc_defaults { |
| 175 | name: "hwui_lto", |
| 176 | target: { |
| 177 | android: { |
| 178 | lto: { |
| 179 | thin: true, |
| 180 | }, |
| 181 | }, |
| 182 | }, |
| 183 | } |
| 184 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 185 | // ------------------------ |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 186 | // framework-graphics jar |
| 187 | // ------------------------ |
| 188 | |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 189 | java_sdk_library { |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 190 | name: "framework-graphics", |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 191 | defaults: ["framework-module-defaults"], |
| 192 | visibility: [ |
| 193 | "//frameworks/base", // Framework |
| 194 | ], |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 195 | |
| 196 | srcs: [ |
| 197 | ":framework-graphics-srcs", |
| 198 | ], |
| 199 | |
| 200 | permitted_packages: [ |
| 201 | "android.graphics", |
| 202 | ], |
| 203 | |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 204 | // TODO: once framework-graphics is officially part of the |
| 205 | // UI-rendering module this line would no longer be |
| 206 | // needed. |
| 207 | installable: true, |
| 208 | |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 209 | // Disable api_lint that the defaults enable |
| 210 | // TODO: enable this |
| 211 | api_lint: { |
| 212 | enabled: false, |
| 213 | }, |
Anton Hansson | 96b08ae | 2020-12-21 16:59:06 +0000 | [diff] [blame] | 214 | // TODO: remove this |
| 215 | unsafe_ignore_missing_latest_api: true, |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | filegroup { |
| 219 | name: "framework-graphics-srcs", |
| 220 | srcs: [ |
| 221 | "apex/java/**/*.java", |
| 222 | ], |
| 223 | path: "apex/java" |
| 224 | } |
| 225 | |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 226 | // ------------------------ |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 227 | // APEX |
| 228 | // ------------------------ |
| 229 | |
| 230 | cc_library_headers { |
| 231 | name: "android_graphics_apex_headers", |
| 232 | |
| 233 | host_supported: true, |
| 234 | export_include_dirs: [ |
| 235 | "apex/include", |
| 236 | ], |
| 237 | target: { |
| 238 | windows: { |
| 239 | enabled: true, |
| 240 | }, |
| 241 | } |
| 242 | } |
| 243 | |
| 244 | cc_defaults { |
| 245 | name: "android_graphics_apex", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 246 | cflags: [ |
| 247 | "-Wno-unused-parameter", |
| 248 | "-Wno-non-virtual-dtor", |
| 249 | "-Wno-maybe-uninitialized", |
| 250 | "-Wno-parentheses", |
| 251 | "-Wall", |
| 252 | "-Werror", |
| 253 | "-Wno-error=deprecated-declarations", |
| 254 | "-Wunused", |
| 255 | "-Wunreachable-code", |
| 256 | ], |
| 257 | |
| 258 | cppflags: ["-Wno-conversion-null"], |
| 259 | |
| 260 | srcs: [ |
| 261 | "apex/android_matrix.cpp", |
| 262 | "apex/android_paint.cpp", |
| 263 | "apex/android_region.cpp", |
| 264 | ], |
| 265 | |
| 266 | header_libs: [ "android_graphics_apex_headers" ], |
| 267 | |
| 268 | target: { |
| 269 | android: { |
| 270 | srcs: [ // sources that depend on android only libraries |
| 271 | "apex/android_bitmap.cpp", |
| 272 | "apex/android_canvas.cpp", |
| 273 | "apex/jni_runtime.cpp", |
| 274 | "apex/renderthread.cpp", |
| 275 | ], |
| 276 | }, |
Derek Sollenberger | c5882c4 | 2019-10-25 11:11:32 -0400 | [diff] [blame] | 277 | host: { |
| 278 | srcs: [ |
| 279 | "apex/LayoutlibLoader.cpp", |
| 280 | ], |
| 281 | } |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 282 | }, |
| 283 | } |
| 284 | |
| 285 | // ------------------------ |
| 286 | // Android Graphics JNI |
| 287 | // ------------------------ |
| 288 | |
| 289 | cc_library_headers { |
| 290 | name: "android_graphics_jni_headers", |
| 291 | |
| 292 | host_supported: true, |
| 293 | export_include_dirs: [ |
| 294 | "jni", |
| 295 | ], |
| 296 | target: { |
| 297 | windows: { |
| 298 | enabled: true, |
| 299 | }, |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | cc_defaults { |
| 304 | name: "android_graphics_jni", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 305 | cflags: [ |
| 306 | "-Wno-unused-parameter", |
| 307 | "-Wno-non-virtual-dtor", |
| 308 | "-Wno-maybe-uninitialized", |
| 309 | "-Wno-parentheses", |
| 310 | |
| 311 | "-DGL_GLEXT_PROTOTYPES", |
| 312 | "-DEGL_EGLEXT_PROTOTYPES", |
| 313 | |
| 314 | "-DU_USING_ICU_NAMESPACE=0", |
| 315 | |
| 316 | "-Wall", |
| 317 | "-Werror", |
| 318 | "-Wno-error=deprecated-declarations", |
| 319 | "-Wunused", |
| 320 | "-Wunreachable-code", |
| 321 | ], |
| 322 | |
| 323 | cppflags: ["-Wno-conversion-null"], |
| 324 | |
| 325 | srcs: [ |
| 326 | "jni/android_graphics_animation_NativeInterpolatorFactory.cpp", |
| 327 | "jni/android_graphics_animation_RenderNodeAnimator.cpp", |
| 328 | "jni/android_graphics_Canvas.cpp", |
| 329 | "jni/android_graphics_ColorSpace.cpp", |
| 330 | "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp", |
| 331 | "jni/android_graphics_drawable_VectorDrawable.cpp", |
| 332 | "jni/android_graphics_HardwareRendererObserver.cpp", |
| 333 | "jni/android_graphics_Matrix.cpp", |
| 334 | "jni/android_graphics_Picture.cpp", |
| 335 | "jni/android_graphics_DisplayListCanvas.cpp", |
| 336 | "jni/android_graphics_RenderNode.cpp", |
| 337 | "jni/android_nio_utils.cpp", |
| 338 | "jni/android_util_PathParser.cpp", |
| 339 | |
| 340 | "jni/Bitmap.cpp", |
| 341 | "jni/BitmapFactory.cpp", |
| 342 | "jni/ByteBufferStreamAdaptor.cpp", |
| 343 | "jni/Camera.cpp", |
| 344 | "jni/CanvasProperty.cpp", |
| 345 | "jni/ColorFilter.cpp", |
| 346 | "jni/CreateJavaOutputStreamAdaptor.cpp", |
| 347 | "jni/FontFamily.cpp", |
| 348 | "jni/FontUtils.cpp", |
| 349 | "jni/Graphics.cpp", |
| 350 | "jni/ImageDecoder.cpp", |
| 351 | "jni/Interpolator.cpp", |
| 352 | "jni/MaskFilter.cpp", |
| 353 | "jni/NinePatch.cpp", |
| 354 | "jni/NinePatchPeeker.cpp", |
| 355 | "jni/Paint.cpp", |
| 356 | "jni/PaintFilter.cpp", |
| 357 | "jni/Path.cpp", |
| 358 | "jni/PathEffect.cpp", |
| 359 | "jni/PathMeasure.cpp", |
| 360 | "jni/Picture.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 361 | "jni/Shader.cpp", |
Nader Jawad | 390d6e8 | 2020-09-24 21:35:03 -0700 | [diff] [blame] | 362 | "jni/RenderEffect.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 363 | "jni/Typeface.cpp", |
| 364 | "jni/Utils.cpp", |
| 365 | "jni/YuvToJpegEncoder.cpp", |
| 366 | "jni/fonts/Font.cpp", |
| 367 | "jni/fonts/FontFamily.cpp", |
| 368 | "jni/text/LineBreaker.cpp", |
| 369 | "jni/text/MeasuredText.cpp", |
Seigo Nonaka | f3a1915 | 2020-09-14 15:29:42 -0700 | [diff] [blame] | 370 | "jni/text/TextShaper.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 371 | ], |
| 372 | |
| 373 | header_libs: [ "android_graphics_jni_headers" ], |
| 374 | |
| 375 | include_dirs: [ |
| 376 | "external/skia/include/private", |
| 377 | "external/skia/src/codec", |
| 378 | "external/skia/src/core", |
| 379 | "external/skia/src/effects", |
| 380 | "external/skia/src/image", |
| 381 | "external/skia/src/images", |
| 382 | ], |
| 383 | |
| 384 | shared_libs: [ |
| 385 | "libbase", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 386 | "libcutils", |
| 387 | "libharfbuzz_ng", |
| 388 | "liblog", |
| 389 | "libminikin", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 390 | "libz", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 391 | "libjpeg", |
| 392 | ], |
| 393 | |
Yurii Zubrytskyi | 80d0f4c | 2021-02-26 03:53:04 -0500 | [diff] [blame] | 394 | static_libs: ["libnativehelper_lazy", "libziparchive_for_incfs"], |
Orion Hodson | 33cbf8b | 2021-02-08 16:17:07 +0000 | [diff] [blame] | 395 | |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 396 | target: { |
| 397 | android: { |
| 398 | srcs: [ // sources that depend on android only libraries |
| 399 | "jni/AnimatedImageDrawable.cpp", |
| 400 | "jni/android_graphics_TextureLayer.cpp", |
| 401 | "jni/android_graphics_HardwareRenderer.cpp", |
| 402 | "jni/BitmapRegionDecoder.cpp", |
| 403 | "jni/GIFMovie.cpp", |
| 404 | "jni/GraphicsStatsService.cpp", |
| 405 | "jni/Movie.cpp", |
| 406 | "jni/MovieImpl.cpp", |
Derek Sollenberger | 15da7e2 | 2020-02-14 14:16:34 -0500 | [diff] [blame] | 407 | "jni/Region.cpp", // requires libbinder_ndk |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 408 | "jni/pdf/PdfDocument.cpp", |
| 409 | "jni/pdf/PdfEditor.cpp", |
| 410 | "jni/pdf/PdfRenderer.cpp", |
| 411 | "jni/pdf/PdfUtils.cpp", |
| 412 | ], |
| 413 | shared_libs: [ |
| 414 | "libandroidfw", |
Derek Sollenberger | 42c5004 | 2020-02-18 14:51:17 -0500 | [diff] [blame] | 415 | "libbinder", |
Derek Sollenberger | 15da7e2 | 2020-02-14 14:16:34 -0500 | [diff] [blame] | 416 | "libbinder_ndk", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 417 | "libmediandk", |
| 418 | "libnativedisplay", |
| 419 | "libnativewindow", |
| 420 | "libstatspull", |
| 421 | "libstatssocket", |
| 422 | "libpdfium", |
| 423 | ], |
| 424 | static_libs: [ |
| 425 | "libgif", |
| 426 | "libstatslog", |
| 427 | ], |
| 428 | }, |
| 429 | host: { |
| 430 | cflags: [ |
| 431 | "-Wno-unused-const-variable", |
| 432 | "-Wno-unused-function", |
| 433 | ], |
| 434 | static_libs: [ |
| 435 | "libandroidfw", |
| 436 | ], |
| 437 | } |
| 438 | }, |
| 439 | } |
| 440 | |
| 441 | // ------------------------ |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 442 | // library |
| 443 | // ------------------------ |
| 444 | |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 445 | cc_library_headers { |
| 446 | name: "libhwui_internal_headers", |
| 447 | |
| 448 | host_supported: true, |
| 449 | export_include_dirs: [ |
| 450 | ".", |
| 451 | ], |
| 452 | header_libs: [ "android_graphics_jni_headers" ], |
| 453 | export_header_lib_headers: [ "android_graphics_jni_headers" ], |
| 454 | } |
| 455 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 456 | cc_defaults { |
| 457 | name: "libhwui_defaults", |
| 458 | defaults: ["hwui_defaults"], |
Derek Sollenberger | d938e5a | 2017-07-24 09:42:07 -0400 | [diff] [blame] | 459 | |
| 460 | whole_static_libs: ["libskia"], |
| 461 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 462 | srcs: [ |
John Reck | dc95f10 | 2020-11-16 12:35:02 -0500 | [diff] [blame] | 463 | "canvas/CanvasFrontend.cpp", |
John Reck | 013127b | 2020-10-29 20:53:51 -0400 | [diff] [blame] | 464 | "canvas/CanvasOpBuffer.cpp", |
| 465 | "canvas/CanvasOpRasterizer.cpp", |
John Reck | 5cb290b | 2021-02-01 13:47:31 -0500 | [diff] [blame] | 466 | "effects/StretchEffect.cpp", |
Nader Jawad | 2dc632a | 2021-03-29 18:51:29 -0700 | [diff] [blame] | 467 | "pipeline/skia/HolePunch.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 468 | "pipeline/skia/SkiaDisplayList.cpp", |
| 469 | "pipeline/skia/SkiaRecordingCanvas.cpp", |
| 470 | "pipeline/skia/RenderNodeDrawable.cpp", |
| 471 | "pipeline/skia/ReorderBarrierDrawables.cpp", |
Nader Jawad | 2dc632a | 2021-03-29 18:51:29 -0700 | [diff] [blame] | 472 | "pipeline/skia/TransformCanvas.cpp", |
Fedor Kudasov | 666f8a5 | 2019-07-03 15:21:14 +0100 | [diff] [blame] | 473 | "renderthread/Frame.cpp", |
| 474 | "renderthread/RenderTask.cpp", |
| 475 | "renderthread/TimeLord.cpp", |
Derek Sollenberger | 2d14213 | 2018-01-22 10:25:26 -0500 | [diff] [blame] | 476 | "hwui/AnimatedImageDrawable.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 477 | "hwui/Bitmap.cpp", |
Mike Reed | 0f9dce7 | 2021-02-12 21:20:33 -0500 | [diff] [blame] | 478 | "hwui/BlurDrawLooper.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 479 | "hwui/Canvas.cpp", |
Leon Scroggins III | 753a56f | 2019-12-11 11:02:15 -0500 | [diff] [blame] | 480 | "hwui/ImageDecoder.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 481 | "hwui/MinikinSkia.cpp", |
| 482 | "hwui/MinikinUtils.cpp", |
| 483 | "hwui/PaintImpl.cpp", |
| 484 | "hwui/Typeface.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 485 | "utils/Blur.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 486 | "utils/Color.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 487 | "utils/LinearAllocator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 488 | "utils/VectorDrawableUtils.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 489 | "AnimationContext.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 490 | "Animator.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 491 | "AnimatorManager.cpp", |
| 492 | "CanvasTransform.cpp", |
| 493 | "DamageAccumulator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 494 | "Interpolator.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 495 | "LightingInfo.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 496 | "Matrix.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 497 | "PathParser.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 498 | "Properties.cpp", |
| 499 | "PropertyValuesAnimatorSet.cpp", |
| 500 | "PropertyValuesHolder.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 501 | "RecordingCanvas.cpp", |
| 502 | "RenderNode.cpp", |
| 503 | "RenderProperties.cpp", |
Fedor Kudasov | 09cfce0 | 2019-07-04 09:41:13 +0100 | [diff] [blame] | 504 | "RootRenderNode.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 505 | "SkiaCanvas.cpp", |
Mike Reed | 7406527 | 2021-04-12 09:52:07 -0400 | [diff] [blame] | 506 | "SkiaInterpolator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 507 | "VectorDrawable.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 508 | ], |
| 509 | |
Kweku Adams | 228b6d2 | 2018-04-12 13:09:04 -0700 | [diff] [blame] | 510 | proto: { |
| 511 | export_proto_headers: true, |
| 512 | }, |
| 513 | |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 514 | target: { |
| 515 | android: { |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 516 | header_libs: ["libandroid_headers_private" ], |
| 517 | |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 518 | srcs: [ |
Jerome Gaillard | f9a4dc4 | 2020-01-29 15:23:26 +0000 | [diff] [blame] | 519 | "hwui/AnimatedImageThread.cpp", |
Stan Iliev | e0fae23 | 2020-01-07 17:21:49 -0500 | [diff] [blame] | 520 | "pipeline/skia/ATraceMemoryDump.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 521 | "pipeline/skia/GLFunctorDrawable.cpp", |
| 522 | "pipeline/skia/LayerDrawable.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 523 | "pipeline/skia/ShaderCache.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 524 | "pipeline/skia/SkiaMemoryTracer.cpp", |
| 525 | "pipeline/skia/SkiaOpenGLPipeline.cpp", |
| 526 | "pipeline/skia/SkiaPipeline.cpp", |
| 527 | "pipeline/skia/SkiaProfileRenderer.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 528 | "pipeline/skia/SkiaVulkanPipeline.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 529 | "pipeline/skia/VkFunctorDrawable.cpp", |
| 530 | "pipeline/skia/VkInteropFunctorDrawable.cpp", |
| 531 | "renderstate/RenderState.cpp", |
| 532 | "renderthread/CacheManager.cpp", |
| 533 | "renderthread/CanvasContext.cpp", |
| 534 | "renderthread/DrawFrameTask.cpp", |
| 535 | "renderthread/EglManager.cpp", |
| 536 | "renderthread/ReliableSurface.cpp", |
| 537 | "renderthread/VulkanManager.cpp", |
| 538 | "renderthread/VulkanSurface.cpp", |
| 539 | "renderthread/RenderProxy.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 540 | "renderthread/RenderThread.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 541 | "service/GraphicsStatsService.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 542 | "thread/CommonPool.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 543 | "utils/GLUtils.cpp", |
Alec Mouri | 4523801 | 2020-01-29 11:04:40 -0800 | [diff] [blame] | 544 | "utils/NdkUtils.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 545 | "utils/StringUtils.cpp", |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 546 | "AutoBackendTextureRelease.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 547 | "DeferredLayerUpdater.cpp", |
| 548 | "DeviceInfo.cpp", |
| 549 | "FrameInfo.cpp", |
| 550 | "FrameInfoVisualizer.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 551 | "HardwareBitmapUploader.cpp", |
| 552 | "HWUIProperties.sysprop", |
| 553 | "JankTracker.cpp", |
| 554 | "Layer.cpp", |
| 555 | "LayerUpdateQueue.cpp", |
| 556 | "ProfileData.cpp", |
| 557 | "ProfileDataContainer.cpp", |
| 558 | "Readback.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 559 | "TreeInfo.cpp", |
| 560 | "WebViewFunctorManager.cpp", |
| 561 | "protos/graphicsstats.proto", |
| 562 | ], |
| 563 | |
| 564 | // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed. |
| 565 | cflags: ["-Wno-implicit-fallthrough"], |
| 566 | }, |
| 567 | host: { |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 568 | srcs: [ |
| 569 | "utils/HostColorSpace.cpp", |
| 570 | ], |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 571 | export_static_lib_headers: [ |
| 572 | "libarect", |
| 573 | ], |
| 574 | } |
| 575 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 576 | } |
| 577 | |
| 578 | cc_library { |
| 579 | name: "libhwui", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 580 | host_supported: true, |
Chris Craik | d17b63c | 2017-06-01 10:45:36 -0700 | [diff] [blame] | 581 | defaults: [ |
| 582 | "libhwui_defaults", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 583 | "android_graphics_apex", |
| 584 | "android_graphics_jni", |
Zhizhou Yang | 17371ec | 2017-10-13 11:42:13 -0700 | [diff] [blame] | 585 | ], |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 586 | export_header_lib_headers: ["android_graphics_apex_headers"], |
Derek Sollenberger | 2c5d634 | 2020-04-09 09:44:54 -0400 | [diff] [blame] | 587 | target: { |
| 588 | android: { |
| 589 | version_script: "libhwui.map.txt", |
| 590 | } |
| 591 | }, |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 592 | } |
| 593 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 594 | cc_library_static { |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 595 | name: "libhwui_static", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 596 | defaults: [ |
| 597 | "libhwui_defaults", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 598 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 599 | } |
| 600 | |
| 601 | cc_defaults { |
| 602 | name: "hwui_test_defaults", |
| 603 | defaults: ["hwui_defaults"], |
| 604 | test_suites: ["device-tests"], |
Jorim Jaggi | 71db889 | 2021-02-03 23:19:29 +0100 | [diff] [blame] | 605 | header_libs: ["libandroid_headers_private"], |
Alec Mouri | 680414e | 2020-01-28 09:22:33 -0800 | [diff] [blame] | 606 | target: { |
| 607 | android: { |
| 608 | shared_libs: [ |
| 609 | "libgui", |
Alec Mouri | 4523801 | 2020-01-29 11:04:40 -0800 | [diff] [blame] | 610 | "libui", |
Alec Mouri | 680414e | 2020-01-28 09:22:33 -0800 | [diff] [blame] | 611 | ], |
| 612 | } |
| 613 | }, |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 614 | srcs: [ |
| 615 | "tests/common/scenes/*.cpp", |
| 616 | "tests/common/LeakChecker.cpp", |
| 617 | "tests/common/TestListViewSceneBase.cpp", |
| 618 | "tests/common/TestContext.cpp", |
| 619 | "tests/common/TestScene.cpp", |
| 620 | "tests/common/TestUtils.cpp", |
| 621 | ], |
| 622 | } |
| 623 | |
| 624 | // ------------------------ |
| 625 | // unit tests |
| 626 | // ------------------------ |
| 627 | |
| 628 | cc_test { |
| 629 | name: "hwui_unit_tests", |
Derek Sollenberger | d3e9eec | 2020-04-06 11:43:59 -0400 | [diff] [blame] | 630 | defaults: [ |
| 631 | "hwui_test_defaults", |
| 632 | "android_graphics_apex", |
| 633 | "android_graphics_jni", |
| 634 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 635 | |
| 636 | static_libs: [ |
| 637 | "libgmock", |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 638 | "libhwui_static", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 639 | ], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 640 | shared_libs: [ |
| 641 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 642 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 643 | srcs: [ |
| 644 | "tests/unit/main.cpp", |
Derek Sollenberger | d3e9eec | 2020-04-06 11:43:59 -0400 | [diff] [blame] | 645 | "tests/unit/ABitmapTests.cpp", |
Derek Sollenberger | f9e45d1 | 2017-06-01 13:07:39 -0400 | [diff] [blame] | 646 | "tests/unit/CacheManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 647 | "tests/unit/CanvasContextTests.cpp", |
John Reck | 013127b | 2020-10-29 20:53:51 -0400 | [diff] [blame] | 648 | "tests/unit/CanvasOpTests.cpp", |
John Reck | dc95f10 | 2020-11-16 12:35:02 -0500 | [diff] [blame] | 649 | "tests/unit/CanvasFrontendTests.cpp", |
John Reck | 322b8ab | 2019-03-14 13:15:28 -0700 | [diff] [blame] | 650 | "tests/unit/CommonPoolTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 651 | "tests/unit/DamageAccumulatorTests.cpp", |
| 652 | "tests/unit/DeferredLayerUpdaterTests.cpp", |
John Reck | 064650b | 2021-01-19 21:29:24 -0500 | [diff] [blame] | 653 | "tests/unit/EglManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 654 | "tests/unit/FatVectorTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 655 | "tests/unit/GraphicsStatsServiceTests.cpp", |
Jorim Jaggi | 10f328c | 2021-01-19 00:08:02 +0100 | [diff] [blame^] | 656 | "tests/unit/JankTrackerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 657 | "tests/unit/LayerUpdateQueueTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 658 | "tests/unit/LinearAllocatorTests.cpp", |
| 659 | "tests/unit/MatrixTests.cpp", |
John Reck | 9573505 | 2020-12-15 13:39:22 -0500 | [diff] [blame] | 660 | "tests/unit/OpBufferTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 661 | "tests/unit/PathInterpolatorTests.cpp", |
| 662 | "tests/unit/RenderNodeDrawableTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 663 | "tests/unit/RenderNodeTests.cpp", |
| 664 | "tests/unit/RenderPropertiesTests.cpp", |
John Reck | 700079e | 2019-02-19 10:38:50 -0800 | [diff] [blame] | 665 | "tests/unit/RenderThreadTests.cpp", |
Stan Iliev | d495f43 | 2017-10-09 15:49:32 -0400 | [diff] [blame] | 666 | "tests/unit/ShaderCacheTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 667 | "tests/unit/SkiaBehaviorTests.cpp", |
| 668 | "tests/unit/SkiaDisplayListTests.cpp", |
| 669 | "tests/unit/SkiaPipelineTests.cpp", |
| 670 | "tests/unit/SkiaRenderPropertiesTests.cpp", |
| 671 | "tests/unit/SkiaCanvasTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 672 | "tests/unit/StringUtilsTests.cpp", |
| 673 | "tests/unit/TestUtilsTests.cpp", |
John Reck | f8441e6 | 2017-10-23 13:10:41 -0700 | [diff] [blame] | 674 | "tests/unit/ThreadBaseTests.cpp", |
| 675 | "tests/unit/TypefaceTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 676 | "tests/unit/VectorDrawableTests.cpp", |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 677 | "tests/unit/WebViewFunctorManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 678 | ], |
| 679 | } |
| 680 | |
| 681 | // ------------------------ |
| 682 | // Macro-bench app |
| 683 | // ------------------------ |
| 684 | |
| 685 | cc_benchmark { |
| 686 | name: "hwuimacro", |
| 687 | defaults: ["hwui_test_defaults"], |
| 688 | |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 689 | static_libs: ["libhwui"], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 690 | shared_libs: [ |
| 691 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 692 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 693 | |
| 694 | srcs: [ |
| 695 | "tests/macrobench/TestSceneRunner.cpp", |
| 696 | "tests/macrobench/main.cpp", |
| 697 | ], |
| 698 | } |
| 699 | |
| 700 | // ------------------------ |
| 701 | // Micro-bench app |
| 702 | // --------------------- |
| 703 | |
| 704 | cc_benchmark { |
| 705 | name: "hwuimicro", |
| 706 | defaults: ["hwui_test_defaults"], |
| 707 | |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 708 | static_libs: ["libhwui_static"], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 709 | shared_libs: [ |
| 710 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 711 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 712 | |
| 713 | srcs: [ |
| 714 | "tests/microbench/main.cpp", |
John Reck | b5eeb18 | 2020-12-09 13:45:39 -0500 | [diff] [blame] | 715 | "tests/microbench/CanvasOpBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 716 | "tests/microbench/DisplayListCanvasBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 717 | "tests/microbench/LinearAllocatorBench.cpp", |
| 718 | "tests/microbench/PathParserBench.cpp", |
| 719 | "tests/microbench/RenderNodeBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 720 | ], |
| 721 | } |
Pirama Arumuga Nainar | bc1e177 | 2017-11-17 11:32:16 -0800 | [diff] [blame] | 722 | |
| 723 | // ---------------------------------------- |
| 724 | // Phony target to build benchmarks for PGO |
| 725 | // ---------------------------------------- |
| 726 | |
| 727 | phony { |
| 728 | name: "pgo-targets-hwui", |
| 729 | required: [ |
| 730 | "hwuimicro", |
| 731 | "hwuimacro", |
| 732 | ] |
| 733 | } |