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