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