blob: ece150a4bd45f178044e638fca76ff871131904a [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",
252 ],
253
Tej Singh78f65b62021-03-18 16:19:55 -0700254 header_libs: ["android_graphics_apex_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400255
256 target: {
257 android: {
258 srcs: [ // sources that depend on android only libraries
259 "apex/android_bitmap.cpp",
260 "apex/android_canvas.cpp",
261 "apex/jni_runtime.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400262 ],
263 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400264 host: {
265 srcs: [
266 "apex/LayoutlibLoader.cpp",
267 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700268 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400269 },
270}
271
272// ------------------------
273// Android Graphics JNI
274// ------------------------
275
276cc_library_headers {
277 name: "android_graphics_jni_headers",
278
279 host_supported: true,
280 export_include_dirs: [
281 "jni",
282 ],
283 target: {
284 windows: {
285 enabled: true,
286 },
Tej Singh78f65b62021-03-18 16:19:55 -0700287 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400288}
289
290cc_defaults {
291 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400292 cflags: [
293 "-Wno-unused-parameter",
294 "-Wno-non-virtual-dtor",
295 "-Wno-maybe-uninitialized",
296 "-Wno-parentheses",
297
298 "-DGL_GLEXT_PROTOTYPES",
299 "-DEGL_EGLEXT_PROTOTYPES",
300
301 "-DU_USING_ICU_NAMESPACE=0",
302
303 "-Wall",
304 "-Werror",
305 "-Wno-error=deprecated-declarations",
306 "-Wunused",
307 "-Wunreachable-code",
308 ],
309
310 cppflags: ["-Wno-conversion-null"],
311
312 srcs: [
313 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
314 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
315 "jni/android_graphics_Canvas.cpp",
316 "jni/android_graphics_ColorSpace.cpp",
317 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
318 "jni/android_graphics_drawable_VectorDrawable.cpp",
319 "jni/android_graphics_HardwareRendererObserver.cpp",
320 "jni/android_graphics_Matrix.cpp",
321 "jni/android_graphics_Picture.cpp",
322 "jni/android_graphics_DisplayListCanvas.cpp",
323 "jni/android_graphics_RenderNode.cpp",
324 "jni/android_nio_utils.cpp",
325 "jni/android_util_PathParser.cpp",
326
327 "jni/Bitmap.cpp",
328 "jni/BitmapFactory.cpp",
329 "jni/ByteBufferStreamAdaptor.cpp",
330 "jni/Camera.cpp",
331 "jni/CanvasProperty.cpp",
332 "jni/ColorFilter.cpp",
333 "jni/CreateJavaOutputStreamAdaptor.cpp",
334 "jni/FontFamily.cpp",
335 "jni/FontUtils.cpp",
336 "jni/Graphics.cpp",
337 "jni/ImageDecoder.cpp",
338 "jni/Interpolator.cpp",
339 "jni/MaskFilter.cpp",
340 "jni/NinePatch.cpp",
341 "jni/NinePatchPeeker.cpp",
342 "jni/Paint.cpp",
343 "jni/PaintFilter.cpp",
344 "jni/Path.cpp",
345 "jni/PathEffect.cpp",
346 "jni/PathMeasure.cpp",
347 "jni/Picture.cpp",
Jerome Gaillard9ce48282021-12-02 17:11:28 +0000348 "jni/Region.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400349 "jni/Shader.cpp",
Nader Jawad390d6e82020-09-24 21:35:03 -0700350 "jni/RenderEffect.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400351 "jni/Typeface.cpp",
352 "jni/Utils.cpp",
353 "jni/YuvToJpegEncoder.cpp",
354 "jni/fonts/Font.cpp",
355 "jni/fonts/FontFamily.cpp",
356 "jni/text/LineBreaker.cpp",
357 "jni/text/MeasuredText.cpp",
Seigo Nonakaf3a19152020-09-14 15:29:42 -0700358 "jni/text/TextShaper.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400359 ],
360
Tej Singh78f65b62021-03-18 16:19:55 -0700361 header_libs: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400362
363 include_dirs: [
364 "external/skia/include/private",
365 "external/skia/src/codec",
366 "external/skia/src/core",
367 "external/skia/src/effects",
368 "external/skia/src/image",
369 "external/skia/src/images",
370 ],
371
372 shared_libs: [
373 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400374 "libcutils",
375 "libharfbuzz_ng",
376 "liblog",
377 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400378 "libz",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400379 "libjpeg",
380 ],
381
Tej Singh78f65b62021-03-18 16:19:55 -0700382 static_libs: [
383 "libnativehelper_lazy",
384 "libziparchive_for_incfs",
385 ],
Orion Hodson33cbf8b2021-02-08 16:17:07 +0000386
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400387 target: {
388 android: {
389 srcs: [ // sources that depend on android only libraries
390 "jni/AnimatedImageDrawable.cpp",
391 "jni/android_graphics_TextureLayer.cpp",
392 "jni/android_graphics_HardwareRenderer.cpp",
393 "jni/BitmapRegionDecoder.cpp",
394 "jni/GIFMovie.cpp",
395 "jni/GraphicsStatsService.cpp",
396 "jni/Movie.cpp",
397 "jni/MovieImpl.cpp",
398 "jni/pdf/PdfDocument.cpp",
399 "jni/pdf/PdfEditor.cpp",
400 "jni/pdf/PdfRenderer.cpp",
401 "jni/pdf/PdfUtils.cpp",
402 ],
403 shared_libs: [
404 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500405 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500406 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400407 "libmediandk",
408 "libnativedisplay",
409 "libnativewindow",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400410 "libpdfium",
411 ],
412 static_libs: [
413 "libgif",
Tej Singh78f65b62021-03-18 16:19:55 -0700414 "libstatslog_hwui",
415 "libstatspull_lazy",
416 "libstatssocket_lazy",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400417 ],
418 },
419 host: {
420 cflags: [
421 "-Wno-unused-const-variable",
422 "-Wno-unused-function",
423 ],
424 static_libs: [
425 "libandroidfw",
426 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700427 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400428 },
429}
430
Tej Singh78f65b62021-03-18 16:19:55 -0700431cc_library_static {
432 name: "libstatslog_hwui",
433 generated_sources: ["statslog_hwui.cpp"],
434 generated_headers: ["statslog_hwui.h"],
435 export_generated_headers: ["statslog_hwui.h"],
436 static_libs: [
437 "libstatssocket_lazy",
438 "libstatspull_lazy",
439 ],
440}
441
442genrule {
443 name: "statslog_hwui.h",
444 tools: ["stats-log-api-gen"],
445 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
446 " --namespace android,uirenderer,stats",
447 out: [
448 "statslog_hwui.h",
449 ],
450}
451
452genrule {
453 name: "statslog_hwui.cpp",
454 tools: ["stats-log-api-gen"],
455 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
456 " --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
457 out: [
458 "statslog_hwui.cpp",
459 ],
460}
461
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400462// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700463// library
464// ------------------------
465
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400466cc_library_headers {
467 name: "libhwui_internal_headers",
468
469 host_supported: true,
470 export_include_dirs: [
471 ".",
472 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700473 header_libs: ["android_graphics_jni_headers"],
474 export_header_lib_headers: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400475}
476
Colin Crossf6298102017-04-19 15:25:25 -0700477cc_defaults {
478 name: "libhwui_defaults",
479 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400480
481 whole_static_libs: ["libskia"],
482
Colin Crossf6298102017-04-19 15:25:25 -0700483 srcs: [
John Reckdc95f102020-11-16 12:35:02 -0500484 "canvas/CanvasFrontend.cpp",
John Reck013127b2020-10-29 20:53:51 -0400485 "canvas/CanvasOpBuffer.cpp",
486 "canvas/CanvasOpRasterizer.cpp",
John Reck5cb290b2021-02-01 13:47:31 -0500487 "effects/StretchEffect.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700488 "pipeline/skia/HolePunch.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100489 "pipeline/skia/SkiaDisplayList.cpp",
490 "pipeline/skia/SkiaRecordingCanvas.cpp",
Nader Jawad197743f2021-04-19 19:45:13 -0700491 "pipeline/skia/StretchMask.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100492 "pipeline/skia/RenderNodeDrawable.cpp",
493 "pipeline/skia/ReorderBarrierDrawables.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700494 "pipeline/skia/TransformCanvas.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100495 "renderthread/Frame.cpp",
496 "renderthread/RenderTask.cpp",
497 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500498 "hwui/AnimatedImageDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700499 "hwui/Bitmap.cpp",
Mike Reed0f9dce72021-02-12 21:20:33 -0500500 "hwui/BlurDrawLooper.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700501 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500502 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700503 "hwui/MinikinSkia.cpp",
504 "hwui/MinikinUtils.cpp",
505 "hwui/PaintImpl.cpp",
506 "hwui/Typeface.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700507 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100508 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700509 "utils/LinearAllocator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700510 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100511 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700512 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100513 "AnimatorManager.cpp",
514 "CanvasTransform.cpp",
515 "DamageAccumulator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700516 "Interpolator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100517 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700518 "Matrix.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700519 "PathParser.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700520 "Properties.cpp",
521 "PropertyValuesAnimatorSet.cpp",
522 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100523 "RecordingCanvas.cpp",
524 "RenderNode.cpp",
525 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100526 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700527 "SkiaCanvas.cpp",
Mike Reed74065272021-04-12 09:52:07 -0400528 "SkiaInterpolator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700529 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700530 ],
531
Kweku Adams228b6d22018-04-12 13:09:04 -0700532 proto: {
533 export_proto_headers: true,
534 },
535
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100536 target: {
537 android: {
Long Ling9e6c9fb2022-02-02 14:32:09 -0800538 header_libs: [
539 "libandroid_headers_private",
540 "libtonemap_headers",
541 ],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100542
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100543 srcs: [
Jerome Gaillardf9a4dc42020-01-29 15:23:26 +0000544 "hwui/AnimatedImageThread.cpp",
Stan Ilieve0fae232020-01-07 17:21:49 -0500545 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100546 "pipeline/skia/GLFunctorDrawable.cpp",
547 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100548 "pipeline/skia/ShaderCache.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100549 "pipeline/skia/SkiaMemoryTracer.cpp",
550 "pipeline/skia/SkiaOpenGLPipeline.cpp",
551 "pipeline/skia/SkiaPipeline.cpp",
552 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100553 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100554 "pipeline/skia/VkFunctorDrawable.cpp",
555 "pipeline/skia/VkInteropFunctorDrawable.cpp",
556 "renderstate/RenderState.cpp",
557 "renderthread/CacheManager.cpp",
558 "renderthread/CanvasContext.cpp",
559 "renderthread/DrawFrameTask.cpp",
560 "renderthread/EglManager.cpp",
561 "renderthread/ReliableSurface.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700562 "renderthread/RenderEffectCapabilityQuery.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100563 "renderthread/VulkanManager.cpp",
564 "renderthread/VulkanSurface.cpp",
565 "renderthread/RenderProxy.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100566 "renderthread/RenderThread.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100567 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100568 "thread/CommonPool.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100569 "utils/GLUtils.cpp",
Alec Mouri45238012020-01-29 11:04:40 -0800570 "utils/NdkUtils.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100571 "utils/StringUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400572 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100573 "DeferredLayerUpdater.cpp",
574 "DeviceInfo.cpp",
575 "FrameInfo.cpp",
576 "FrameInfoVisualizer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100577 "HardwareBitmapUploader.cpp",
578 "HWUIProperties.sysprop",
579 "JankTracker.cpp",
Pablo Gamito88660d72021-08-09 14:37:56 +0000580 "FrameMetricsReporter.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100581 "Layer.cpp",
582 "LayerUpdateQueue.cpp",
583 "ProfileData.cpp",
584 "ProfileDataContainer.cpp",
585 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100586 "TreeInfo.cpp",
587 "WebViewFunctorManager.cpp",
588 "protos/graphicsstats.proto",
589 ],
590
591 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
592 cflags: ["-Wno-implicit-fallthrough"],
593 },
594 host: {
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100595 srcs: [
596 "utils/HostColorSpace.cpp",
597 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100598 export_static_lib_headers: [
599 "libarect",
600 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700601 },
602 },
Colin Crossf6298102017-04-19 15:25:25 -0700603}
604
605cc_library {
606 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100607 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700608 defaults: [
609 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400610 "android_graphics_apex",
611 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700612 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700613 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400614 export_header_lib_headers: ["android_graphics_apex_headers"],
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400615 target: {
616 android: {
617 version_script: "libhwui.map.txt",
Tej Singh78f65b62021-03-18 16:19:55 -0700618 },
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400619 },
Yi Kong7c0a3ad2022-01-08 01:01:20 +0800620 afdo: true,
Colin Crossf6298102017-04-19 15:25:25 -0700621}
622
Colin Crossf6298102017-04-19 15:25:25 -0700623cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700624 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700625 defaults: [
626 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700627 ],
Colin Crossf6298102017-04-19 15:25:25 -0700628}
629
630cc_defaults {
631 name: "hwui_test_defaults",
632 defaults: ["hwui_defaults"],
633 test_suites: ["device-tests"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100634 header_libs: ["libandroid_headers_private"],
Alec Mouri680414e2020-01-28 09:22:33 -0800635 target: {
636 android: {
637 shared_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700638 "libgui",
639 "libui",
640 ],
641 },
Alec Mouri680414e2020-01-28 09:22:33 -0800642 },
Colin Crossf6298102017-04-19 15:25:25 -0700643 srcs: [
644 "tests/common/scenes/*.cpp",
645 "tests/common/LeakChecker.cpp",
646 "tests/common/TestListViewSceneBase.cpp",
647 "tests/common/TestContext.cpp",
648 "tests/common/TestScene.cpp",
649 "tests/common/TestUtils.cpp",
650 ],
651}
652
653// ------------------------
654// unit tests
655// ------------------------
656
657cc_test {
658 name: "hwui_unit_tests",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400659 defaults: [
660 "hwui_test_defaults",
661 "android_graphics_apex",
662 "android_graphics_jni",
663 ],
Colin Crossf6298102017-04-19 15:25:25 -0700664
665 static_libs: [
666 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700667 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700668 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800669 shared_libs: [
670 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800671 ],
Colin Crossf6298102017-04-19 15:25:25 -0700672 srcs: [
673 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400674 "tests/unit/ABitmapTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400675 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700676 "tests/unit/CanvasContextTests.cpp",
John Reck013127b2020-10-29 20:53:51 -0400677 "tests/unit/CanvasOpTests.cpp",
John Reckdc95f102020-11-16 12:35:02 -0500678 "tests/unit/CanvasFrontendTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700679 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700680 "tests/unit/DamageAccumulatorTests.cpp",
681 "tests/unit/DeferredLayerUpdaterTests.cpp",
John Reck064650b2021-01-19 21:29:24 -0500682 "tests/unit/EglManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700683 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700684 "tests/unit/GraphicsStatsServiceTests.cpp",
Jorim Jaggi10f328c2021-01-19 00:08:02 +0100685 "tests/unit/JankTrackerTests.cpp",
Pablo Gamitodfb85a22021-08-26 01:19:05 +0200686 "tests/unit/FrameMetricsReporterTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700687 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700688 "tests/unit/LinearAllocatorTests.cpp",
689 "tests/unit/MatrixTests.cpp",
John Reck95735052020-12-15 13:39:22 -0500690 "tests/unit/OpBufferTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700691 "tests/unit/PathInterpolatorTests.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700692 "tests/unit/RenderEffectCapabilityQueryTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700693 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700694 "tests/unit/RenderNodeTests.cpp",
695 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800696 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400697 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700698 "tests/unit/SkiaBehaviorTests.cpp",
699 "tests/unit/SkiaDisplayListTests.cpp",
700 "tests/unit/SkiaPipelineTests.cpp",
701 "tests/unit/SkiaRenderPropertiesTests.cpp",
702 "tests/unit/SkiaCanvasTests.cpp",
Nader Jawadc401b232021-05-21 12:52:05 -0700703 "tests/unit/StretchEffectTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700704 "tests/unit/StringUtilsTests.cpp",
705 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700706 "tests/unit/ThreadBaseTests.cpp",
707 "tests/unit/TypefaceTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700708 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800709 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700710 ],
711}
712
713// ------------------------
714// Macro-bench app
715// ------------------------
716
717cc_benchmark {
718 name: "hwuimacro",
719 defaults: ["hwui_test_defaults"],
720
John Reck23462d82019-05-29 16:55:06 -0700721 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800722 shared_libs: [
723 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800724 ],
Colin Crossf6298102017-04-19 15:25:25 -0700725
726 srcs: [
727 "tests/macrobench/TestSceneRunner.cpp",
728 "tests/macrobench/main.cpp",
729 ],
730}
731
732// ------------------------
733// Micro-bench app
734// ---------------------
735
736cc_benchmark {
737 name: "hwuimicro",
738 defaults: ["hwui_test_defaults"],
739
John Reck23462d82019-05-29 16:55:06 -0700740 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800741 shared_libs: [
742 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800743 ],
Colin Crossf6298102017-04-19 15:25:25 -0700744
745 srcs: [
746 "tests/microbench/main.cpp",
John Reckb5eeb182020-12-09 13:45:39 -0500747 "tests/microbench/CanvasOpBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700748 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700749 "tests/microbench/LinearAllocatorBench.cpp",
750 "tests/microbench/PathParserBench.cpp",
751 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700752 ],
753}