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 | |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 159 | java_sdk_library { |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 160 | name: "framework-graphics", |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 161 | defaults: ["framework-module-defaults"], |
| 162 | visibility: [ |
| 163 | "//frameworks/base", // Framework |
| 164 | ], |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 165 | |
| 166 | srcs: [ |
| 167 | ":framework-graphics-srcs", |
| 168 | ], |
| 169 | |
| 170 | permitted_packages: [ |
| 171 | "android.graphics", |
| 172 | ], |
| 173 | |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 174 | // TODO: once framework-graphics is officially part of the |
| 175 | // UI-rendering module this line would no longer be |
| 176 | // needed. |
| 177 | installable: true, |
| 178 | |
Paul Duffin | 4e00662 | 2020-05-31 16:55:13 +0100 | [diff] [blame] | 179 | // Disable api_lint that the defaults enable |
| 180 | // TODO: enable this |
| 181 | api_lint: { |
| 182 | enabled: false, |
| 183 | }, |
Anton Hansson | 96b08ae | 2020-12-21 16:59:06 +0000 | [diff] [blame] | 184 | // TODO: remove this |
| 185 | unsafe_ignore_missing_latest_api: true, |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | filegroup { |
| 189 | name: "framework-graphics-srcs", |
| 190 | srcs: [ |
| 191 | "apex/java/**/*.java", |
| 192 | ], |
| 193 | path: "apex/java" |
| 194 | } |
| 195 | |
Alec Mouri | ef37c24 | 2020-03-02 21:38:09 +0000 | [diff] [blame] | 196 | // ------------------------ |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 197 | // APEX |
| 198 | // ------------------------ |
| 199 | |
| 200 | cc_library_headers { |
| 201 | name: "android_graphics_apex_headers", |
| 202 | |
| 203 | host_supported: true, |
| 204 | export_include_dirs: [ |
| 205 | "apex/include", |
| 206 | ], |
| 207 | target: { |
| 208 | windows: { |
| 209 | enabled: true, |
| 210 | }, |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | cc_defaults { |
| 215 | name: "android_graphics_apex", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 216 | cflags: [ |
| 217 | "-Wno-unused-parameter", |
| 218 | "-Wno-non-virtual-dtor", |
| 219 | "-Wno-maybe-uninitialized", |
| 220 | "-Wno-parentheses", |
| 221 | "-Wall", |
| 222 | "-Werror", |
| 223 | "-Wno-error=deprecated-declarations", |
| 224 | "-Wunused", |
| 225 | "-Wunreachable-code", |
| 226 | ], |
| 227 | |
| 228 | cppflags: ["-Wno-conversion-null"], |
| 229 | |
| 230 | srcs: [ |
| 231 | "apex/android_matrix.cpp", |
| 232 | "apex/android_paint.cpp", |
| 233 | "apex/android_region.cpp", |
| 234 | ], |
| 235 | |
| 236 | header_libs: [ "android_graphics_apex_headers" ], |
| 237 | |
| 238 | target: { |
| 239 | android: { |
| 240 | srcs: [ // sources that depend on android only libraries |
| 241 | "apex/android_bitmap.cpp", |
| 242 | "apex/android_canvas.cpp", |
| 243 | "apex/jni_runtime.cpp", |
| 244 | "apex/renderthread.cpp", |
| 245 | ], |
| 246 | }, |
Derek Sollenberger | c5882c4 | 2019-10-25 11:11:32 -0400 | [diff] [blame] | 247 | host: { |
| 248 | srcs: [ |
| 249 | "apex/LayoutlibLoader.cpp", |
| 250 | ], |
| 251 | } |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 252 | }, |
| 253 | } |
| 254 | |
| 255 | // ------------------------ |
| 256 | // Android Graphics JNI |
| 257 | // ------------------------ |
| 258 | |
| 259 | cc_library_headers { |
| 260 | name: "android_graphics_jni_headers", |
| 261 | |
| 262 | host_supported: true, |
| 263 | export_include_dirs: [ |
| 264 | "jni", |
| 265 | ], |
| 266 | target: { |
| 267 | windows: { |
| 268 | enabled: true, |
| 269 | }, |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | cc_defaults { |
| 274 | name: "android_graphics_jni", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 275 | cflags: [ |
| 276 | "-Wno-unused-parameter", |
| 277 | "-Wno-non-virtual-dtor", |
| 278 | "-Wno-maybe-uninitialized", |
| 279 | "-Wno-parentheses", |
| 280 | |
| 281 | "-DGL_GLEXT_PROTOTYPES", |
| 282 | "-DEGL_EGLEXT_PROTOTYPES", |
| 283 | |
| 284 | "-DU_USING_ICU_NAMESPACE=0", |
| 285 | |
| 286 | "-Wall", |
| 287 | "-Werror", |
| 288 | "-Wno-error=deprecated-declarations", |
| 289 | "-Wunused", |
| 290 | "-Wunreachable-code", |
| 291 | ], |
| 292 | |
| 293 | cppflags: ["-Wno-conversion-null"], |
| 294 | |
| 295 | srcs: [ |
| 296 | "jni/android_graphics_animation_NativeInterpolatorFactory.cpp", |
| 297 | "jni/android_graphics_animation_RenderNodeAnimator.cpp", |
| 298 | "jni/android_graphics_Canvas.cpp", |
| 299 | "jni/android_graphics_ColorSpace.cpp", |
| 300 | "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp", |
| 301 | "jni/android_graphics_drawable_VectorDrawable.cpp", |
| 302 | "jni/android_graphics_HardwareRendererObserver.cpp", |
| 303 | "jni/android_graphics_Matrix.cpp", |
| 304 | "jni/android_graphics_Picture.cpp", |
| 305 | "jni/android_graphics_DisplayListCanvas.cpp", |
| 306 | "jni/android_graphics_RenderNode.cpp", |
| 307 | "jni/android_nio_utils.cpp", |
| 308 | "jni/android_util_PathParser.cpp", |
| 309 | |
| 310 | "jni/Bitmap.cpp", |
| 311 | "jni/BitmapFactory.cpp", |
| 312 | "jni/ByteBufferStreamAdaptor.cpp", |
| 313 | "jni/Camera.cpp", |
| 314 | "jni/CanvasProperty.cpp", |
| 315 | "jni/ColorFilter.cpp", |
| 316 | "jni/CreateJavaOutputStreamAdaptor.cpp", |
| 317 | "jni/FontFamily.cpp", |
| 318 | "jni/FontUtils.cpp", |
| 319 | "jni/Graphics.cpp", |
| 320 | "jni/ImageDecoder.cpp", |
| 321 | "jni/Interpolator.cpp", |
| 322 | "jni/MaskFilter.cpp", |
| 323 | "jni/NinePatch.cpp", |
| 324 | "jni/NinePatchPeeker.cpp", |
| 325 | "jni/Paint.cpp", |
| 326 | "jni/PaintFilter.cpp", |
| 327 | "jni/Path.cpp", |
| 328 | "jni/PathEffect.cpp", |
| 329 | "jni/PathMeasure.cpp", |
| 330 | "jni/Picture.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 331 | "jni/Shader.cpp", |
Nader Jawad | 390d6e8 | 2020-09-24 21:35:03 -0700 | [diff] [blame] | 332 | "jni/RenderEffect.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 333 | "jni/Typeface.cpp", |
| 334 | "jni/Utils.cpp", |
| 335 | "jni/YuvToJpegEncoder.cpp", |
| 336 | "jni/fonts/Font.cpp", |
| 337 | "jni/fonts/FontFamily.cpp", |
| 338 | "jni/text/LineBreaker.cpp", |
| 339 | "jni/text/MeasuredText.cpp", |
Seigo Nonaka | f3a1915 | 2020-09-14 15:29:42 -0700 | [diff] [blame] | 340 | "jni/text/TextShaper.cpp", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 341 | ], |
| 342 | |
| 343 | header_libs: [ "android_graphics_jni_headers" ], |
| 344 | |
| 345 | include_dirs: [ |
| 346 | "external/skia/include/private", |
| 347 | "external/skia/src/codec", |
| 348 | "external/skia/src/core", |
| 349 | "external/skia/src/effects", |
| 350 | "external/skia/src/image", |
| 351 | "external/skia/src/images", |
| 352 | ], |
| 353 | |
| 354 | shared_libs: [ |
| 355 | "libbase", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 356 | "libcutils", |
| 357 | "libharfbuzz_ng", |
| 358 | "liblog", |
| 359 | "libminikin", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 360 | "libz", |
| 361 | "libziparchive", |
| 362 | "libjpeg", |
| 363 | ], |
| 364 | |
Orion Hodson | 33cbf8b | 2021-02-08 16:17:07 +0000 | [diff] [blame^] | 365 | static_libs: ["libnativehelper_lazy"], |
| 366 | |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 367 | target: { |
| 368 | android: { |
| 369 | srcs: [ // sources that depend on android only libraries |
| 370 | "jni/AnimatedImageDrawable.cpp", |
| 371 | "jni/android_graphics_TextureLayer.cpp", |
| 372 | "jni/android_graphics_HardwareRenderer.cpp", |
| 373 | "jni/BitmapRegionDecoder.cpp", |
| 374 | "jni/GIFMovie.cpp", |
| 375 | "jni/GraphicsStatsService.cpp", |
| 376 | "jni/Movie.cpp", |
| 377 | "jni/MovieImpl.cpp", |
Derek Sollenberger | 15da7e2 | 2020-02-14 14:16:34 -0500 | [diff] [blame] | 378 | "jni/Region.cpp", // requires libbinder_ndk |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 379 | "jni/pdf/PdfDocument.cpp", |
| 380 | "jni/pdf/PdfEditor.cpp", |
| 381 | "jni/pdf/PdfRenderer.cpp", |
| 382 | "jni/pdf/PdfUtils.cpp", |
| 383 | ], |
| 384 | shared_libs: [ |
| 385 | "libandroidfw", |
Derek Sollenberger | 42c5004 | 2020-02-18 14:51:17 -0500 | [diff] [blame] | 386 | "libbinder", |
Derek Sollenberger | 15da7e2 | 2020-02-14 14:16:34 -0500 | [diff] [blame] | 387 | "libbinder_ndk", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 388 | "libmediandk", |
| 389 | "libnativedisplay", |
| 390 | "libnativewindow", |
| 391 | "libstatspull", |
| 392 | "libstatssocket", |
| 393 | "libpdfium", |
John Reck | a18d7c8 | 2020-03-02 09:41:33 -0800 | [diff] [blame] | 394 | "libbinder_ndk", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 395 | ], |
| 396 | static_libs: [ |
| 397 | "libgif", |
| 398 | "libstatslog", |
| 399 | ], |
| 400 | }, |
| 401 | host: { |
| 402 | cflags: [ |
| 403 | "-Wno-unused-const-variable", |
| 404 | "-Wno-unused-function", |
| 405 | ], |
| 406 | static_libs: [ |
| 407 | "libandroidfw", |
| 408 | ], |
| 409 | } |
| 410 | }, |
| 411 | } |
| 412 | |
| 413 | // ------------------------ |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 414 | // library |
| 415 | // ------------------------ |
| 416 | |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 417 | cc_library_headers { |
| 418 | name: "libhwui_internal_headers", |
| 419 | |
| 420 | host_supported: true, |
| 421 | export_include_dirs: [ |
| 422 | ".", |
| 423 | ], |
| 424 | header_libs: [ "android_graphics_jni_headers" ], |
| 425 | export_header_lib_headers: [ "android_graphics_jni_headers" ], |
| 426 | } |
| 427 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 428 | cc_defaults { |
| 429 | name: "libhwui_defaults", |
| 430 | defaults: ["hwui_defaults"], |
Derek Sollenberger | d938e5a | 2017-07-24 09:42:07 -0400 | [diff] [blame] | 431 | |
| 432 | whole_static_libs: ["libskia"], |
| 433 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 434 | srcs: [ |
John Reck | dc95f10 | 2020-11-16 12:35:02 -0500 | [diff] [blame] | 435 | "canvas/CanvasFrontend.cpp", |
John Reck | 013127b | 2020-10-29 20:53:51 -0400 | [diff] [blame] | 436 | "canvas/CanvasOpBuffer.cpp", |
| 437 | "canvas/CanvasOpRasterizer.cpp", |
John Reck | 5cb290b | 2021-02-01 13:47:31 -0500 | [diff] [blame] | 438 | "effects/StretchEffect.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 439 | "pipeline/skia/SkiaDisplayList.cpp", |
| 440 | "pipeline/skia/SkiaRecordingCanvas.cpp", |
| 441 | "pipeline/skia/RenderNodeDrawable.cpp", |
| 442 | "pipeline/skia/ReorderBarrierDrawables.cpp", |
Fedor Kudasov | 666f8a5 | 2019-07-03 15:21:14 +0100 | [diff] [blame] | 443 | "renderthread/Frame.cpp", |
| 444 | "renderthread/RenderTask.cpp", |
| 445 | "renderthread/TimeLord.cpp", |
Derek Sollenberger | 2d14213 | 2018-01-22 10:25:26 -0500 | [diff] [blame] | 446 | "hwui/AnimatedImageDrawable.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 447 | "hwui/Bitmap.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 448 | "hwui/Canvas.cpp", |
Leon Scroggins III | 753a56f | 2019-12-11 11:02:15 -0500 | [diff] [blame] | 449 | "hwui/ImageDecoder.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 450 | "hwui/MinikinSkia.cpp", |
| 451 | "hwui/MinikinUtils.cpp", |
| 452 | "hwui/PaintImpl.cpp", |
| 453 | "hwui/Typeface.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 454 | "utils/Blur.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 455 | "utils/Color.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 456 | "utils/LinearAllocator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 457 | "utils/VectorDrawableUtils.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 458 | "AnimationContext.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 459 | "Animator.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 460 | "AnimatorManager.cpp", |
| 461 | "CanvasTransform.cpp", |
| 462 | "DamageAccumulator.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 463 | "Interpolator.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 464 | "LightingInfo.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 465 | "Matrix.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 466 | "PathParser.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 467 | "Properties.cpp", |
| 468 | "PropertyValuesAnimatorSet.cpp", |
| 469 | "PropertyValuesHolder.cpp", |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 470 | "RecordingCanvas.cpp", |
| 471 | "RenderNode.cpp", |
| 472 | "RenderProperties.cpp", |
Fedor Kudasov | 09cfce0 | 2019-07-04 09:41:13 +0100 | [diff] [blame] | 473 | "RootRenderNode.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 474 | "SkiaCanvas.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 475 | "VectorDrawable.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 476 | ], |
| 477 | |
Kweku Adams | 228b6d2 | 2018-04-12 13:09:04 -0700 | [diff] [blame] | 478 | proto: { |
| 479 | export_proto_headers: true, |
| 480 | }, |
| 481 | |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 482 | target: { |
| 483 | android: { |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 484 | srcs: [ |
Jerome Gaillard | f9a4dc4 | 2020-01-29 15:23:26 +0000 | [diff] [blame] | 485 | "hwui/AnimatedImageThread.cpp", |
Stan Iliev | e0fae23 | 2020-01-07 17:21:49 -0500 | [diff] [blame] | 486 | "pipeline/skia/ATraceMemoryDump.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 487 | "pipeline/skia/GLFunctorDrawable.cpp", |
| 488 | "pipeline/skia/LayerDrawable.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 489 | "pipeline/skia/ShaderCache.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 490 | "pipeline/skia/SkiaMemoryTracer.cpp", |
| 491 | "pipeline/skia/SkiaOpenGLPipeline.cpp", |
| 492 | "pipeline/skia/SkiaPipeline.cpp", |
| 493 | "pipeline/skia/SkiaProfileRenderer.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 494 | "pipeline/skia/SkiaVulkanPipeline.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 495 | "pipeline/skia/VkFunctorDrawable.cpp", |
| 496 | "pipeline/skia/VkInteropFunctorDrawable.cpp", |
| 497 | "renderstate/RenderState.cpp", |
| 498 | "renderthread/CacheManager.cpp", |
| 499 | "renderthread/CanvasContext.cpp", |
| 500 | "renderthread/DrawFrameTask.cpp", |
| 501 | "renderthread/EglManager.cpp", |
| 502 | "renderthread/ReliableSurface.cpp", |
| 503 | "renderthread/VulkanManager.cpp", |
| 504 | "renderthread/VulkanSurface.cpp", |
| 505 | "renderthread/RenderProxy.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 506 | "renderthread/RenderThread.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 507 | "service/GraphicsStatsService.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 508 | "thread/CommonPool.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 509 | "utils/GLUtils.cpp", |
Alec Mouri | 4523801 | 2020-01-29 11:04:40 -0800 | [diff] [blame] | 510 | "utils/NdkUtils.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 511 | "utils/StringUtils.cpp", |
Stan Iliev | aaa9e83 | 2019-09-17 14:07:23 -0400 | [diff] [blame] | 512 | "AutoBackendTextureRelease.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 513 | "DeferredLayerUpdater.cpp", |
| 514 | "DeviceInfo.cpp", |
| 515 | "FrameInfo.cpp", |
| 516 | "FrameInfoVisualizer.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 517 | "HardwareBitmapUploader.cpp", |
| 518 | "HWUIProperties.sysprop", |
| 519 | "JankTracker.cpp", |
| 520 | "Layer.cpp", |
| 521 | "LayerUpdateQueue.cpp", |
| 522 | "ProfileData.cpp", |
| 523 | "ProfileDataContainer.cpp", |
| 524 | "Readback.cpp", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 525 | "TreeInfo.cpp", |
| 526 | "WebViewFunctorManager.cpp", |
| 527 | "protos/graphicsstats.proto", |
| 528 | ], |
| 529 | |
| 530 | // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed. |
| 531 | cflags: ["-Wno-implicit-fallthrough"], |
| 532 | }, |
| 533 | host: { |
Fedor Kudasov | 86bd214 | 2019-06-18 15:51:57 +0100 | [diff] [blame] | 534 | srcs: [ |
| 535 | "utils/HostColorSpace.cpp", |
| 536 | ], |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 537 | export_static_lib_headers: [ |
| 538 | "libarect", |
| 539 | ], |
| 540 | } |
| 541 | } |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 542 | } |
| 543 | |
| 544 | cc_library { |
| 545 | name: "libhwui", |
Fedor Kudasov | 182cbf9 | 2019-06-05 10:30:20 +0100 | [diff] [blame] | 546 | host_supported: true, |
Chris Craik | d17b63c | 2017-06-01 10:45:36 -0700 | [diff] [blame] | 547 | defaults: [ |
| 548 | "libhwui_defaults", |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 549 | "android_graphics_apex", |
| 550 | "android_graphics_jni", |
Zhizhou Yang | 17371ec | 2017-10-13 11:42:13 -0700 | [diff] [blame] | 551 | ], |
Derek Sollenberger | 83ccff7 | 2019-10-24 11:49:54 -0400 | [diff] [blame] | 552 | export_header_lib_headers: ["android_graphics_apex_headers"], |
Derek Sollenberger | 2c5d634 | 2020-04-09 09:44:54 -0400 | [diff] [blame] | 553 | target: { |
| 554 | android: { |
| 555 | version_script: "libhwui.map.txt", |
| 556 | } |
| 557 | }, |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 558 | } |
| 559 | |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 560 | cc_library_static { |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 561 | name: "libhwui_static", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 562 | defaults: [ |
| 563 | "libhwui_defaults", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 564 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 565 | } |
| 566 | |
| 567 | cc_defaults { |
| 568 | name: "hwui_test_defaults", |
| 569 | defaults: ["hwui_defaults"], |
| 570 | test_suites: ["device-tests"], |
Alec Mouri | 680414e | 2020-01-28 09:22:33 -0800 | [diff] [blame] | 571 | target: { |
| 572 | android: { |
| 573 | shared_libs: [ |
| 574 | "libgui", |
Alec Mouri | 4523801 | 2020-01-29 11:04:40 -0800 | [diff] [blame] | 575 | "libui", |
Alec Mouri | 680414e | 2020-01-28 09:22:33 -0800 | [diff] [blame] | 576 | ], |
| 577 | } |
| 578 | }, |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 579 | srcs: [ |
| 580 | "tests/common/scenes/*.cpp", |
| 581 | "tests/common/LeakChecker.cpp", |
| 582 | "tests/common/TestListViewSceneBase.cpp", |
| 583 | "tests/common/TestContext.cpp", |
| 584 | "tests/common/TestScene.cpp", |
| 585 | "tests/common/TestUtils.cpp", |
| 586 | ], |
| 587 | } |
| 588 | |
| 589 | // ------------------------ |
| 590 | // unit tests |
| 591 | // ------------------------ |
| 592 | |
| 593 | cc_test { |
| 594 | name: "hwui_unit_tests", |
Derek Sollenberger | d3e9eec | 2020-04-06 11:43:59 -0400 | [diff] [blame] | 595 | defaults: [ |
| 596 | "hwui_test_defaults", |
| 597 | "android_graphics_apex", |
| 598 | "android_graphics_jni", |
| 599 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 600 | |
| 601 | static_libs: [ |
| 602 | "libgmock", |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 603 | "libhwui_static", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 604 | ], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 605 | shared_libs: [ |
| 606 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 607 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 608 | |
| 609 | srcs: [ |
| 610 | "tests/unit/main.cpp", |
Derek Sollenberger | d3e9eec | 2020-04-06 11:43:59 -0400 | [diff] [blame] | 611 | "tests/unit/ABitmapTests.cpp", |
Derek Sollenberger | f9e45d1 | 2017-06-01 13:07:39 -0400 | [diff] [blame] | 612 | "tests/unit/CacheManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 613 | "tests/unit/CanvasContextTests.cpp", |
John Reck | 013127b | 2020-10-29 20:53:51 -0400 | [diff] [blame] | 614 | "tests/unit/CanvasOpTests.cpp", |
John Reck | dc95f10 | 2020-11-16 12:35:02 -0500 | [diff] [blame] | 615 | "tests/unit/CanvasFrontendTests.cpp", |
John Reck | 322b8ab | 2019-03-14 13:15:28 -0700 | [diff] [blame] | 616 | "tests/unit/CommonPoolTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 617 | "tests/unit/DamageAccumulatorTests.cpp", |
| 618 | "tests/unit/DeferredLayerUpdaterTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 619 | "tests/unit/FatVectorTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 620 | "tests/unit/GraphicsStatsServiceTests.cpp", |
| 621 | "tests/unit/LayerUpdateQueueTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 622 | "tests/unit/LinearAllocatorTests.cpp", |
| 623 | "tests/unit/MatrixTests.cpp", |
John Reck | 9573505 | 2020-12-15 13:39:22 -0500 | [diff] [blame] | 624 | "tests/unit/OpBufferTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 625 | "tests/unit/PathInterpolatorTests.cpp", |
| 626 | "tests/unit/RenderNodeDrawableTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 627 | "tests/unit/RenderNodeTests.cpp", |
| 628 | "tests/unit/RenderPropertiesTests.cpp", |
John Reck | 700079e | 2019-02-19 10:38:50 -0800 | [diff] [blame] | 629 | "tests/unit/RenderThreadTests.cpp", |
Stan Iliev | d495f43 | 2017-10-09 15:49:32 -0400 | [diff] [blame] | 630 | "tests/unit/ShaderCacheTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 631 | "tests/unit/SkiaBehaviorTests.cpp", |
| 632 | "tests/unit/SkiaDisplayListTests.cpp", |
| 633 | "tests/unit/SkiaPipelineTests.cpp", |
| 634 | "tests/unit/SkiaRenderPropertiesTests.cpp", |
| 635 | "tests/unit/SkiaCanvasTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 636 | "tests/unit/StringUtilsTests.cpp", |
| 637 | "tests/unit/TestUtilsTests.cpp", |
John Reck | f8441e6 | 2017-10-23 13:10:41 -0700 | [diff] [blame] | 638 | "tests/unit/ThreadBaseTests.cpp", |
| 639 | "tests/unit/TypefaceTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 640 | "tests/unit/VectorDrawableTests.cpp", |
John Reck | 283bb46 | 2018-12-13 16:40:14 -0800 | [diff] [blame] | 641 | "tests/unit/WebViewFunctorManagerTests.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 642 | ], |
| 643 | } |
| 644 | |
| 645 | // ------------------------ |
| 646 | // Macro-bench app |
| 647 | // ------------------------ |
| 648 | |
| 649 | cc_benchmark { |
| 650 | name: "hwuimacro", |
| 651 | defaults: ["hwui_test_defaults"], |
| 652 | |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 653 | static_libs: ["libhwui"], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 654 | shared_libs: [ |
| 655 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 656 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 657 | |
| 658 | srcs: [ |
| 659 | "tests/macrobench/TestSceneRunner.cpp", |
| 660 | "tests/macrobench/main.cpp", |
| 661 | ], |
| 662 | } |
| 663 | |
| 664 | // ------------------------ |
| 665 | // Micro-bench app |
| 666 | // --------------------- |
| 667 | |
| 668 | cc_benchmark { |
| 669 | name: "hwuimicro", |
| 670 | defaults: ["hwui_test_defaults"], |
| 671 | |
John Reck | 23462d8 | 2019-05-29 16:55:06 -0700 | [diff] [blame] | 672 | static_libs: ["libhwui_static"], |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 673 | shared_libs: [ |
| 674 | "libmemunreachable", |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 675 | ], |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 676 | |
| 677 | srcs: [ |
| 678 | "tests/microbench/main.cpp", |
John Reck | b5eeb18 | 2020-12-09 13:45:39 -0500 | [diff] [blame] | 679 | "tests/microbench/CanvasOpBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 680 | "tests/microbench/DisplayListCanvasBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 681 | "tests/microbench/LinearAllocatorBench.cpp", |
| 682 | "tests/microbench/PathParserBench.cpp", |
| 683 | "tests/microbench/RenderNodeBench.cpp", |
Colin Cross | f629810 | 2017-04-19 15:25:25 -0700 | [diff] [blame] | 684 | ], |
| 685 | } |
Pirama Arumuga Nainar | bc1e177 | 2017-11-17 11:32:16 -0800 | [diff] [blame] | 686 | |
| 687 | // ---------------------------------------- |
| 688 | // Phony target to build benchmarks for PGO |
| 689 | // ---------------------------------------- |
| 690 | |
| 691 | phony { |
| 692 | name: "pgo-targets-hwui", |
| 693 | required: [ |
| 694 | "hwuimicro", |
| 695 | "hwuimacro", |
| 696 | ] |
| 697 | } |