blob: d8b077b324206fb21f9a58b6a2e184b0969aa154 [file] [log] [blame]
Bob Badour8a6a2bc2021-02-12 17:07:05 -08001package {
2 default_applicable_licenses: ["frameworks_base_libs_hwui_license"],
3}
4
5// Added automatically by a large-scale-change that took the approach of
6// 'apply every license found to every target'. While this makes sure we respect
7// every license restriction, it may not be entirely correct.
8//
9// e.g. GPL in an MIT project might only apply to the contrib/ directory.
10//
11// Please consider splitting the single license below into multiple licenses,
12// taking care not to lose any license_kind information, and overriding the
13// default license using the 'licenses: [...]' property on targets as needed.
14//
15// For unused files, consider creating a 'fileGroup' with "//visibility:private"
16// to attach the license to, and including a comment whether the files may be
17// used in the current project.
18// See: http://go/android-license-faq
19license {
20 name: "frameworks_base_libs_hwui_license",
21 visibility: [":__subpackages__"],
22 license_kinds: [
23 "SPDX-license-identifier-Apache-2.0",
24 "SPDX-license-identifier-BSD",
25 ],
26 license_text: [
27 "NOTICE",
28 ],
29}
30
Colin Crossf6298102017-04-19 15:25:25 -070031cc_defaults {
32 name: "hwui_defaults",
33 defaults: [
34 "hwui_static_deps",
Pirama Arumuga Nainar0dfd4be2017-11-16 22:40:00 -080035 "skia_deps",
Colin Crossf6298102017-04-19 15:25:25 -070036 //"hwui_bugreport_font_cache_usage",
37 //"hwui_compile_for_perf",
Pirama Arumuga Nainarb7913e12018-03-09 00:03:57 +000038 "hwui_lto",
Colin Crossf6298102017-04-19 15:25:25 -070039 ],
40
John Reck283bb462018-12-13 16:40:14 -080041 cpp_std: "experimental",
42
Colin Crossf6298102017-04-19 15:25:25 -070043 cflags: [
44 "-DEGL_EGLEXT_PROTOTYPES",
45 "-DGL_GLEXT_PROTOTYPES",
46 "-DATRACE_TAG=ATRACE_TAG_VIEW",
47 "-DLOG_TAG=\"OpenGLRenderer\"",
48 "-Wall",
Siarhei Vishniakou07d35cb2021-07-03 02:22:12 +000049 "-Wthread-safety",
Colin Crossf6298102017-04-19 15:25:25 -070050 "-Wno-unused-parameter",
51 "-Wunreachable-code",
52 "-Werror",
53 "-fvisibility=hidden",
54
55 // GCC false-positives on this warning, and since we -Werror that's
56 // a problem
57 "-Wno-free-nonheap-object",
Colin Crossf6298102017-04-19 15:25:25 -070058 ],
59
60 include_dirs: [
61 "external/skia/include/private",
62 "external/skia/src/core",
Colin Crossf6298102017-04-19 15:25:25 -070063 ],
64
65 product_variables: {
John Reck27294182018-07-11 11:21:09 -070066 eng: {
67 lto: {
68 never: true,
69 },
70 },
Colin Crossf6298102017-04-19 15:25:25 -070071 },
Fedor Kudasov182cbf92019-06-05 10:30:20 +010072
73 target: {
74 android: {
75 include_dirs: [
76 "external/skia/src/effects",
77 "external/skia/src/image",
78 "external/skia/src/utils",
79 "external/skia/src/gpu",
80 "external/skia/src/shaders",
81 ],
82 },
83 host: {
84 include_dirs: [
85 "external/vulkan-headers/include",
86 ],
87 cflags: [
88 "-Wno-unused-variable",
89 ],
Tej Singh78f65b62021-03-18 16:19:55 -070090 },
91 },
Colin Crossf6298102017-04-19 15:25:25 -070092}
93
94cc_defaults {
95 name: "hwui_static_deps",
96 shared_libs: [
Jerome Gaillarda02a12d2019-05-28 18:07:56 +010097 "libbase",
Colin Crossf6298102017-04-19 15:25:25 -070098 "libharfbuzz_ng",
Colin Crossf6298102017-04-19 15:25:25 -070099 "libminikin",
Colin Crossf6298102017-04-19 15:25:25 -0700100 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100101
Alec Mouri45238012020-01-29 11:04:40 -0800102 static_libs: [
103 "libui-types",
104 ],
105
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100106 target: {
107 android: {
108 shared_libs: [
Alec Mourid0001fe2021-11-22 10:09:22 -0800109 "android.hardware.graphics.common-V3-ndk",
110 "android.hardware.graphics.common@1.2",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100111 "liblog",
112 "libcutils",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100113 "libutils",
114 "libEGL",
115 "libGLESv1_CM",
116 "libGLESv2",
117 "libGLESv3",
118 "libvulkan",
Alec Mouri22d753f2019-09-05 17:11:45 -0700119 "libnativedisplay",
Derek Sollenbergere78f7c92019-07-31 15:18:47 -0400120 "libnativewindow",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100121 "libprotobuf-cpp-lite",
122 "libft2",
123 "libandroidfw",
124 "libcrypto",
125 "libsync",
126 ],
127 static_libs: [
128 "libEGL_blobCache",
Stan Ilievc9043812020-02-03 16:57:09 -0500129 "libprotoutil",
Alec Mourid0001fe2021-11-22 10:09:22 -0800130 "libshaders",
Tej Singh78f65b62021-03-18 16:19:55 -0700131 "libstatslog_hwui",
132 "libstatspull_lazy",
133 "libstatssocket_lazy",
Alec Mourid0001fe2021-11-22 10:09:22 -0800134 "libtonemap",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100135 ],
136 },
137 host: {
138 static_libs: [
139 "libandroidfw",
140 "libutils",
141 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700142 },
143 },
Colin Crossf6298102017-04-19 15:25:25 -0700144}
145
146cc_defaults {
147 name: "hwui_bugreport_font_cache_usage",
Colin Crossf6298102017-04-19 15:25:25 -0700148 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
149}
150
151cc_defaults {
152 name: "hwui_compile_for_perf",
153 // TODO: Non-arm?
154 cflags: [
155 "-fno-omit-frame-pointer",
156 "-marm",
157 "-mapcs",
158 ],
159}
160
Zhizhou Yangf30f1122018-02-26 17:59:38 -0800161// Build hwui library with ThinLTO by default.
162cc_defaults {
163 name: "hwui_lto",
164 target: {
165 android: {
166 lto: {
167 thin: true,
168 },
169 },
170 },
171}
172
Colin Crossf6298102017-04-19 15:25:25 -0700173// ------------------------
Alec Mourief37c242020-03-02 21:38:09 +0000174// framework-graphics jar
175// ------------------------
176
Paul Duffin4e006622020-05-31 16:55:13 +0100177java_sdk_library {
Alec Mourief37c242020-03-02 21:38:09 +0000178 name: "framework-graphics",
Paul Duffin4e006622020-05-31 16:55:13 +0100179 defaults: ["framework-module-defaults"],
180 visibility: [
181 "//frameworks/base", // Framework
182 ],
Alec Mourief37c242020-03-02 21:38:09 +0000183
184 srcs: [
185 ":framework-graphics-srcs",
186 ],
187
188 permitted_packages: [
189 "android.graphics",
190 ],
191
Alec Mourief37c242020-03-02 21:38:09 +0000192 // TODO: once framework-graphics is officially part of the
193 // UI-rendering module this line would no longer be
194 // needed.
195 installable: true,
196
Paul Duffin4e006622020-05-31 16:55:13 +0100197 // Disable api_lint that the defaults enable
198 // TODO: enable this
199 api_lint: {
200 enabled: false,
201 },
Anton Hansson96b08ae2020-12-21 16:59:06 +0000202 // TODO: remove this
203 unsafe_ignore_missing_latest_api: true,
Alec Mourief37c242020-03-02 21:38:09 +0000204}
205
206filegroup {
207 name: "framework-graphics-srcs",
208 srcs: [
209 "apex/java/**/*.java",
210 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700211 path: "apex/java",
Alec Mourief37c242020-03-02 21:38:09 +0000212}
213
Alec Mourief37c242020-03-02 21:38:09 +0000214// ------------------------
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400215// APEX
216// ------------------------
217
218cc_library_headers {
219 name: "android_graphics_apex_headers",
220
221 host_supported: true,
222 export_include_dirs: [
223 "apex/include",
224 ],
225 target: {
226 windows: {
227 enabled: true,
228 },
Tej Singh78f65b62021-03-18 16:19:55 -0700229 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400230}
231
232cc_defaults {
233 name: "android_graphics_apex",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400234 cflags: [
235 "-Wno-unused-parameter",
236 "-Wno-non-virtual-dtor",
237 "-Wno-maybe-uninitialized",
238 "-Wno-parentheses",
239 "-Wall",
240 "-Werror",
241 "-Wno-error=deprecated-declarations",
242 "-Wunused",
243 "-Wunreachable-code",
244 ],
245
246 cppflags: ["-Wno-conversion-null"],
247
248 srcs: [
249 "apex/android_matrix.cpp",
250 "apex/android_paint.cpp",
251 "apex/android_region.cpp",
Leon Scroggins IIIcd9e7b42022-04-08 15:27:57 -0400252 "apex/properties.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400253 ],
254
Tej Singh78f65b62021-03-18 16:19:55 -0700255 header_libs: ["android_graphics_apex_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400256
257 target: {
258 android: {
259 srcs: [ // sources that depend on android only libraries
260 "apex/android_bitmap.cpp",
261 "apex/android_canvas.cpp",
262 "apex/jni_runtime.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400263 ],
264 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400265 host: {
266 srcs: [
267 "apex/LayoutlibLoader.cpp",
268 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700269 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400270 },
271}
272
273// ------------------------
274// Android Graphics JNI
275// ------------------------
276
277cc_library_headers {
278 name: "android_graphics_jni_headers",
279
280 host_supported: true,
281 export_include_dirs: [
282 "jni",
283 ],
284 target: {
285 windows: {
286 enabled: true,
287 },
Tej Singh78f65b62021-03-18 16:19:55 -0700288 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400289}
290
291cc_defaults {
292 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400293 cflags: [
294 "-Wno-unused-parameter",
295 "-Wno-non-virtual-dtor",
296 "-Wno-maybe-uninitialized",
297 "-Wno-parentheses",
298
299 "-DGL_GLEXT_PROTOTYPES",
300 "-DEGL_EGLEXT_PROTOTYPES",
301
302 "-DU_USING_ICU_NAMESPACE=0",
303
304 "-Wall",
305 "-Werror",
306 "-Wno-error=deprecated-declarations",
307 "-Wunused",
308 "-Wunreachable-code",
309 ],
310
311 cppflags: ["-Wno-conversion-null"],
312
313 srcs: [
314 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
315 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
316 "jni/android_graphics_Canvas.cpp",
317 "jni/android_graphics_ColorSpace.cpp",
318 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
319 "jni/android_graphics_drawable_VectorDrawable.cpp",
320 "jni/android_graphics_HardwareRendererObserver.cpp",
321 "jni/android_graphics_Matrix.cpp",
322 "jni/android_graphics_Picture.cpp",
323 "jni/android_graphics_DisplayListCanvas.cpp",
324 "jni/android_graphics_RenderNode.cpp",
325 "jni/android_nio_utils.cpp",
326 "jni/android_util_PathParser.cpp",
327
328 "jni/Bitmap.cpp",
329 "jni/BitmapFactory.cpp",
330 "jni/ByteBufferStreamAdaptor.cpp",
331 "jni/Camera.cpp",
332 "jni/CanvasProperty.cpp",
333 "jni/ColorFilter.cpp",
334 "jni/CreateJavaOutputStreamAdaptor.cpp",
335 "jni/FontFamily.cpp",
336 "jni/FontUtils.cpp",
337 "jni/Graphics.cpp",
338 "jni/ImageDecoder.cpp",
339 "jni/Interpolator.cpp",
340 "jni/MaskFilter.cpp",
341 "jni/NinePatch.cpp",
342 "jni/NinePatchPeeker.cpp",
343 "jni/Paint.cpp",
344 "jni/PaintFilter.cpp",
345 "jni/Path.cpp",
346 "jni/PathEffect.cpp",
347 "jni/PathMeasure.cpp",
348 "jni/Picture.cpp",
Jerome Gaillard9ce48282021-12-02 17:11:28 +0000349 "jni/Region.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400350 "jni/Shader.cpp",
Nader Jawad390d6e82020-09-24 21:35:03 -0700351 "jni/RenderEffect.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400352 "jni/Typeface.cpp",
353 "jni/Utils.cpp",
354 "jni/YuvToJpegEncoder.cpp",
355 "jni/fonts/Font.cpp",
356 "jni/fonts/FontFamily.cpp",
357 "jni/text/LineBreaker.cpp",
358 "jni/text/MeasuredText.cpp",
Seigo Nonakaf3a19152020-09-14 15:29:42 -0700359 "jni/text/TextShaper.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400360 ],
361
Tej Singh78f65b62021-03-18 16:19:55 -0700362 header_libs: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400363
364 include_dirs: [
365 "external/skia/include/private",
366 "external/skia/src/codec",
367 "external/skia/src/core",
368 "external/skia/src/effects",
369 "external/skia/src/image",
370 "external/skia/src/images",
371 ],
372
373 shared_libs: [
374 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400375 "libcutils",
376 "libharfbuzz_ng",
377 "liblog",
378 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400379 "libz",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400380 "libjpeg",
381 ],
382
Tej Singh78f65b62021-03-18 16:19:55 -0700383 static_libs: [
384 "libnativehelper_lazy",
385 "libziparchive_for_incfs",
386 ],
Orion Hodson33cbf8b2021-02-08 16:17:07 +0000387
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400388 target: {
389 android: {
390 srcs: [ // sources that depend on android only libraries
391 "jni/AnimatedImageDrawable.cpp",
392 "jni/android_graphics_TextureLayer.cpp",
393 "jni/android_graphics_HardwareRenderer.cpp",
394 "jni/BitmapRegionDecoder.cpp",
395 "jni/GIFMovie.cpp",
396 "jni/GraphicsStatsService.cpp",
397 "jni/Movie.cpp",
398 "jni/MovieImpl.cpp",
399 "jni/pdf/PdfDocument.cpp",
400 "jni/pdf/PdfEditor.cpp",
401 "jni/pdf/PdfRenderer.cpp",
402 "jni/pdf/PdfUtils.cpp",
403 ],
404 shared_libs: [
405 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500406 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500407 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400408 "libmediandk",
409 "libnativedisplay",
410 "libnativewindow",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400411 "libpdfium",
412 ],
413 static_libs: [
414 "libgif",
Tej Singh78f65b62021-03-18 16:19:55 -0700415 "libstatslog_hwui",
416 "libstatspull_lazy",
417 "libstatssocket_lazy",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400418 ],
419 },
420 host: {
421 cflags: [
422 "-Wno-unused-const-variable",
423 "-Wno-unused-function",
424 ],
425 static_libs: [
426 "libandroidfw",
427 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700428 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400429 },
430}
431
Tej Singh78f65b62021-03-18 16:19:55 -0700432cc_library_static {
433 name: "libstatslog_hwui",
434 generated_sources: ["statslog_hwui.cpp"],
435 generated_headers: ["statslog_hwui.h"],
436 export_generated_headers: ["statslog_hwui.h"],
437 static_libs: [
438 "libstatssocket_lazy",
439 "libstatspull_lazy",
440 ],
441}
442
443genrule {
444 name: "statslog_hwui.h",
445 tools: ["stats-log-api-gen"],
446 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
447 " --namespace android,uirenderer,stats",
448 out: [
449 "statslog_hwui.h",
450 ],
451}
452
453genrule {
454 name: "statslog_hwui.cpp",
455 tools: ["stats-log-api-gen"],
456 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
457 " --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
458 out: [
459 "statslog_hwui.cpp",
460 ],
461}
462
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400463// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700464// library
465// ------------------------
466
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400467cc_library_headers {
468 name: "libhwui_internal_headers",
469
470 host_supported: true,
471 export_include_dirs: [
472 ".",
473 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700474 header_libs: ["android_graphics_jni_headers"],
475 export_header_lib_headers: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400476}
477
Colin Crossf6298102017-04-19 15:25:25 -0700478cc_defaults {
479 name: "libhwui_defaults",
480 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400481
482 whole_static_libs: ["libskia"],
483
Colin Crossf6298102017-04-19 15:25:25 -0700484 srcs: [
John Reckdc95f102020-11-16 12:35:02 -0500485 "canvas/CanvasFrontend.cpp",
John Reck013127b2020-10-29 20:53:51 -0400486 "canvas/CanvasOpBuffer.cpp",
487 "canvas/CanvasOpRasterizer.cpp",
John Reck5cb290b2021-02-01 13:47:31 -0500488 "effects/StretchEffect.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700489 "pipeline/skia/HolePunch.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100490 "pipeline/skia/SkiaDisplayList.cpp",
491 "pipeline/skia/SkiaRecordingCanvas.cpp",
Nader Jawad197743f2021-04-19 19:45:13 -0700492 "pipeline/skia/StretchMask.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100493 "pipeline/skia/RenderNodeDrawable.cpp",
494 "pipeline/skia/ReorderBarrierDrawables.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700495 "pipeline/skia/TransformCanvas.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100496 "renderthread/Frame.cpp",
497 "renderthread/RenderTask.cpp",
498 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500499 "hwui/AnimatedImageDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700500 "hwui/Bitmap.cpp",
Mike Reed0f9dce72021-02-12 21:20:33 -0500501 "hwui/BlurDrawLooper.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700502 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500503 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700504 "hwui/MinikinSkia.cpp",
505 "hwui/MinikinUtils.cpp",
506 "hwui/PaintImpl.cpp",
507 "hwui/Typeface.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700508 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100509 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700510 "utils/LinearAllocator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700511 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100512 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700513 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100514 "AnimatorManager.cpp",
515 "CanvasTransform.cpp",
516 "DamageAccumulator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700517 "Interpolator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100518 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700519 "Matrix.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700520 "PathParser.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700521 "Properties.cpp",
522 "PropertyValuesAnimatorSet.cpp",
523 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100524 "RecordingCanvas.cpp",
525 "RenderNode.cpp",
526 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100527 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700528 "SkiaCanvas.cpp",
Mike Reed74065272021-04-12 09:52:07 -0400529 "SkiaInterpolator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700530 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700531 ],
532
Kweku Adams228b6d22018-04-12 13:09:04 -0700533 proto: {
534 export_proto_headers: true,
535 },
536
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100537 target: {
538 android: {
Long Ling9e6c9fb2022-02-02 14:32:09 -0800539 header_libs: [
540 "libandroid_headers_private",
541 "libtonemap_headers",
542 ],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100543
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100544 srcs: [
Jerome Gaillardf9a4dc42020-01-29 15:23:26 +0000545 "hwui/AnimatedImageThread.cpp",
Stan Ilieve0fae232020-01-07 17:21:49 -0500546 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100547 "pipeline/skia/GLFunctorDrawable.cpp",
548 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100549 "pipeline/skia/ShaderCache.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100550 "pipeline/skia/SkiaMemoryTracer.cpp",
551 "pipeline/skia/SkiaOpenGLPipeline.cpp",
552 "pipeline/skia/SkiaPipeline.cpp",
553 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100554 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100555 "pipeline/skia/VkFunctorDrawable.cpp",
556 "pipeline/skia/VkInteropFunctorDrawable.cpp",
557 "renderstate/RenderState.cpp",
558 "renderthread/CacheManager.cpp",
559 "renderthread/CanvasContext.cpp",
560 "renderthread/DrawFrameTask.cpp",
561 "renderthread/EglManager.cpp",
562 "renderthread/ReliableSurface.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700563 "renderthread/RenderEffectCapabilityQuery.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100564 "renderthread/VulkanManager.cpp",
565 "renderthread/VulkanSurface.cpp",
566 "renderthread/RenderProxy.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100567 "renderthread/RenderThread.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100568 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100569 "thread/CommonPool.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100570 "utils/GLUtils.cpp",
Alec Mouri45238012020-01-29 11:04:40 -0800571 "utils/NdkUtils.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100572 "utils/StringUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400573 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100574 "DeferredLayerUpdater.cpp",
575 "DeviceInfo.cpp",
576 "FrameInfo.cpp",
577 "FrameInfoVisualizer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100578 "HardwareBitmapUploader.cpp",
579 "HWUIProperties.sysprop",
580 "JankTracker.cpp",
Pablo Gamito88660d72021-08-09 14:37:56 +0000581 "FrameMetricsReporter.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100582 "Layer.cpp",
583 "LayerUpdateQueue.cpp",
584 "ProfileData.cpp",
585 "ProfileDataContainer.cpp",
586 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100587 "TreeInfo.cpp",
588 "WebViewFunctorManager.cpp",
589 "protos/graphicsstats.proto",
590 ],
591
592 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
593 cflags: ["-Wno-implicit-fallthrough"],
594 },
595 host: {
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100596 srcs: [
597 "utils/HostColorSpace.cpp",
598 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100599 export_static_lib_headers: [
600 "libarect",
601 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700602 },
603 },
Colin Crossf6298102017-04-19 15:25:25 -0700604}
605
606cc_library {
607 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100608 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700609 defaults: [
610 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400611 "android_graphics_apex",
612 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700613 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700614 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400615 export_header_lib_headers: ["android_graphics_apex_headers"],
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400616 target: {
617 android: {
618 version_script: "libhwui.map.txt",
Tej Singh78f65b62021-03-18 16:19:55 -0700619 },
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400620 },
Yi Kong7c0a3ad2022-01-08 01:01:20 +0800621 afdo: true,
Colin Crossf6298102017-04-19 15:25:25 -0700622}
623
Colin Crossf6298102017-04-19 15:25:25 -0700624cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700625 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700626 defaults: [
627 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700628 ],
Colin Crossf6298102017-04-19 15:25:25 -0700629}
630
631cc_defaults {
632 name: "hwui_test_defaults",
633 defaults: ["hwui_defaults"],
634 test_suites: ["device-tests"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100635 header_libs: ["libandroid_headers_private"],
Alec Mouri680414e2020-01-28 09:22:33 -0800636 target: {
637 android: {
638 shared_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700639 "libgui",
640 "libui",
641 ],
642 },
Alec Mouri680414e2020-01-28 09:22:33 -0800643 },
Colin Crossf6298102017-04-19 15:25:25 -0700644 srcs: [
645 "tests/common/scenes/*.cpp",
646 "tests/common/LeakChecker.cpp",
647 "tests/common/TestListViewSceneBase.cpp",
648 "tests/common/TestContext.cpp",
649 "tests/common/TestScene.cpp",
650 "tests/common/TestUtils.cpp",
651 ],
652}
653
654// ------------------------
655// unit tests
656// ------------------------
657
658cc_test {
659 name: "hwui_unit_tests",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400660 defaults: [
661 "hwui_test_defaults",
662 "android_graphics_apex",
663 "android_graphics_jni",
664 ],
Colin Crossf6298102017-04-19 15:25:25 -0700665
666 static_libs: [
667 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700668 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700669 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800670 shared_libs: [
671 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800672 ],
Colin Crossf6298102017-04-19 15:25:25 -0700673 srcs: [
674 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400675 "tests/unit/ABitmapTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400676 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700677 "tests/unit/CanvasContextTests.cpp",
John Reck013127b2020-10-29 20:53:51 -0400678 "tests/unit/CanvasOpTests.cpp",
John Reckdc95f102020-11-16 12:35:02 -0500679 "tests/unit/CanvasFrontendTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700680 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700681 "tests/unit/DamageAccumulatorTests.cpp",
682 "tests/unit/DeferredLayerUpdaterTests.cpp",
John Reck064650b2021-01-19 21:29:24 -0500683 "tests/unit/EglManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700684 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700685 "tests/unit/GraphicsStatsServiceTests.cpp",
Jorim Jaggi10f328c2021-01-19 00:08:02 +0100686 "tests/unit/JankTrackerTests.cpp",
Pablo Gamitodfb85a22021-08-26 01:19:05 +0200687 "tests/unit/FrameMetricsReporterTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700688 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700689 "tests/unit/LinearAllocatorTests.cpp",
690 "tests/unit/MatrixTests.cpp",
John Reck95735052020-12-15 13:39:22 -0500691 "tests/unit/OpBufferTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700692 "tests/unit/PathInterpolatorTests.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700693 "tests/unit/RenderEffectCapabilityQueryTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700694 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700695 "tests/unit/RenderNodeTests.cpp",
696 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800697 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400698 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700699 "tests/unit/SkiaBehaviorTests.cpp",
700 "tests/unit/SkiaDisplayListTests.cpp",
701 "tests/unit/SkiaPipelineTests.cpp",
702 "tests/unit/SkiaRenderPropertiesTests.cpp",
703 "tests/unit/SkiaCanvasTests.cpp",
Nader Jawadc401b232021-05-21 12:52:05 -0700704 "tests/unit/StretchEffectTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700705 "tests/unit/StringUtilsTests.cpp",
706 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700707 "tests/unit/ThreadBaseTests.cpp",
708 "tests/unit/TypefaceTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700709 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800710 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700711 ],
712}
713
714// ------------------------
715// Macro-bench app
716// ------------------------
717
718cc_benchmark {
719 name: "hwuimacro",
720 defaults: ["hwui_test_defaults"],
721
John Reck23462d82019-05-29 16:55:06 -0700722 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800723 shared_libs: [
724 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800725 ],
Colin Crossf6298102017-04-19 15:25:25 -0700726
727 srcs: [
728 "tests/macrobench/TestSceneRunner.cpp",
729 "tests/macrobench/main.cpp",
730 ],
731}
732
733// ------------------------
734// Micro-bench app
735// ---------------------
736
737cc_benchmark {
738 name: "hwuimicro",
739 defaults: ["hwui_test_defaults"],
740
John Reck23462d82019-05-29 16:55:06 -0700741 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800742 shared_libs: [
743 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800744 ],
Colin Crossf6298102017-04-19 15:25:25 -0700745
746 srcs: [
747 "tests/microbench/main.cpp",
John Reckb5eeb182020-12-09 13:45:39 -0500748 "tests/microbench/CanvasOpBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700749 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700750 "tests/microbench/LinearAllocatorBench.cpp",
751 "tests/microbench/PathParserBench.cpp",
752 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700753 ],
754}