Bob Badour | 051ef78 | 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", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 86 | "frameworks/native/libs/math/include", |
| 87 | "frameworks/native/libs/ui/include", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 88 | ], |
| 89 | cflags: [ |
| 90 | "-Wno-unused-variable", |
| 91 | ], |
| 92 | } |
| 93 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | cc_defaults { |
| 97 | name: "hwui_static_deps", |
| 98 | shared_libs: [ |
Jerome Gaillard | a02a12d | 2019-05-28 18:07:56 +0100 | [diff] [blame] | 99 | "libbase", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 100 | "libharfbuzz_ng", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 101 | "libminikin", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 102 | ], |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 103 | |
| 104 | target: { |
| 105 | android: { |
| 106 | shared_libs: [ |
| 107 | "liblog", |
| 108 | "libcutils", |
| 109 | "libstatslog", |
| 110 | "libutils", |
| 111 | "libEGL", |
| 112 | "libGLESv1_CM", |
| 113 | "libGLESv2", |
| 114 | "libGLESv3", |
| 115 | "libvulkan", |
| 116 | "libui", |
Alec Mouri | 22d753f | 2019-09-05 17:11:45 -0700 | [diff] [blame] | 117 | "libnativedisplay", |
Derek Sollenberger | e78f7c9 | 2019-07-31 15:18:47 -0400 | [diff] [blame] | 118 | "libnativewindow", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 119 | "libprotobuf-cpp-lite", |
| 120 | "libft2", |
| 121 | "libandroidfw", |
| 122 | "libcrypto", |
| 123 | "libsync", |
Stan Iliev | c904381 | 2020-02-03 16:57:09 -0500 | [diff] [blame] | 124 | "libstatspull", |
| 125 | "libstatssocket", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 126 | ], |
| 127 | static_libs: [ |
| 128 | "libEGL_blobCache", |
Stan Iliev | c904381 | 2020-02-03 16:57:09 -0500 | [diff] [blame] | 129 | "libprotoutil", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 130 | ], |
| 131 | }, |
| 132 | host: { |
| 133 | static_libs: [ |
| 134 | "libandroidfw", |
| 135 | "libutils", |
| 136 | ], |
| 137 | } |
| 138 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | cc_defaults { |
| 142 | name: "hwui_bugreport_font_cache_usage", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 143 | cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"], |
| 144 | } |
| 145 | |
| 146 | cc_defaults { |
| 147 | name: "hwui_compile_for_perf", |
| 148 | // TODO: Non-arm? |
| 149 | cflags: [ |
| 150 | "-fno-omit-frame-pointer", |
| 151 | "-marm", |
| 152 | "-mapcs", |
| 153 | ], |
| 154 | } |
| 155 | |
Pirama Arumuga Nainar | 0dfd4be | 2017-11-16 22:40:00 -0800 | [diff] [blame] | 156 | // Build libhwui with PGO by default. |
| 157 | // Location of PGO profile data is defined in build/soong/cc/pgo.go |
| 158 | // and is separate from hwui. |
| 159 | // To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable |
| 160 | // or set enable_profile_use property to false. |
| 161 | cc_defaults { |
| 162 | name: "hwui_pgo", |
| 163 | |
| 164 | pgo: { |
| 165 | instrumentation: true, |
| 166 | profile_file: "hwui/hwui.profdata", |
| 167 | benchmarks: ["hwui"], |
Zhizhou Yang | 58e1b78 | 2017-12-06 16:59:06 -0800 | [diff] [blame] | 168 | enable_profile_use: true, |
Pirama Arumuga Nainar | 0dfd4be | 2017-11-16 22:40:00 -0800 | [diff] [blame] | 169 | }, |
| 170 | } |
| 171 | |
Zhizhou Yang | f30f112 | 2018-02-26 17:59:38 -0800 | [diff] [blame] | 172 | // Build hwui library with ThinLTO by default. |
| 173 | cc_defaults { |
| 174 | name: "hwui_lto", |
| 175 | target: { |
| 176 | android: { |
| 177 | lto: { |
| 178 | thin: true, |
| 179 | }, |
| 180 | }, |
| 181 | }, |
| 182 | } |
| 183 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 184 | // ------------------------ |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 185 | // APEX |
| 186 | // ------------------------ |
| 187 | |
| 188 | cc_library_headers { |
| 189 | name: "android_graphics_apex_headers", |
| 190 | |
| 191 | host_supported: true, |
| 192 | export_include_dirs: [ |
| 193 | "apex/include", |
| 194 | ], |
| 195 | target: { |
| 196 | windows: { |
| 197 | enabled: true, |
| 198 | }, |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | cc_defaults { |
| 203 | name: "android_graphics_apex", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 204 | cflags: [ |
| 205 | "-Wno-unused-parameter", |
| 206 | "-Wno-non-virtual-dtor", |
| 207 | "-Wno-maybe-uninitialized", |
| 208 | "-Wno-parentheses", |
| 209 | "-Wall", |
| 210 | "-Werror", |
| 211 | "-Wno-error=deprecated-declarations", |
| 212 | "-Wunused", |
| 213 | "-Wunreachable-code", |
| 214 | ], |
| 215 | |
| 216 | cppflags: ["-Wno-conversion-null"], |
| 217 | |
| 218 | srcs: [ |
| 219 | "apex/android_matrix.cpp", |
| 220 | "apex/android_paint.cpp", |
| 221 | "apex/android_region.cpp", |
| 222 | ], |
| 223 | |
| 224 | header_libs: [ "android_graphics_apex_headers" ], |
| 225 | |
| 226 | target: { |
| 227 | android: { |
| 228 | srcs: [ // sources that depend on android only libraries |
| 229 | "apex/android_bitmap.cpp", |
| 230 | "apex/android_canvas.cpp", |
| 231 | "apex/jni_runtime.cpp", |
| 232 | "apex/renderthread.cpp", |
| 233 | ], |
| 234 | }, |
Derek Sollenberger | c5882c4 | 2019-10-25 11:11:32 -0400 | [diff] [blame] | 235 | host: { |
| 236 | srcs: [ |
| 237 | "apex/LayoutlibLoader.cpp", |
| 238 | ], |
| 239 | } |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 240 | }, |
| 241 | } |
| 242 | |
| 243 | // ------------------------ |
| 244 | // Android Graphics JNI |
| 245 | // ------------------------ |
| 246 | |
| 247 | cc_library_headers { |
| 248 | name: "android_graphics_jni_headers", |
| 249 | |
| 250 | host_supported: true, |
| 251 | export_include_dirs: [ |
| 252 | "jni", |
| 253 | ], |
| 254 | target: { |
| 255 | windows: { |
| 256 | enabled: true, |
| 257 | }, |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | cc_defaults { |
| 262 | name: "android_graphics_jni", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 263 | cflags: [ |
| 264 | "-Wno-unused-parameter", |
| 265 | "-Wno-non-virtual-dtor", |
| 266 | "-Wno-maybe-uninitialized", |
| 267 | "-Wno-parentheses", |
| 268 | |
| 269 | "-DGL_GLEXT_PROTOTYPES", |
| 270 | "-DEGL_EGLEXT_PROTOTYPES", |
| 271 | |
| 272 | "-DU_USING_ICU_NAMESPACE=0", |
| 273 | |
| 274 | "-Wall", |
| 275 | "-Werror", |
| 276 | "-Wno-error=deprecated-declarations", |
| 277 | "-Wunused", |
| 278 | "-Wunreachable-code", |
| 279 | ], |
| 280 | |
| 281 | cppflags: ["-Wno-conversion-null"], |
| 282 | |
| 283 | srcs: [ |
| 284 | "jni/android_graphics_animation_NativeInterpolatorFactory.cpp", |
| 285 | "jni/android_graphics_animation_RenderNodeAnimator.cpp", |
| 286 | "jni/android_graphics_Canvas.cpp", |
| 287 | "jni/android_graphics_ColorSpace.cpp", |
| 288 | "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp", |
| 289 | "jni/android_graphics_drawable_VectorDrawable.cpp", |
| 290 | "jni/android_graphics_HardwareRendererObserver.cpp", |
| 291 | "jni/android_graphics_Matrix.cpp", |
| 292 | "jni/android_graphics_Picture.cpp", |
| 293 | "jni/android_graphics_DisplayListCanvas.cpp", |
| 294 | "jni/android_graphics_RenderNode.cpp", |
| 295 | "jni/android_nio_utils.cpp", |
| 296 | "jni/android_util_PathParser.cpp", |
| 297 | |
| 298 | "jni/Bitmap.cpp", |
| 299 | "jni/BitmapFactory.cpp", |
| 300 | "jni/ByteBufferStreamAdaptor.cpp", |
| 301 | "jni/Camera.cpp", |
| 302 | "jni/CanvasProperty.cpp", |
| 303 | "jni/ColorFilter.cpp", |
| 304 | "jni/CreateJavaOutputStreamAdaptor.cpp", |
| 305 | "jni/FontFamily.cpp", |
| 306 | "jni/FontUtils.cpp", |
| 307 | "jni/Graphics.cpp", |
| 308 | "jni/ImageDecoder.cpp", |
| 309 | "jni/Interpolator.cpp", |
| 310 | "jni/MaskFilter.cpp", |
| 311 | "jni/NinePatch.cpp", |
| 312 | "jni/NinePatchPeeker.cpp", |
| 313 | "jni/Paint.cpp", |
| 314 | "jni/PaintFilter.cpp", |
| 315 | "jni/Path.cpp", |
| 316 | "jni/PathEffect.cpp", |
| 317 | "jni/PathMeasure.cpp", |
| 318 | "jni/Picture.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 319 | "jni/Shader.cpp", |
| 320 | "jni/Typeface.cpp", |
| 321 | "jni/Utils.cpp", |
| 322 | "jni/YuvToJpegEncoder.cpp", |
| 323 | "jni/fonts/Font.cpp", |
| 324 | "jni/fonts/FontFamily.cpp", |
| 325 | "jni/text/LineBreaker.cpp", |
| 326 | "jni/text/MeasuredText.cpp", |
| 327 | ], |
| 328 | |
| 329 | header_libs: [ "android_graphics_jni_headers" ], |
| 330 | |
| 331 | include_dirs: [ |
| 332 | "external/skia/include/private", |
| 333 | "external/skia/src/codec", |
| 334 | "external/skia/src/core", |
| 335 | "external/skia/src/effects", |
| 336 | "external/skia/src/image", |
| 337 | "external/skia/src/images", |
| 338 | ], |
| 339 | |
| 340 | shared_libs: [ |
| 341 | "libbase", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 342 | "libcutils", |
| 343 | "libharfbuzz_ng", |
| 344 | "liblog", |
| 345 | "libminikin", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 346 | "libz", |
| 347 | "libziparchive", |
| 348 | "libjpeg", |
| 349 | ], |
| 350 | |
Orion Hodson | 0e0351d | 2021-02-08 16:17:07 +0000 | [diff] [blame] | 351 | static_libs: ["libnativehelper_lazy"], |
| 352 | |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 353 | target: { |
| 354 | android: { |
| 355 | srcs: [ // sources that depend on android only libraries |
| 356 | "jni/AnimatedImageDrawable.cpp", |
| 357 | "jni/android_graphics_TextureLayer.cpp", |
| 358 | "jni/android_graphics_HardwareRenderer.cpp", |
| 359 | "jni/BitmapRegionDecoder.cpp", |
| 360 | "jni/GIFMovie.cpp", |
| 361 | "jni/GraphicsStatsService.cpp", |
| 362 | "jni/Movie.cpp", |
| 363 | "jni/MovieImpl.cpp", |
Derek Sollenberger | 15da7e2 | 2020-02-14 14:16:34 -0500 | [diff] [blame] | 364 | "jni/Region.cpp", // requires libbinder_ndk |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 365 | "jni/pdf/PdfDocument.cpp", |
| 366 | "jni/pdf/PdfEditor.cpp", |
| 367 | "jni/pdf/PdfRenderer.cpp", |
| 368 | "jni/pdf/PdfUtils.cpp", |
| 369 | ], |
| 370 | shared_libs: [ |
| 371 | "libandroidfw", |
Derek Sollenberger | 42c5004 | 2020-02-18 14:51:17 -0500 | [diff] [blame] | 372 | "libbinder", |
Derek Sollenberger | 15da7e2 | 2020-02-14 14:16:34 -0500 | [diff] [blame] | 373 | "libbinder_ndk", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 374 | "libmediandk", |
| 375 | "libnativedisplay", |
| 376 | "libnativewindow", |
| 377 | "libstatspull", |
| 378 | "libstatssocket", |
| 379 | "libpdfium", |
| 380 | ], |
| 381 | static_libs: [ |
| 382 | "libgif", |
| 383 | "libstatslog", |
| 384 | ], |
| 385 | }, |
| 386 | host: { |
| 387 | cflags: [ |
| 388 | "-Wno-unused-const-variable", |
| 389 | "-Wno-unused-function", |
| 390 | ], |
| 391 | static_libs: [ |
| 392 | "libandroidfw", |
| 393 | ], |
| 394 | } |
| 395 | }, |
| 396 | } |
| 397 | |
| 398 | // ------------------------ |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 399 | // library |
| 400 | // ------------------------ |
| 401 | |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 402 | cc_library_headers { |
| 403 | name: "libhwui_internal_headers", |
| 404 | |
| 405 | host_supported: true, |
| 406 | export_include_dirs: [ |
| 407 | ".", |
| 408 | ], |
| 409 | header_libs: [ "android_graphics_jni_headers" ], |
| 410 | export_header_lib_headers: [ "android_graphics_jni_headers" ], |
| 411 | } |
| 412 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 413 | cc_defaults { |
| 414 | name: "libhwui_defaults", |
| 415 | defaults: ["hwui_defaults"], |
Derek Sollenberger | d938e5a | 2017-07-24 09:42:07 -0400 | [diff] [blame] | 416 | |
| 417 | whole_static_libs: ["libskia"], |
| 418 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 419 | srcs: [ |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 420 | "pipeline/skia/SkiaDisplayList.cpp", |
| 421 | "pipeline/skia/SkiaRecordingCanvas.cpp", |
| 422 | "pipeline/skia/RenderNodeDrawable.cpp", |
| 423 | "pipeline/skia/ReorderBarrierDrawables.cpp", |
Fedor Kudasov | 666f8a5 | 2019-07-03 15:21:14 +0100 | [diff] [blame] | 424 | "renderthread/Frame.cpp", |
| 425 | "renderthread/RenderTask.cpp", |
| 426 | "renderthread/TimeLord.cpp", |
Derek Sollenberger | 2d14213 | 2018-01-22 10:25:26 -0500 | [diff] [blame] | 427 | "hwui/AnimatedImageDrawable.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 428 | "hwui/Bitmap.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 429 | "hwui/Canvas.cpp", |
Leon Scroggins III | 753a56f | 2019-12-11 11:02:15 -0500 | [diff] [blame] | 430 | "hwui/ImageDecoder.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 431 | "hwui/MinikinSkia.cpp", |
| 432 | "hwui/MinikinUtils.cpp", |
| 433 | "hwui/PaintImpl.cpp", |
| 434 | "hwui/Typeface.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 435 | "utils/Blur.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 436 | "utils/Color.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 437 | "utils/LinearAllocator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 438 | "utils/VectorDrawableUtils.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 439 | "AnimationContext.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 440 | "Animator.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 441 | "AnimatorManager.cpp", |
| 442 | "CanvasTransform.cpp", |
| 443 | "DamageAccumulator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 444 | "Interpolator.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 445 | "LightingInfo.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 446 | "Matrix.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 447 | "PathParser.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 448 | "Properties.cpp", |
| 449 | "PropertyValuesAnimatorSet.cpp", |
| 450 | "PropertyValuesHolder.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 451 | "RecordingCanvas.cpp", |
| 452 | "RenderNode.cpp", |
| 453 | "RenderProperties.cpp", |
Fedor Kudasov | 09cfce0 | 2019-07-04 09:41:13 +0100 | [diff] [blame] | 454 | "RootRenderNode.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 455 | "SkiaCanvas.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 456 | "VectorDrawable.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 457 | ], |
| 458 | |
Kweku Adams | 228b6d2 | 2018-04-12 13:09:04 -0700 | [diff] [blame] | 459 | proto: { |
| 460 | export_proto_headers: true, |
| 461 | }, |
| 462 | |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 463 | target: { |
| 464 | android: { |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 465 | srcs: [ |
Jerome Gaillard | f9a4dc4 | 2020-01-29 15:23:26 +0000 | [diff] [blame] | 466 | "hwui/AnimatedImageThread.cpp", |
Stan Iliev | e0fae23 | 2020-01-07 17:21:49 -0500 | [diff] [blame] | 467 | "pipeline/skia/ATraceMemoryDump.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 468 | "pipeline/skia/GLFunctorDrawable.cpp", |
| 469 | "pipeline/skia/LayerDrawable.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 470 | "pipeline/skia/ShaderCache.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 471 | "pipeline/skia/SkiaMemoryTracer.cpp", |
| 472 | "pipeline/skia/SkiaOpenGLPipeline.cpp", |
| 473 | "pipeline/skia/SkiaPipeline.cpp", |
| 474 | "pipeline/skia/SkiaProfileRenderer.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 475 | "pipeline/skia/SkiaVulkanPipeline.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 476 | "pipeline/skia/VkFunctorDrawable.cpp", |
| 477 | "pipeline/skia/VkInteropFunctorDrawable.cpp", |
| 478 | "renderstate/RenderState.cpp", |
| 479 | "renderthread/CacheManager.cpp", |
| 480 | "renderthread/CanvasContext.cpp", |
| 481 | "renderthread/DrawFrameTask.cpp", |
| 482 | "renderthread/EglManager.cpp", |
| 483 | "renderthread/ReliableSurface.cpp", |
| 484 | "renderthread/VulkanManager.cpp", |
| 485 | "renderthread/VulkanSurface.cpp", |
| 486 | "renderthread/RenderProxy.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 487 | "renderthread/RenderThread.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 488 | "service/GraphicsStatsService.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 489 | "thread/CommonPool.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 490 | "utils/GLUtils.cpp", |
| 491 | "utils/StringUtils.cpp", |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 492 | "AutoBackendTextureRelease.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 493 | "DeferredLayerUpdater.cpp", |
| 494 | "DeviceInfo.cpp", |
| 495 | "FrameInfo.cpp", |
| 496 | "FrameInfoVisualizer.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 497 | "HardwareBitmapUploader.cpp", |
| 498 | "HWUIProperties.sysprop", |
| 499 | "JankTracker.cpp", |
| 500 | "Layer.cpp", |
| 501 | "LayerUpdateQueue.cpp", |
| 502 | "ProfileData.cpp", |
| 503 | "ProfileDataContainer.cpp", |
| 504 | "Readback.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 505 | "TreeInfo.cpp", |
| 506 | "WebViewFunctorManager.cpp", |
| 507 | "protos/graphicsstats.proto", |
| 508 | ], |
| 509 | |
| 510 | // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed. |
| 511 | cflags: ["-Wno-implicit-fallthrough"], |
| 512 | }, |
| 513 | host: { |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 514 | srcs: [ |
| 515 | "utils/HostColorSpace.cpp", |
| 516 | ], |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 517 | export_static_lib_headers: [ |
| 518 | "libarect", |
| 519 | ], |
| 520 | } |
| 521 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 522 | } |
| 523 | |
| 524 | cc_library { |
| 525 | name: "libhwui", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 526 | host_supported: true, |
Chris Craik | d17b63c | 2017-06-01 10:45:36 -0700 | [diff] [blame] | 527 | defaults: [ |
| 528 | "libhwui_defaults", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 529 | "android_graphics_apex", |
| 530 | "android_graphics_jni", |
Collin Fijalkovich | c10428f | 2021-04-23 14:09:16 -0700 | [diff] [blame^] | 531 | "linker_hugepage_aligned", |
Zhizhou Yang | 17371ec | 2017-10-13 11:42:13 -0700 | [diff] [blame] | 532 | ], |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 533 | export_header_lib_headers: ["android_graphics_apex_headers"], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 534 | } |
| 535 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 536 | cc_library_static { |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 537 | name: "libhwui_static", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 538 | defaults: [ |
| 539 | "libhwui_defaults", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 540 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 541 | } |
| 542 | |
| 543 | cc_defaults { |
| 544 | name: "hwui_test_defaults", |
| 545 | defaults: ["hwui_defaults"], |
| 546 | test_suites: ["device-tests"], |
Alec Mouri | 680414e | 2020-01-28 09:22:33 -0800 | [diff] [blame] | 547 | target: { |
| 548 | android: { |
| 549 | shared_libs: [ |
| 550 | "libgui", |
| 551 | ], |
| 552 | } |
| 553 | }, |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 554 | srcs: [ |
| 555 | "tests/common/scenes/*.cpp", |
| 556 | "tests/common/LeakChecker.cpp", |
| 557 | "tests/common/TestListViewSceneBase.cpp", |
| 558 | "tests/common/TestContext.cpp", |
| 559 | "tests/common/TestScene.cpp", |
| 560 | "tests/common/TestUtils.cpp", |
| 561 | ], |
| 562 | } |
| 563 | |
| 564 | // ------------------------ |
| 565 | // unit tests |
| 566 | // ------------------------ |
| 567 | |
| 568 | cc_test { |
| 569 | name: "hwui_unit_tests", |
Derek Sollenberger | d3e9eec | 2020-04-06 11:43:59 -0400 | [diff] [blame] | 570 | defaults: [ |
| 571 | "hwui_test_defaults", |
| 572 | "android_graphics_apex", |
| 573 | "android_graphics_jni", |
| 574 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 575 | |
| 576 | static_libs: [ |
| 577 | "libgmock", |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 578 | "libhwui_static", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 579 | ], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 580 | shared_libs: [ |
| 581 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 582 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 583 | |
| 584 | srcs: [ |
| 585 | "tests/unit/main.cpp", |
Derek Sollenberger | d3e9eec | 2020-04-06 11:43:59 -0400 | [diff] [blame] | 586 | "tests/unit/ABitmapTests.cpp", |
Derek Sollenberger | f9e45d1 | 2017-06-01 13:07:39 -0400 | [diff] [blame] | 587 | "tests/unit/CacheManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 588 | "tests/unit/CanvasContextTests.cpp", |
John Reck | 322b8ab | 2019-03-14 13:15:28 -0700 | [diff] [blame] | 589 | "tests/unit/CommonPoolTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 590 | "tests/unit/DamageAccumulatorTests.cpp", |
| 591 | "tests/unit/DeferredLayerUpdaterTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 592 | "tests/unit/FatVectorTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 593 | "tests/unit/GraphicsStatsServiceTests.cpp", |
| 594 | "tests/unit/LayerUpdateQueueTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 595 | "tests/unit/LinearAllocatorTests.cpp", |
| 596 | "tests/unit/MatrixTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 597 | "tests/unit/PathInterpolatorTests.cpp", |
| 598 | "tests/unit/RenderNodeDrawableTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 599 | "tests/unit/RenderNodeTests.cpp", |
| 600 | "tests/unit/RenderPropertiesTests.cpp", |
John Reck | 700079e | 2019-02-19 10:38:50 -0800 | [diff] [blame] | 601 | "tests/unit/RenderThreadTests.cpp", |
Stan Iliev | d495f43 | 2017-10-09 15:49:32 -0400 | [diff] [blame] | 602 | "tests/unit/ShaderCacheTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 603 | "tests/unit/SkiaBehaviorTests.cpp", |
| 604 | "tests/unit/SkiaDisplayListTests.cpp", |
| 605 | "tests/unit/SkiaPipelineTests.cpp", |
| 606 | "tests/unit/SkiaRenderPropertiesTests.cpp", |
| 607 | "tests/unit/SkiaCanvasTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 608 | "tests/unit/StringUtilsTests.cpp", |
| 609 | "tests/unit/TestUtilsTests.cpp", |
John Reck | f8441e6 | 2017-10-23 13:10:41 -0700 | [diff] [blame] | 610 | "tests/unit/ThreadBaseTests.cpp", |
| 611 | "tests/unit/TypefaceTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 612 | "tests/unit/VectorDrawableTests.cpp", |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 613 | "tests/unit/WebViewFunctorManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 614 | ], |
| 615 | } |
| 616 | |
| 617 | // ------------------------ |
| 618 | // Macro-bench app |
| 619 | // ------------------------ |
| 620 | |
| 621 | cc_benchmark { |
| 622 | name: "hwuimacro", |
| 623 | defaults: ["hwui_test_defaults"], |
| 624 | |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 625 | static_libs: ["libhwui"], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 626 | shared_libs: [ |
| 627 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 628 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 629 | |
| 630 | srcs: [ |
| 631 | "tests/macrobench/TestSceneRunner.cpp", |
| 632 | "tests/macrobench/main.cpp", |
| 633 | ], |
| 634 | } |
| 635 | |
| 636 | // ------------------------ |
| 637 | // Micro-bench app |
| 638 | // --------------------- |
| 639 | |
| 640 | cc_benchmark { |
| 641 | name: "hwuimicro", |
| 642 | defaults: ["hwui_test_defaults"], |
| 643 | |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 644 | static_libs: ["libhwui_static"], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 645 | shared_libs: [ |
| 646 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 647 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 648 | |
| 649 | srcs: [ |
| 650 | "tests/microbench/main.cpp", |
| 651 | "tests/microbench/DisplayListCanvasBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 652 | "tests/microbench/LinearAllocatorBench.cpp", |
| 653 | "tests/microbench/PathParserBench.cpp", |
| 654 | "tests/microbench/RenderNodeBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 655 | ], |
| 656 | } |
Pirama Arumuga Nainar | bc1e177 | 2017-11-17 11:32:16 -0800 | [diff] [blame] | 657 | |
| 658 | // ---------------------------------------- |
| 659 | // Phony target to build benchmarks for PGO |
| 660 | // ---------------------------------------- |
| 661 | |
| 662 | phony { |
| 663 | name: "pgo-targets-hwui", |
| 664 | required: [ |
| 665 | "hwuimicro", |
| 666 | "hwuimacro", |
| 667 | ] |
| 668 | } |