blob: 1bde5ff43aa8b53e55fa2e32379d14d99d28f43d [file] [log] [blame]
Bob Badour8a6a2bc2021-02-12 17:07:05 -08001package {
Ying Wei22b08192024-04-18 07:28:34 +00002 default_team: "trendy_team_android_core_graphics_stack",
Bob Badour8a6a2bc2021-02-12 17:07:05 -08003 default_applicable_licenses: ["frameworks_base_libs_hwui_license"],
4}
5
6// Added automatically by a large-scale-change that took the approach of
7// 'apply every license found to every target'. While this makes sure we respect
8// every license restriction, it may not be entirely correct.
9//
10// e.g. GPL in an MIT project might only apply to the contrib/ directory.
11//
12// Please consider splitting the single license below into multiple licenses,
13// taking care not to lose any license_kind information, and overriding the
14// default license using the 'licenses: [...]' property on targets as needed.
15//
16// For unused files, consider creating a 'fileGroup' with "//visibility:private"
17// to attach the license to, and including a comment whether the files may be
18// used in the current project.
19// See: http://go/android-license-faq
20license {
21 name: "frameworks_base_libs_hwui_license",
22 visibility: [":__subpackages__"],
23 license_kinds: [
24 "SPDX-license-identifier-Apache-2.0",
25 "SPDX-license-identifier-BSD",
26 ],
27 license_text: [
28 "NOTICE",
29 ],
30}
31
John Reckd66cdb32023-08-21 22:25:42 -040032aconfig_declarations {
33 name: "hwui_flags",
34 package: "com.android.graphics.hwui.flags",
Yu Liuc4a5c682024-04-02 04:06:48 +000035 container: "system",
John Reckd66cdb32023-08-21 22:25:42 -040036 srcs: [
37 "aconfig/hwui_flags.aconfig",
38 ],
39}
40
John Reckd66cdb32023-08-21 22:25:42 -040041cc_aconfig_library {
42 name: "hwui_flags_cc_lib",
Tyler Freemandcd164c2023-10-19 22:48:34 +000043 host_supported: true,
John Reckd66cdb32023-08-21 22:25:42 -040044 aconfig_declarations: "hwui_flags",
45}
46
Colin Crossf6298102017-04-19 15:25:25 -070047cc_defaults {
48 name: "hwui_defaults",
49 defaults: [
50 "hwui_static_deps",
Pirama Arumuga Nainar0dfd4be2017-11-16 22:40:00 -080051 "skia_deps",
Colin Crossf6298102017-04-19 15:25:25 -070052 //"hwui_bugreport_font_cache_usage",
53 //"hwui_compile_for_perf",
Pirama Arumuga Nainarb7913e12018-03-09 00:03:57 +000054 "hwui_lto",
Colin Crossf6298102017-04-19 15:25:25 -070055 ],
56
John Reck283bb462018-12-13 16:40:14 -080057 cpp_std: "experimental",
58
Colin Crossf6298102017-04-19 15:25:25 -070059 cflags: [
60 "-DEGL_EGLEXT_PROTOTYPES",
61 "-DGL_GLEXT_PROTOTYPES",
62 "-DATRACE_TAG=ATRACE_TAG_VIEW",
Nolan Scobie7237e472023-08-04 16:50:41 -040063 "-DLOG_TAG=\"HWUI\"",
Colin Crossf6298102017-04-19 15:25:25 -070064 "-Wall",
Siarhei Vishniakou07d35cb2021-07-03 02:22:12 +000065 "-Wthread-safety",
Colin Crossf6298102017-04-19 15:25:25 -070066 "-Wno-unused-parameter",
67 "-Wunreachable-code",
68 "-Werror",
69 "-fvisibility=hidden",
70
71 // GCC false-positives on this warning, and since we -Werror that's
72 // a problem
73 "-Wno-free-nonheap-object",
Yi Kong3ccc52f2023-03-22 17:09:50 +090074
75 // Do not de-optimise cold code paths in AFDO.
76 // Some code paths might be infrequently executed but critical to latency.
77 "-fno-profile-sample-accurate",
Colin Crossf6298102017-04-19 15:25:25 -070078 ],
79
80 include_dirs: [
81 "external/skia/include/private",
82 "external/skia/src/core",
Jerome Gaillardbea67ce2024-03-28 14:21:16 +000083 "external/skia/src/utils",
Colin Crossf6298102017-04-19 15:25:25 -070084 ],
85
Fedor Kudasov182cbf92019-06-05 10:30:20 +010086 target: {
87 android: {
88 include_dirs: [
Fedor Kudasov182cbf92019-06-05 10:30:20 +010089 "external/skia/src/image",
Fedor Kudasov182cbf92019-06-05 10:30:20 +010090 "external/skia/src/gpu",
91 "external/skia/src/shaders",
92 ],
93 },
94 host: {
95 include_dirs: [
96 "external/vulkan-headers/include",
Jerome Gaillardda745d22024-04-16 14:06:37 +010097 "frameworks/av/media/ndk/include",
Fedor Kudasov182cbf92019-06-05 10:30:20 +010098 ],
99 cflags: [
100 "-Wno-unused-variable",
Jerome Gaillardd26915c2024-03-26 12:05:52 +0000101 "-D__INTRODUCED_IN(n)=",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100102 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700103 },
104 },
Colin Crossf6298102017-04-19 15:25:25 -0700105}
106
107cc_defaults {
108 name: "hwui_static_deps",
Sally Qi3ea28f12022-08-22 14:05:45 -0700109 defaults: [
110 "android.hardware.graphics.common-ndk_shared",
111 "android.hardware.graphics.composer3-ndk_shared",
112 ],
Colin Crossf6298102017-04-19 15:25:25 -0700113 shared_libs: [
Jerome Gaillarda02a12d2019-05-28 18:07:56 +0100114 "libbase",
Colin Crossf6298102017-04-19 15:25:25 -0700115 "libharfbuzz_ng",
Colin Crossf6298102017-04-19 15:25:25 -0700116 "libminikin",
Colin Crossf6298102017-04-19 15:25:25 -0700117 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100118
Alec Mouri45238012020-01-29 11:04:40 -0800119 static_libs: [
120 "libui-types",
121 ],
122
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100123 target: {
124 android: {
125 shared_libs: [
Alec Mourid0001fe2021-11-22 10:09:22 -0800126 "android.hardware.graphics.common@1.2",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100127 "liblog",
128 "libcutils",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100129 "libutils",
130 "libEGL",
131 "libGLESv1_CM",
132 "libGLESv2",
133 "libGLESv3",
134 "libvulkan",
Alec Mouri22d753f2019-09-05 17:11:45 -0700135 "libnativedisplay",
Derek Sollenbergere78f7c92019-07-31 15:18:47 -0400136 "libnativewindow",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100137 "libprotobuf-cpp-lite",
138 "libft2",
139 "libandroidfw",
140 "libcrypto",
141 "libsync",
Alec Mouri55fa23d2025-03-03 22:28:52 +0000142 "libgui",
John Reckac175cc2023-05-05 16:29:14 -0400143 "libui",
Seigo Nonakacd348c62023-09-12 16:05:44 +0900144 "aconfig_text_flags_c_lib",
Daniel Norman2acb59c2025-02-15 01:35:37 +0000145 "aconfig_view_accessibility_flags_c_lib",
Jerome Gaillard167d1cf2024-07-10 16:31:40 +0100146 "server_configurable_flags",
147 "libaconfig_storage_read_api_cc",
Tom Murphy102ba1282024-07-25 12:50:46 +0000148 "libgraphicsenv",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100149 ],
150 static_libs: [
151 "libEGL_blobCache",
Stan Ilievc9043812020-02-03 16:57:09 -0500152 "libprotoutil",
Alec Mourid0001fe2021-11-22 10:09:22 -0800153 "libshaders",
Tej Singh78f65b62021-03-18 16:19:55 -0700154 "libstatslog_hwui",
155 "libstatspull_lazy",
156 "libstatssocket_lazy",
Alec Mourid0001fe2021-11-22 10:09:22 -0800157 "libtonemap",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100158 ],
Alec Mourid03f7592024-12-05 18:29:19 +0000159 whole_static_libs: [
160 "hwui_flags_cc_lib",
161 "libsurfaceflingerflags",
162 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100163 },
164 host: {
165 static_libs: [
166 "libandroidfw",
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000167 "libhostgraphics",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100168 "libutils",
169 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700170 },
Makoto Onuki96bf4b22025-03-20 10:47:39 -0700171 host_linux: {
172 shared_libs: [
173 "libaconfig_storage_read_api_cc",
174 ],
175 whole_static_libs: [
176 "hwui_flags_cc_lib",
177 ],
178 },
Tej Singh78f65b62021-03-18 16:19:55 -0700179 },
Colin Crossf6298102017-04-19 15:25:25 -0700180}
181
182cc_defaults {
183 name: "hwui_bugreport_font_cache_usage",
Colin Crossf6298102017-04-19 15:25:25 -0700184 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
185}
186
187cc_defaults {
188 name: "hwui_compile_for_perf",
189 // TODO: Non-arm?
190 cflags: [
191 "-fno-omit-frame-pointer",
192 "-marm",
193 "-mapcs",
194 ],
195}
196
Zhizhou Yangf30f1122018-02-26 17:59:38 -0800197// Build hwui library with ThinLTO by default.
198cc_defaults {
199 name: "hwui_lto",
200 target: {
201 android: {
202 lto: {
203 thin: true,
204 },
205 },
206 },
207}
208
Colin Crossf6298102017-04-19 15:25:25 -0700209// ------------------------
Alec Mourief37c242020-03-02 21:38:09 +0000210// framework-graphics jar
211// ------------------------
212
Paul Duffin4e006622020-05-31 16:55:13 +0100213java_sdk_library {
Alec Mourief37c242020-03-02 21:38:09 +0000214 name: "framework-graphics",
Paul Duffin4e006622020-05-31 16:55:13 +0100215 defaults: ["framework-module-defaults"],
216 visibility: [
217 "//frameworks/base", // Framework
218 ],
John Wu9dda6202025-01-23 17:15:30 +0000219 impl_library_visibility: [
220 "//frameworks/base/ravenwood",
221 ],
Alec Mourief37c242020-03-02 21:38:09 +0000222
223 srcs: [
224 ":framework-graphics-srcs",
225 ],
226
227 permitted_packages: [
228 "android.graphics",
229 ],
230
Alec Mourief37c242020-03-02 21:38:09 +0000231 // TODO: once framework-graphics is officially part of the
232 // UI-rendering module this line would no longer be
233 // needed.
234 installable: true,
235
Paul Duffin4e006622020-05-31 16:55:13 +0100236 // Disable api_lint that the defaults enable
237 // TODO: enable this
238 api_lint: {
239 enabled: false,
240 },
Anton Hansson96b08ae2020-12-21 16:59:06 +0000241 // TODO: remove this
242 unsafe_ignore_missing_latest_api: true,
Alec Mourief37c242020-03-02 21:38:09 +0000243}
244
245filegroup {
John Wu8b53f462024-12-27 00:50:15 +0000246 name: "framework-graphics-ravenwood-policies",
247 srcs: [
248 "framework-graphics-ravenwood-policies.txt",
249 ],
250 visibility: ["//frameworks/base/ravenwood"],
251}
252
253filegroup {
Alec Mourief37c242020-03-02 21:38:09 +0000254 name: "framework-graphics-srcs",
255 srcs: [
256 "apex/java/**/*.java",
257 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700258 path: "apex/java",
Alec Mourief37c242020-03-02 21:38:09 +0000259}
260
Alec Mourief37c242020-03-02 21:38:09 +0000261// ------------------------
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400262// APEX
263// ------------------------
264
265cc_library_headers {
266 name: "android_graphics_apex_headers",
267
268 host_supported: true,
269 export_include_dirs: [
270 "apex/include",
271 ],
272 target: {
273 windows: {
274 enabled: true,
275 },
Tej Singh78f65b62021-03-18 16:19:55 -0700276 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400277}
278
279cc_defaults {
280 name: "android_graphics_apex",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400281 cflags: [
282 "-Wno-unused-parameter",
283 "-Wno-non-virtual-dtor",
284 "-Wno-maybe-uninitialized",
285 "-Wno-parentheses",
286 "-Wall",
287 "-Werror",
288 "-Wno-error=deprecated-declarations",
289 "-Wunused",
290 "-Wunreachable-code",
291 ],
292
293 cppflags: ["-Wno-conversion-null"],
294
295 srcs: [
Jerome Gaillardda745d22024-04-16 14:06:37 +0100296 "apex/android_canvas.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400297 "apex/android_matrix.cpp",
298 "apex/android_paint.cpp",
299 "apex/android_region.cpp",
Leon Scroggins IIIcd9e7b42022-04-08 15:27:57 -0400300 "apex/properties.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400301 ],
302
Tej Singh78f65b62021-03-18 16:19:55 -0700303 header_libs: ["android_graphics_apex_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400304
305 target: {
306 android: {
307 srcs: [ // sources that depend on android only libraries
308 "apex/android_bitmap.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400309 "apex/jni_runtime.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400310 ],
311 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400312 host: {
313 srcs: [
314 "apex/LayoutlibLoader.cpp",
315 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700316 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400317 },
318}
319
320// ------------------------
321// Android Graphics JNI
322// ------------------------
323
324cc_library_headers {
325 name: "android_graphics_jni_headers",
326
327 host_supported: true,
328 export_include_dirs: [
329 "jni",
330 ],
331 target: {
332 windows: {
333 enabled: true,
334 },
Tej Singh78f65b62021-03-18 16:19:55 -0700335 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400336}
337
338cc_defaults {
339 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400340 cflags: [
341 "-Wno-unused-parameter",
342 "-Wno-non-virtual-dtor",
343 "-Wno-maybe-uninitialized",
344 "-Wno-parentheses",
345
346 "-DGL_GLEXT_PROTOTYPES",
347 "-DEGL_EGLEXT_PROTOTYPES",
348
349 "-DU_USING_ICU_NAMESPACE=0",
350
351 "-Wall",
352 "-Werror",
353 "-Wno-error=deprecated-declarations",
354 "-Wunused",
355 "-Wunreachable-code",
356 ],
357
358 cppflags: ["-Wno-conversion-null"],
359
360 srcs: [
361 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
362 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
363 "jni/android_graphics_Canvas.cpp",
Makoto Onuki91ab1132024-05-14 15:54:12 -0700364 "jni/android_graphics_Color.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400365 "jni/android_graphics_ColorSpace.cpp",
366 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
367 "jni/android_graphics_drawable_VectorDrawable.cpp",
Jerome Gaillardda745d22024-04-16 14:06:37 +0100368 "jni/android_graphics_HardwareRenderer.cpp",
369 "jni/android_graphics_HardwareBufferRenderer.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400370 "jni/android_graphics_HardwareRendererObserver.cpp",
371 "jni/android_graphics_Matrix.cpp",
372 "jni/android_graphics_Picture.cpp",
373 "jni/android_graphics_DisplayListCanvas.cpp",
Nader Jawad5f0a8002023-02-21 17:00:51 -0800374 "jni/android_graphics_Mesh.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400375 "jni/android_graphics_RenderNode.cpp",
376 "jni/android_nio_utils.cpp",
377 "jni/android_util_PathParser.cpp",
378
Jerome Gaillard01f8f4f2024-03-19 14:24:35 +0000379 "jni/AnimatedImageDrawable.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400380 "jni/Bitmap.cpp",
Jerome Gaillardf3ff3b82024-02-26 15:49:23 +0000381 "jni/BitmapRegionDecoder.cpp",
Jorge Betancourtbe71b3e2024-11-12 19:58:03 +0000382 "jni/RuntimeXfermode.cpp",
Nader Jawad8c1d7aa2023-03-02 15:59:11 -0800383 "jni/BufferUtils.cpp",
Nader Jawada3521852023-01-30 20:23:46 -0800384 "jni/HardwareBufferHelpers.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400385 "jni/BitmapFactory.cpp",
386 "jni/ByteBufferStreamAdaptor.cpp",
387 "jni/Camera.cpp",
388 "jni/CanvasProperty.cpp",
389 "jni/ColorFilter.cpp",
390 "jni/CreateJavaOutputStreamAdaptor.cpp",
391 "jni/FontFamily.cpp",
392 "jni/FontUtils.cpp",
John Reck5bd537e2023-01-24 20:13:45 -0500393 "jni/Gainmap.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400394 "jni/Graphics.cpp",
395 "jni/ImageDecoder.cpp",
396 "jni/Interpolator.cpp",
Angel Aguayo90c46ee2022-11-08 23:42:09 +0000397 "jni/MeshSpecification.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400398 "jni/MaskFilter.cpp",
399 "jni/NinePatch.cpp",
400 "jni/NinePatchPeeker.cpp",
401 "jni/Paint.cpp",
402 "jni/PaintFilter.cpp",
403 "jni/Path.cpp",
404 "jni/PathEffect.cpp",
Chet Haase0834e9f2022-08-15 23:01:03 +0000405 "jni/PathIterator.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400406 "jni/PathMeasure.cpp",
407 "jni/Picture.cpp",
Jerome Gaillard9ce48282021-12-02 17:11:28 +0000408 "jni/Region.cpp",
Sally Qi9d2d9342023-02-06 11:11:31 -0800409 "jni/ScopedParcel.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400410 "jni/Shader.cpp",
Nader Jawad390d6e82020-09-24 21:35:03 -0700411 "jni/RenderEffect.cpp",
Jorge Betancourt2c9a6882024-09-09 20:34:10 +0000412 "jni/RuntimeEffectUtils.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400413 "jni/Typeface.cpp",
414 "jni/Utils.cpp",
415 "jni/YuvToJpegEncoder.cpp",
416 "jni/fonts/Font.cpp",
417 "jni/fonts/FontFamily.cpp",
418 "jni/text/LineBreaker.cpp",
419 "jni/text/MeasuredText.cpp",
Seigo Nonakaf3a19152020-09-14 15:29:42 -0700420 "jni/text/TextShaper.cpp",
Haoyu Zhang043d23a2023-02-22 11:20:09 -0800421 "jni/text/GraphemeBreak.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400422 ],
423
Dichen Zhang3b2c0ce2022-12-14 19:58:55 +0000424 header_libs: [
425 "android_graphics_jni_headers",
426 "libnativewindow_headers",
427 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400428
429 include_dirs: [
430 "external/skia/include/private",
431 "external/skia/src/codec",
432 "external/skia/src/core",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400433 ],
434
435 shared_libs: [
436 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400437 "libcutils",
438 "libharfbuzz_ng",
Dichen Zhang3b2c0ce2022-12-14 19:58:55 +0000439 "libimage_io",
440 "libjpeg",
Dichen Zhang7087aaf2023-04-14 19:01:05 +0000441 "libultrahdr",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400442 "liblog",
443 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400444 "libz",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400445 ],
446
Tej Singh78f65b62021-03-18 16:19:55 -0700447 static_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700448 "libziparchive_for_incfs",
449 ],
Orion Hodson33cbf8b2021-02-08 16:17:07 +0000450
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400451 target: {
452 android: {
453 srcs: [ // sources that depend on android only libraries
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400454 "jni/android_graphics_TextureLayer.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400455 "jni/GIFMovie.cpp",
456 "jni/GraphicsStatsService.cpp",
457 "jni/Movie.cpp",
458 "jni/MovieImpl.cpp",
459 "jni/pdf/PdfDocument.cpp",
460 "jni/pdf/PdfEditor.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400461 "jni/pdf/PdfUtils.cpp",
462 ],
463 shared_libs: [
464 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500465 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500466 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400467 "libmediandk",
468 "libnativedisplay",
469 "libnativewindow",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400470 "libpdfium",
471 ],
472 static_libs: [
473 "libgif",
Jerome Gaillard167d1cf2024-07-10 16:31:40 +0100474 "libnativehelper_lazy",
Tej Singh78f65b62021-03-18 16:19:55 -0700475 "libstatslog_hwui",
476 "libstatspull_lazy",
477 "libstatssocket_lazy",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400478 ],
479 },
Jerome Gaillardda745d22024-04-16 14:06:37 +0100480 linux: {
481 srcs: ["platform/linux/utils/SharedLib.cpp"],
John Wu8b53f462024-12-27 00:50:15 +0000482 shared_libs: [
483 "libbinder",
484 "libbinder_ndk",
485 ],
Jerome Gaillardda745d22024-04-16 14:06:37 +0100486 },
487 darwin: {
488 srcs: ["platform/darwin/utils/SharedLib.cpp"],
489 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400490 host: {
491 cflags: [
492 "-Wno-unused-const-variable",
493 "-Wno-unused-function",
494 ],
495 static_libs: [
496 "libandroidfw",
Jerome Gaillard167d1cf2024-07-10 16:31:40 +0100497 "libnativehelper_jvm",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400498 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700499 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400500 },
501}
502
Tej Singh78f65b62021-03-18 16:19:55 -0700503cc_library_static {
504 name: "libstatslog_hwui",
505 generated_sources: ["statslog_hwui.cpp"],
506 generated_headers: ["statslog_hwui.h"],
507 export_generated_headers: ["statslog_hwui.h"],
508 static_libs: [
509 "libstatssocket_lazy",
510 "libstatspull_lazy",
511 ],
512}
513
514genrule {
515 name: "statslog_hwui.h",
516 tools: ["stats-log-api-gen"],
517 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
518 " --namespace android,uirenderer,stats",
519 out: [
520 "statslog_hwui.h",
521 ],
522}
523
524genrule {
525 name: "statslog_hwui.cpp",
526 tools: ["stats-log-api-gen"],
527 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
528 " --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
529 out: [
530 "statslog_hwui.cpp",
531 ],
532}
533
Alec Mouri49ee9012024-09-25 16:13:34 +0000534genrule {
535 name: "statslog-hwui-java-gen",
536 tools: ["stats-log-api-gen"],
537 cmd: "$(location stats-log-api-gen) --java $(out) --module hwui --javaPackage com.android.os.coregraphics --javaClass HwuiStatsLog",
538 out: ["com/android/os/coregraphics/HwuiStatsLog.java"],
539}
540
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400541// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700542// library
543// ------------------------
544
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400545cc_library_headers {
546 name: "libhwui_internal_headers",
547
548 host_supported: true,
549 export_include_dirs: [
550 ".",
551 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700552 header_libs: ["android_graphics_jni_headers"],
553 export_header_lib_headers: ["android_graphics_jni_headers"],
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000554 target: {
555 android: {
556 export_include_dirs: ["platform/android"],
557 },
558 host: {
559 export_include_dirs: ["platform/host"],
560 },
561 windows: {
562 enabled: true,
563 },
564 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400565}
566
Colin Crossf6298102017-04-19 15:25:25 -0700567cc_defaults {
568 name: "libhwui_defaults",
569 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400570
571 whole_static_libs: ["libskia"],
572
Colin Crossf6298102017-04-19 15:25:25 -0700573 srcs: [
John Reckdc95f102020-11-16 12:35:02 -0500574 "canvas/CanvasFrontend.cpp",
John Reck013127b2020-10-29 20:53:51 -0400575 "canvas/CanvasOpBuffer.cpp",
576 "canvas/CanvasOpRasterizer.cpp",
John Reck5cb290b2021-02-01 13:47:31 -0500577 "effects/StretchEffect.cpp",
John Reck115195e2023-02-01 20:57:44 -0500578 "effects/GainmapRenderer.cpp",
Dongya Jiange2b99382022-02-28 21:35:57 +0800579 "pipeline/skia/BackdropFilterDrawable.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700580 "pipeline/skia/HolePunch.cpp",
Jerome Gaillardbea67ce2024-03-28 14:21:16 +0000581 "pipeline/skia/SkiaCpuPipeline.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100582 "pipeline/skia/SkiaDisplayList.cpp",
Jerome Gaillardbea67ce2024-03-28 14:21:16 +0000583 "pipeline/skia/SkiaPipeline.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100584 "pipeline/skia/SkiaRecordingCanvas.cpp",
Nader Jawad197743f2021-04-19 19:45:13 -0700585 "pipeline/skia/StretchMask.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100586 "pipeline/skia/RenderNodeDrawable.cpp",
587 "pipeline/skia/ReorderBarrierDrawables.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700588 "pipeline/skia/TransformCanvas.cpp",
Jerome Gaillarda0cb3622024-04-09 14:54:06 +0100589 "renderstate/RenderState.cpp",
Jerome Gaillardd26915c2024-03-26 12:05:52 +0000590 "renderthread/CanvasContext.cpp",
Jerome Gaillard8ab756d2024-04-02 17:38:20 +0100591 "renderthread/DrawFrameTask.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100592 "renderthread/Frame.cpp",
Jerome Gaillardda745d22024-04-16 14:06:37 +0100593 "renderthread/RenderEffectCapabilityQuery.cpp",
Jerome Gaillard8ab756d2024-04-02 17:38:20 +0100594 "renderthread/RenderProxy.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100595 "renderthread/RenderTask.cpp",
596 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500597 "hwui/AnimatedImageDrawable.cpp",
Jerome Gaillard01f8f4f2024-03-19 14:24:35 +0000598 "hwui/AnimatedImageThread.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700599 "hwui/Bitmap.cpp",
Mike Reed0f9dce72021-02-12 21:20:33 -0500600 "hwui/BlurDrawLooper.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700601 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500602 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700603 "hwui/MinikinSkia.cpp",
604 "hwui/MinikinUtils.cpp",
605 "hwui/PaintImpl.cpp",
606 "hwui/Typeface.cpp",
Jerome Gaillard9b2b7622024-03-14 18:55:30 +0000607 "thread/CommonPool.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700608 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100609 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700610 "utils/LinearAllocator.cpp",
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000611 "utils/StringUtils.cpp",
Alec Mouric477f9f2024-11-05 03:44:02 +0000612 "utils/StatsUtils.cpp",
Kevin Lubick04931012023-11-15 19:17:43 +0000613 "utils/TypefaceUtils.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700614 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100615 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700616 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100617 "AnimatorManager.cpp",
618 "CanvasTransform.cpp",
619 "DamageAccumulator.cpp",
Jerome Gaillard8f6d6e02024-02-26 18:56:00 +0000620 "DeviceInfo.cpp",
Jerome Gaillardf3ff3b82024-02-26 15:49:23 +0000621 "FrameInfo.cpp",
622 "FrameInfoVisualizer.cpp",
623 "FrameMetricsReporter.cpp",
Sally Qi587fb572023-03-03 15:50:06 -0800624 "Gainmap.cpp",
Jerome Gaillardea9bf2a2024-03-13 19:32:31 +0000625 "HWUIProperties.sysprop",
Colin Crossf6298102017-04-19 15:25:25 -0700626 "Interpolator.cpp",
Jerome Gaillard6352d1c2024-02-27 12:46:21 +0000627 "JankTracker.cpp",
Jerome Gaillardda745d22024-04-16 14:06:37 +0100628 "Layer.cpp",
Jerome Gaillardbea67ce2024-03-28 14:21:16 +0000629 "LayerUpdateQueue.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100630 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700631 "Matrix.cpp",
Nader Jawad5f0a8002023-02-21 17:00:51 -0800632 "Mesh.cpp",
John Reck5f66fb82022-09-23 17:49:23 -0400633 "MemoryPolicy.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700634 "PathParser.cpp",
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000635 "ProfileData.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700636 "Properties.cpp",
637 "PropertyValuesAnimatorSet.cpp",
638 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100639 "RecordingCanvas.cpp",
640 "RenderNode.cpp",
641 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100642 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700643 "SkiaCanvas.cpp",
Mike Reed74065272021-04-12 09:52:07 -0400644 "SkiaInterpolator.cpp",
Alec Mouridded51f2023-02-01 06:04:55 +0000645 "Tonemapper.cpp",
Jerome Gaillardd26915c2024-03-26 12:05:52 +0000646 "TreeInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700647 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700648 ],
649
Kweku Adams228b6d22018-04-12 13:09:04 -0700650 proto: {
651 export_proto_headers: true,
652 },
653
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000654 header_libs: ["libandroid_headers_private"],
655
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100656 target: {
657 android: {
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000658 header_libs: ["libtonemap_headers"],
659
660 local_include_dirs: ["platform/android"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100661
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100662 srcs: [
Stan Ilieve0fae232020-01-07 17:21:49 -0500663 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100664 "pipeline/skia/GLFunctorDrawable.cpp",
665 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100666 "pipeline/skia/ShaderCache.cpp",
Jerome Gaillardbea67ce2024-03-28 14:21:16 +0000667 "pipeline/skia/SkiaGpuPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100668 "pipeline/skia/SkiaMemoryTracer.cpp",
669 "pipeline/skia/SkiaOpenGLPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100670 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100671 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100672 "pipeline/skia/VkFunctorDrawable.cpp",
673 "pipeline/skia/VkInteropFunctorDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100674 "renderthread/CacheManager.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100675 "renderthread/EglManager.cpp",
676 "renderthread/ReliableSurface.cpp",
677 "renderthread/VulkanManager.cpp",
678 "renderthread/VulkanSurface.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100679 "renderthread/RenderThread.cpp",
Matt Buckleye9023cf2022-11-23 22:39:25 +0000680 "renderthread/HintSessionWrapper.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100681 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100682 "utils/GLUtils.cpp",
Alec Mouri45238012020-01-29 11:04:40 -0800683 "utils/NdkUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400684 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100685 "DeferredLayerUpdater.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100686 "HardwareBitmapUploader.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100687 "ProfileDataContainer.cpp",
688 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100689 "WebViewFunctorManager.cpp",
690 "protos/graphicsstats.proto",
691 ],
692
693 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
694 cflags: ["-Wno-implicit-fallthrough"],
695 },
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000696 host: {
Jerome Gaillard8f6d6e02024-02-26 18:56:00 +0000697 header_libs: [
698 "libnativebase_headers",
699 "libnativedisplay_headers",
700 ],
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000701
702 local_include_dirs: ["platform/host"],
703
704 srcs: [
705 "platform/host/renderthread/CacheManager.cpp",
Jerome Gaillardd26915c2024-03-26 12:05:52 +0000706 "platform/host/renderthread/HintSessionWrapper.cpp",
707 "platform/host/renderthread/ReliableSurface.cpp",
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000708 "platform/host/renderthread/RenderThread.cpp",
709 "platform/host/ProfileDataContainer.cpp",
710 "platform/host/Readback.cpp",
711 "platform/host/WebViewFunctorManager.cpp",
712 ],
713
Jerome Gaillard8f6d6e02024-02-26 18:56:00 +0000714 cflags: [
715 "-DHWUI_NULL_GPU",
716 "-DNULL_GPU_MAX_TEXTURE_SIZE=4096",
717 "-Wno-unused-private-field",
718 ],
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000719 },
Tej Singh78f65b62021-03-18 16:19:55 -0700720 },
Colin Crossf6298102017-04-19 15:25:25 -0700721}
722
723cc_library {
724 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100725 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700726 defaults: [
727 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400728 "android_graphics_apex",
729 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700730 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700731 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400732 export_header_lib_headers: ["android_graphics_apex_headers"],
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400733 target: {
734 android: {
735 version_script: "libhwui.map.txt",
Tej Singh78f65b62021-03-18 16:19:55 -0700736 },
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400737 },
Yi Kong7c0a3ad2022-01-08 01:01:20 +0800738 afdo: true,
Colin Crossf6298102017-04-19 15:25:25 -0700739}
740
Colin Crossf6298102017-04-19 15:25:25 -0700741cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700742 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700743 defaults: [
744 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700745 ],
Colin Crossf6298102017-04-19 15:25:25 -0700746}
747
748cc_defaults {
749 name: "hwui_test_defaults",
750 defaults: ["hwui_defaults"],
Nolan Scobief89a38a2022-11-09 15:23:07 -0500751 test_suites: ["general-tests"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100752 header_libs: ["libandroid_headers_private"],
Alec Mouri680414e2020-01-28 09:22:33 -0800753 target: {
754 android: {
Jerome Gaillard87ef5242024-02-13 16:33:00 +0000755 local_include_dirs: ["platform/android"],
Alec Mouri680414e2020-01-28 09:22:33 -0800756 shared_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700757 "libgui",
758 "libui",
759 ],
760 },
Alec Mouri680414e2020-01-28 09:22:33 -0800761 },
Colin Crossf6298102017-04-19 15:25:25 -0700762 srcs: [
763 "tests/common/scenes/*.cpp",
764 "tests/common/LeakChecker.cpp",
765 "tests/common/TestListViewSceneBase.cpp",
766 "tests/common/TestContext.cpp",
767 "tests/common/TestScene.cpp",
768 "tests/common/TestUtils.cpp",
769 ],
770}
771
772// ------------------------
773// unit tests
774// ------------------------
775
776cc_test {
777 name: "hwui_unit_tests",
Nolan Scobie774e9b42024-07-25 16:05:27 -0400778 test_config: "tests/unit/AndroidTest.xml",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400779 defaults: [
780 "hwui_test_defaults",
781 "android_graphics_apex",
782 "android_graphics_jni",
783 ],
Colin Crossf6298102017-04-19 15:25:25 -0700784
785 static_libs: [
Seigo Nonakacd348c62023-09-12 16:05:44 +0900786 "libflagtest",
Colin Crossf6298102017-04-19 15:25:25 -0700787 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700788 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700789 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800790 shared_libs: [
791 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800792 ],
Colin Crossf6298102017-04-19 15:25:25 -0700793 srcs: [
794 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400795 "tests/unit/ABitmapTests.cpp",
Nolan Scobie2163e412022-10-24 19:57:43 -0400796 "tests/unit/AutoBackendTextureReleaseTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400797 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700798 "tests/unit/CanvasContextTests.cpp",
John Reck013127b2020-10-29 20:53:51 -0400799 "tests/unit/CanvasOpTests.cpp",
John Reckdc95f102020-11-16 12:35:02 -0500800 "tests/unit/CanvasFrontendTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700801 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700802 "tests/unit/DamageAccumulatorTests.cpp",
803 "tests/unit/DeferredLayerUpdaterTests.cpp",
Daniel Norman2285dd52025-01-29 02:57:49 +0000804 "tests/unit/DrawTextFunctorTest.cpp",
John Reck064650b2021-01-19 21:29:24 -0500805 "tests/unit/EglManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700806 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700807 "tests/unit/GraphicsStatsServiceTests.cpp",
Matt Buckley0c668362023-09-07 05:52:07 +0000808 "tests/unit/HintSessionWrapperTests.cpp",
Jorim Jaggi10f328c2021-01-19 00:08:02 +0100809 "tests/unit/JankTrackerTests.cpp",
Pablo Gamitodfb85a22021-08-26 01:19:05 +0200810 "tests/unit/FrameMetricsReporterTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700811 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700812 "tests/unit/LinearAllocatorTests.cpp",
813 "tests/unit/MatrixTests.cpp",
John Reck95735052020-12-15 13:39:22 -0500814 "tests/unit/OpBufferTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700815 "tests/unit/PathInterpolatorTests.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700816 "tests/unit/RenderEffectCapabilityQueryTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700817 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700818 "tests/unit/RenderNodeTests.cpp",
819 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800820 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400821 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700822 "tests/unit/SkiaBehaviorTests.cpp",
823 "tests/unit/SkiaDisplayListTests.cpp",
824 "tests/unit/SkiaPipelineTests.cpp",
825 "tests/unit/SkiaRenderPropertiesTests.cpp",
826 "tests/unit/SkiaCanvasTests.cpp",
Nader Jawadc401b232021-05-21 12:52:05 -0700827 "tests/unit/StretchEffectTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700828 "tests/unit/StringUtilsTests.cpp",
829 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700830 "tests/unit/ThreadBaseTests.cpp",
831 "tests/unit/TypefaceTests.cpp",
Seigo Nonakacd348c62023-09-12 16:05:44 +0900832 "tests/unit/UnderlineTest.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700833 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800834 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700835 ],
jahinimtiazd8b1dda2023-03-13 23:53:08 +0000836 data: [
837 ":hwuimicro",
838 ],
Colin Crossf6298102017-04-19 15:25:25 -0700839}
840
841// ------------------------
842// Macro-bench app
843// ------------------------
844
845cc_benchmark {
846 name: "hwuimacro",
Nolan Scobie774e9b42024-07-25 16:05:27 -0400847 test_config: "tests/macrobench/AndroidTest.xml",
Colin Crossf6298102017-04-19 15:25:25 -0700848 defaults: ["hwui_test_defaults"],
849
John Reck23462d82019-05-29 16:55:06 -0700850 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800851 shared_libs: [
852 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800853 ],
Colin Crossf6298102017-04-19 15:25:25 -0700854
855 srcs: [
856 "tests/macrobench/TestSceneRunner.cpp",
857 "tests/macrobench/main.cpp",
858 ],
859}
860
861// ------------------------
862// Micro-bench app
863// ---------------------
864
865cc_benchmark {
866 name: "hwuimicro",
Nolan Scobie774e9b42024-07-25 16:05:27 -0400867 test_config: "tests/microbench/AndroidTest.xml",
Colin Crossf6298102017-04-19 15:25:25 -0700868 defaults: ["hwui_test_defaults"],
869
John Reck23462d82019-05-29 16:55:06 -0700870 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800871 shared_libs: [
872 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800873 ],
Colin Crossf6298102017-04-19 15:25:25 -0700874
875 srcs: [
876 "tests/microbench/main.cpp",
John Reckb5eeb182020-12-09 13:45:39 -0500877 "tests/microbench/CanvasOpBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700878 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700879 "tests/microbench/LinearAllocatorBench.cpp",
880 "tests/microbench/PathParserBench.cpp",
881 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700882 ],
883}