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