blob: 9c5641b309e9ba9424f500dd8a2817a0601fe789 [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: [
109 "liblog",
110 "libcutils",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100111 "libutils",
112 "libEGL",
113 "libGLESv1_CM",
114 "libGLESv2",
115 "libGLESv3",
116 "libvulkan",
Alec Mouri22d753f2019-09-05 17:11:45 -0700117 "libnativedisplay",
Derek Sollenbergere78f7c92019-07-31 15:18:47 -0400118 "libnativewindow",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100119 "libprotobuf-cpp-lite",
120 "libft2",
121 "libandroidfw",
122 "libcrypto",
123 "libsync",
124 ],
125 static_libs: [
126 "libEGL_blobCache",
Stan Ilievc9043812020-02-03 16:57:09 -0500127 "libprotoutil",
Tej Singh78f65b62021-03-18 16:19:55 -0700128 "libstatslog_hwui",
129 "libstatspull_lazy",
130 "libstatssocket_lazy",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100131 ],
132 },
133 host: {
134 static_libs: [
135 "libandroidfw",
136 "libutils",
137 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700138 },
139 },
Colin Crossf6298102017-04-19 15:25:25 -0700140}
141
142cc_defaults {
143 name: "hwui_bugreport_font_cache_usage",
Colin Crossf6298102017-04-19 15:25:25 -0700144 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
145}
146
147cc_defaults {
148 name: "hwui_compile_for_perf",
149 // TODO: Non-arm?
150 cflags: [
151 "-fno-omit-frame-pointer",
152 "-marm",
153 "-mapcs",
154 ],
155}
156
Zhizhou Yangf30f1122018-02-26 17:59:38 -0800157// Build hwui library with ThinLTO by default.
158cc_defaults {
159 name: "hwui_lto",
160 target: {
161 android: {
162 lto: {
163 thin: true,
164 },
165 },
166 },
167}
168
Colin Crossf6298102017-04-19 15:25:25 -0700169// ------------------------
Alec Mourief37c242020-03-02 21:38:09 +0000170// framework-graphics jar
171// ------------------------
172
Paul Duffin4e006622020-05-31 16:55:13 +0100173java_sdk_library {
Alec Mourief37c242020-03-02 21:38:09 +0000174 name: "framework-graphics",
Paul Duffin4e006622020-05-31 16:55:13 +0100175 defaults: ["framework-module-defaults"],
176 visibility: [
177 "//frameworks/base", // Framework
178 ],
Alec Mourief37c242020-03-02 21:38:09 +0000179
180 srcs: [
181 ":framework-graphics-srcs",
182 ],
183
184 permitted_packages: [
185 "android.graphics",
186 ],
187
Alec Mourief37c242020-03-02 21:38:09 +0000188 // TODO: once framework-graphics is officially part of the
189 // UI-rendering module this line would no longer be
190 // needed.
191 installable: true,
192
Paul Duffin4e006622020-05-31 16:55:13 +0100193 // Disable api_lint that the defaults enable
194 // TODO: enable this
195 api_lint: {
196 enabled: false,
197 },
Anton Hansson96b08ae2020-12-21 16:59:06 +0000198 // TODO: remove this
199 unsafe_ignore_missing_latest_api: true,
Alec Mourief37c242020-03-02 21:38:09 +0000200}
201
202filegroup {
203 name: "framework-graphics-srcs",
204 srcs: [
205 "apex/java/**/*.java",
206 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700207 path: "apex/java",
Alec Mourief37c242020-03-02 21:38:09 +0000208}
209
Alec Mourief37c242020-03-02 21:38:09 +0000210// ------------------------
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400211// APEX
212// ------------------------
213
214cc_library_headers {
215 name: "android_graphics_apex_headers",
216
217 host_supported: true,
218 export_include_dirs: [
219 "apex/include",
220 ],
221 target: {
222 windows: {
223 enabled: true,
224 },
Tej Singh78f65b62021-03-18 16:19:55 -0700225 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400226}
227
228cc_defaults {
229 name: "android_graphics_apex",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400230 cflags: [
231 "-Wno-unused-parameter",
232 "-Wno-non-virtual-dtor",
233 "-Wno-maybe-uninitialized",
234 "-Wno-parentheses",
235 "-Wall",
236 "-Werror",
237 "-Wno-error=deprecated-declarations",
238 "-Wunused",
239 "-Wunreachable-code",
240 ],
241
242 cppflags: ["-Wno-conversion-null"],
243
244 srcs: [
245 "apex/android_matrix.cpp",
246 "apex/android_paint.cpp",
247 "apex/android_region.cpp",
248 ],
249
Tej Singh78f65b62021-03-18 16:19:55 -0700250 header_libs: ["android_graphics_apex_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400251
252 target: {
253 android: {
254 srcs: [ // sources that depend on android only libraries
255 "apex/android_bitmap.cpp",
256 "apex/android_canvas.cpp",
257 "apex/jni_runtime.cpp",
258 "apex/renderthread.cpp",
259 ],
260 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400261 host: {
262 srcs: [
263 "apex/LayoutlibLoader.cpp",
264 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700265 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400266 },
267}
268
269// ------------------------
270// Android Graphics JNI
271// ------------------------
272
273cc_library_headers {
274 name: "android_graphics_jni_headers",
275
276 host_supported: true,
277 export_include_dirs: [
278 "jni",
279 ],
280 target: {
281 windows: {
282 enabled: true,
283 },
Tej Singh78f65b62021-03-18 16:19:55 -0700284 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400285}
286
287cc_defaults {
288 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400289 cflags: [
290 "-Wno-unused-parameter",
291 "-Wno-non-virtual-dtor",
292 "-Wno-maybe-uninitialized",
293 "-Wno-parentheses",
294
295 "-DGL_GLEXT_PROTOTYPES",
296 "-DEGL_EGLEXT_PROTOTYPES",
297
298 "-DU_USING_ICU_NAMESPACE=0",
299
300 "-Wall",
301 "-Werror",
302 "-Wno-error=deprecated-declarations",
303 "-Wunused",
304 "-Wunreachable-code",
305 ],
306
307 cppflags: ["-Wno-conversion-null"],
308
309 srcs: [
310 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
311 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
312 "jni/android_graphics_Canvas.cpp",
313 "jni/android_graphics_ColorSpace.cpp",
314 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
315 "jni/android_graphics_drawable_VectorDrawable.cpp",
316 "jni/android_graphics_HardwareRendererObserver.cpp",
317 "jni/android_graphics_Matrix.cpp",
318 "jni/android_graphics_Picture.cpp",
319 "jni/android_graphics_DisplayListCanvas.cpp",
320 "jni/android_graphics_RenderNode.cpp",
321 "jni/android_nio_utils.cpp",
322 "jni/android_util_PathParser.cpp",
323
324 "jni/Bitmap.cpp",
325 "jni/BitmapFactory.cpp",
326 "jni/ByteBufferStreamAdaptor.cpp",
327 "jni/Camera.cpp",
328 "jni/CanvasProperty.cpp",
329 "jni/ColorFilter.cpp",
330 "jni/CreateJavaOutputStreamAdaptor.cpp",
331 "jni/FontFamily.cpp",
332 "jni/FontUtils.cpp",
333 "jni/Graphics.cpp",
334 "jni/ImageDecoder.cpp",
335 "jni/Interpolator.cpp",
336 "jni/MaskFilter.cpp",
337 "jni/NinePatch.cpp",
338 "jni/NinePatchPeeker.cpp",
339 "jni/Paint.cpp",
340 "jni/PaintFilter.cpp",
341 "jni/Path.cpp",
342 "jni/PathEffect.cpp",
343 "jni/PathMeasure.cpp",
344 "jni/Picture.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400345 "jni/Shader.cpp",
Nader Jawad390d6e82020-09-24 21:35:03 -0700346 "jni/RenderEffect.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400347 "jni/Typeface.cpp",
348 "jni/Utils.cpp",
349 "jni/YuvToJpegEncoder.cpp",
350 "jni/fonts/Font.cpp",
351 "jni/fonts/FontFamily.cpp",
352 "jni/text/LineBreaker.cpp",
353 "jni/text/MeasuredText.cpp",
Seigo Nonakaf3a19152020-09-14 15:29:42 -0700354 "jni/text/TextShaper.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400355 ],
356
Tej Singh78f65b62021-03-18 16:19:55 -0700357 header_libs: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400358
359 include_dirs: [
360 "external/skia/include/private",
361 "external/skia/src/codec",
362 "external/skia/src/core",
363 "external/skia/src/effects",
364 "external/skia/src/image",
365 "external/skia/src/images",
366 ],
367
368 shared_libs: [
369 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400370 "libcutils",
371 "libharfbuzz_ng",
372 "liblog",
373 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400374 "libz",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400375 "libjpeg",
376 ],
377
Tej Singh78f65b62021-03-18 16:19:55 -0700378 static_libs: [
379 "libnativehelper_lazy",
380 "libziparchive_for_incfs",
381 ],
Orion Hodson33cbf8b2021-02-08 16:17:07 +0000382
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400383 target: {
384 android: {
385 srcs: [ // sources that depend on android only libraries
386 "jni/AnimatedImageDrawable.cpp",
387 "jni/android_graphics_TextureLayer.cpp",
388 "jni/android_graphics_HardwareRenderer.cpp",
389 "jni/BitmapRegionDecoder.cpp",
390 "jni/GIFMovie.cpp",
391 "jni/GraphicsStatsService.cpp",
392 "jni/Movie.cpp",
393 "jni/MovieImpl.cpp",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500394 "jni/Region.cpp", // requires libbinder_ndk
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400395 "jni/pdf/PdfDocument.cpp",
396 "jni/pdf/PdfEditor.cpp",
397 "jni/pdf/PdfRenderer.cpp",
398 "jni/pdf/PdfUtils.cpp",
399 ],
400 shared_libs: [
401 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500402 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500403 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400404 "libmediandk",
405 "libnativedisplay",
406 "libnativewindow",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400407 "libpdfium",
408 ],
409 static_libs: [
410 "libgif",
Tej Singh78f65b62021-03-18 16:19:55 -0700411 "libstatslog_hwui",
412 "libstatspull_lazy",
413 "libstatssocket_lazy",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400414 ],
415 },
416 host: {
417 cflags: [
418 "-Wno-unused-const-variable",
419 "-Wno-unused-function",
420 ],
421 static_libs: [
422 "libandroidfw",
423 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700424 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400425 },
426}
427
Tej Singh78f65b62021-03-18 16:19:55 -0700428cc_library_static {
429 name: "libstatslog_hwui",
430 generated_sources: ["statslog_hwui.cpp"],
431 generated_headers: ["statslog_hwui.h"],
432 export_generated_headers: ["statslog_hwui.h"],
433 static_libs: [
434 "libstatssocket_lazy",
435 "libstatspull_lazy",
436 ],
437}
438
439genrule {
440 name: "statslog_hwui.h",
441 tools: ["stats-log-api-gen"],
442 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
443 " --namespace android,uirenderer,stats",
444 out: [
445 "statslog_hwui.h",
446 ],
447}
448
449genrule {
450 name: "statslog_hwui.cpp",
451 tools: ["stats-log-api-gen"],
452 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
453 " --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
454 out: [
455 "statslog_hwui.cpp",
456 ],
457}
458
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400459// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700460// library
461// ------------------------
462
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400463cc_library_headers {
464 name: "libhwui_internal_headers",
465
466 host_supported: true,
467 export_include_dirs: [
468 ".",
469 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700470 header_libs: ["android_graphics_jni_headers"],
471 export_header_lib_headers: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400472}
473
Colin Crossf6298102017-04-19 15:25:25 -0700474cc_defaults {
475 name: "libhwui_defaults",
476 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400477
478 whole_static_libs: ["libskia"],
479
Colin Crossf6298102017-04-19 15:25:25 -0700480 srcs: [
John Reckdc95f102020-11-16 12:35:02 -0500481 "canvas/CanvasFrontend.cpp",
John Reck013127b2020-10-29 20:53:51 -0400482 "canvas/CanvasOpBuffer.cpp",
483 "canvas/CanvasOpRasterizer.cpp",
John Reck5cb290b2021-02-01 13:47:31 -0500484 "effects/StretchEffect.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700485 "pipeline/skia/HolePunch.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100486 "pipeline/skia/SkiaDisplayList.cpp",
487 "pipeline/skia/SkiaRecordingCanvas.cpp",
Nader Jawad197743f2021-04-19 19:45:13 -0700488 "pipeline/skia/StretchMask.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100489 "pipeline/skia/RenderNodeDrawable.cpp",
490 "pipeline/skia/ReorderBarrierDrawables.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700491 "pipeline/skia/TransformCanvas.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100492 "renderthread/Frame.cpp",
493 "renderthread/RenderTask.cpp",
494 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500495 "hwui/AnimatedImageDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700496 "hwui/Bitmap.cpp",
Mike Reed0f9dce72021-02-12 21:20:33 -0500497 "hwui/BlurDrawLooper.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700498 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500499 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700500 "hwui/MinikinSkia.cpp",
501 "hwui/MinikinUtils.cpp",
502 "hwui/PaintImpl.cpp",
503 "hwui/Typeface.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700504 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100505 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700506 "utils/LinearAllocator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700507 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100508 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700509 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100510 "AnimatorManager.cpp",
511 "CanvasTransform.cpp",
512 "DamageAccumulator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700513 "Interpolator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100514 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700515 "Matrix.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700516 "PathParser.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700517 "Properties.cpp",
518 "PropertyValuesAnimatorSet.cpp",
519 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100520 "RecordingCanvas.cpp",
521 "RenderNode.cpp",
522 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100523 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700524 "SkiaCanvas.cpp",
Mike Reed74065272021-04-12 09:52:07 -0400525 "SkiaInterpolator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700526 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700527 ],
528
Kweku Adams228b6d22018-04-12 13:09:04 -0700529 proto: {
530 export_proto_headers: true,
531 },
532
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100533 target: {
534 android: {
Tej Singh78f65b62021-03-18 16:19:55 -0700535 header_libs: ["libandroid_headers_private"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100536
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100537 srcs: [
Jerome Gaillardf9a4dc42020-01-29 15:23:26 +0000538 "hwui/AnimatedImageThread.cpp",
Stan Ilieve0fae232020-01-07 17:21:49 -0500539 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100540 "pipeline/skia/GLFunctorDrawable.cpp",
541 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100542 "pipeline/skia/ShaderCache.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100543 "pipeline/skia/SkiaMemoryTracer.cpp",
544 "pipeline/skia/SkiaOpenGLPipeline.cpp",
545 "pipeline/skia/SkiaPipeline.cpp",
546 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100547 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100548 "pipeline/skia/VkFunctorDrawable.cpp",
549 "pipeline/skia/VkInteropFunctorDrawable.cpp",
550 "renderstate/RenderState.cpp",
551 "renderthread/CacheManager.cpp",
552 "renderthread/CanvasContext.cpp",
553 "renderthread/DrawFrameTask.cpp",
554 "renderthread/EglManager.cpp",
555 "renderthread/ReliableSurface.cpp",
556 "renderthread/VulkanManager.cpp",
557 "renderthread/VulkanSurface.cpp",
558 "renderthread/RenderProxy.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100559 "renderthread/RenderThread.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100560 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100561 "thread/CommonPool.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100562 "utils/GLUtils.cpp",
Alec Mouri45238012020-01-29 11:04:40 -0800563 "utils/NdkUtils.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100564 "utils/StringUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400565 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100566 "DeferredLayerUpdater.cpp",
567 "DeviceInfo.cpp",
568 "FrameInfo.cpp",
569 "FrameInfoVisualizer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100570 "HardwareBitmapUploader.cpp",
571 "HWUIProperties.sysprop",
572 "JankTracker.cpp",
573 "Layer.cpp",
574 "LayerUpdateQueue.cpp",
575 "ProfileData.cpp",
576 "ProfileDataContainer.cpp",
577 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100578 "TreeInfo.cpp",
579 "WebViewFunctorManager.cpp",
580 "protos/graphicsstats.proto",
581 ],
582
583 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
584 cflags: ["-Wno-implicit-fallthrough"],
585 },
586 host: {
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100587 srcs: [
588 "utils/HostColorSpace.cpp",
589 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100590 export_static_lib_headers: [
591 "libarect",
592 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700593 },
594 },
Colin Crossf6298102017-04-19 15:25:25 -0700595}
596
597cc_library {
598 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100599 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700600 defaults: [
601 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400602 "android_graphics_apex",
603 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700604 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700605 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400606 export_header_lib_headers: ["android_graphics_apex_headers"],
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400607 target: {
608 android: {
609 version_script: "libhwui.map.txt",
Tej Singh78f65b62021-03-18 16:19:55 -0700610 },
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400611 },
Yi Kong7c0a3ad2022-01-08 01:01:20 +0800612 afdo: true,
Colin Crossf6298102017-04-19 15:25:25 -0700613}
614
Colin Crossf6298102017-04-19 15:25:25 -0700615cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700616 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700617 defaults: [
618 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700619 ],
Colin Crossf6298102017-04-19 15:25:25 -0700620}
621
622cc_defaults {
623 name: "hwui_test_defaults",
624 defaults: ["hwui_defaults"],
625 test_suites: ["device-tests"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100626 header_libs: ["libandroid_headers_private"],
Alec Mouri680414e2020-01-28 09:22:33 -0800627 target: {
628 android: {
629 shared_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700630 "libgui",
631 "libui",
632 ],
633 },
Alec Mouri680414e2020-01-28 09:22:33 -0800634 },
Colin Crossf6298102017-04-19 15:25:25 -0700635 srcs: [
636 "tests/common/scenes/*.cpp",
637 "tests/common/LeakChecker.cpp",
638 "tests/common/TestListViewSceneBase.cpp",
639 "tests/common/TestContext.cpp",
640 "tests/common/TestScene.cpp",
641 "tests/common/TestUtils.cpp",
642 ],
643}
644
645// ------------------------
646// unit tests
647// ------------------------
648
649cc_test {
650 name: "hwui_unit_tests",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400651 defaults: [
652 "hwui_test_defaults",
653 "android_graphics_apex",
654 "android_graphics_jni",
655 ],
Colin Crossf6298102017-04-19 15:25:25 -0700656
657 static_libs: [
658 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700659 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700660 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800661 shared_libs: [
662 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800663 ],
Colin Crossf6298102017-04-19 15:25:25 -0700664 srcs: [
665 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400666 "tests/unit/ABitmapTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400667 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700668 "tests/unit/CanvasContextTests.cpp",
John Reck013127b2020-10-29 20:53:51 -0400669 "tests/unit/CanvasOpTests.cpp",
John Reckdc95f102020-11-16 12:35:02 -0500670 "tests/unit/CanvasFrontendTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700671 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700672 "tests/unit/DamageAccumulatorTests.cpp",
673 "tests/unit/DeferredLayerUpdaterTests.cpp",
John Reck064650b2021-01-19 21:29:24 -0500674 "tests/unit/EglManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700675 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700676 "tests/unit/GraphicsStatsServiceTests.cpp",
Jorim Jaggi10f328c2021-01-19 00:08:02 +0100677 "tests/unit/JankTrackerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700678 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700679 "tests/unit/LinearAllocatorTests.cpp",
680 "tests/unit/MatrixTests.cpp",
John Reck95735052020-12-15 13:39:22 -0500681 "tests/unit/OpBufferTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700682 "tests/unit/PathInterpolatorTests.cpp",
683 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700684 "tests/unit/RenderNodeTests.cpp",
685 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800686 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400687 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700688 "tests/unit/SkiaBehaviorTests.cpp",
689 "tests/unit/SkiaDisplayListTests.cpp",
690 "tests/unit/SkiaPipelineTests.cpp",
691 "tests/unit/SkiaRenderPropertiesTests.cpp",
692 "tests/unit/SkiaCanvasTests.cpp",
Nader Jawadc401b232021-05-21 12:52:05 -0700693 "tests/unit/StretchEffectTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700694 "tests/unit/StringUtilsTests.cpp",
695 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700696 "tests/unit/ThreadBaseTests.cpp",
697 "tests/unit/TypefaceTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700698 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800699 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700700 ],
701}
702
703// ------------------------
704// Macro-bench app
705// ------------------------
706
707cc_benchmark {
708 name: "hwuimacro",
709 defaults: ["hwui_test_defaults"],
710
John Reck23462d82019-05-29 16:55:06 -0700711 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800712 shared_libs: [
713 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800714 ],
Colin Crossf6298102017-04-19 15:25:25 -0700715
716 srcs: [
717 "tests/macrobench/TestSceneRunner.cpp",
718 "tests/macrobench/main.cpp",
719 ],
720}
721
722// ------------------------
723// Micro-bench app
724// ---------------------
725
726cc_benchmark {
727 name: "hwuimicro",
728 defaults: ["hwui_test_defaults"],
729
John Reck23462d82019-05-29 16:55:06 -0700730 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800731 shared_libs: [
732 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800733 ],
Colin Crossf6298102017-04-19 15:25:25 -0700734
735 srcs: [
736 "tests/microbench/main.cpp",
John Reckb5eeb182020-12-09 13:45:39 -0500737 "tests/microbench/CanvasOpBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700738 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700739 "tests/microbench/LinearAllocatorBench.cpp",
740 "tests/microbench/PathParserBench.cpp",
741 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700742 ],
743}