blob: c0220879094a759778b0f35c3d1030f87a2fe7d8 [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",
Marc Kassis8c1f7e92022-11-08 16:18:49 +010096 defaults: [
97 "android.hardware.graphics.common-ndk_shared",
98 ],
Colin Crossf6298102017-04-19 15:25:25 -070099 shared_libs: [
Jerome Gaillarda02a12d2019-05-28 18:07:56 +0100100 "libbase",
Colin Crossf6298102017-04-19 15:25:25 -0700101 "libharfbuzz_ng",
Colin Crossf6298102017-04-19 15:25:25 -0700102 "libminikin",
Colin Crossf6298102017-04-19 15:25:25 -0700103 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100104
Alec Mouri45238012020-01-29 11:04:40 -0800105 static_libs: [
106 "libui-types",
107 ],
108
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100109 target: {
110 android: {
111 shared_libs: [
Alec Mourid0001fe2021-11-22 10:09:22 -0800112 "android.hardware.graphics.common@1.2",
Alec Mouria7bd3b92022-04-14 23:24:28 +0000113 "android.hardware.graphics.composer3-V1-ndk",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100114 "liblog",
115 "libcutils",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100116 "libutils",
117 "libEGL",
118 "libGLESv1_CM",
119 "libGLESv2",
120 "libGLESv3",
121 "libvulkan",
Alec Mouri22d753f2019-09-05 17:11:45 -0700122 "libnativedisplay",
Derek Sollenbergere78f7c92019-07-31 15:18:47 -0400123 "libnativewindow",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100124 "libprotobuf-cpp-lite",
125 "libft2",
126 "libandroidfw",
127 "libcrypto",
128 "libsync",
129 ],
130 static_libs: [
131 "libEGL_blobCache",
Stan Ilievc9043812020-02-03 16:57:09 -0500132 "libprotoutil",
Alec Mourid0001fe2021-11-22 10:09:22 -0800133 "libshaders",
Tej Singh78f65b62021-03-18 16:19:55 -0700134 "libstatslog_hwui",
135 "libstatspull_lazy",
136 "libstatssocket_lazy",
Alec Mourid0001fe2021-11-22 10:09:22 -0800137 "libtonemap",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100138 ],
139 },
140 host: {
141 static_libs: [
142 "libandroidfw",
143 "libutils",
144 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700145 },
146 },
Colin Crossf6298102017-04-19 15:25:25 -0700147}
148
149cc_defaults {
150 name: "hwui_bugreport_font_cache_usage",
Colin Crossf6298102017-04-19 15:25:25 -0700151 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
152}
153
154cc_defaults {
155 name: "hwui_compile_for_perf",
156 // TODO: Non-arm?
157 cflags: [
158 "-fno-omit-frame-pointer",
159 "-marm",
160 "-mapcs",
161 ],
162}
163
Zhizhou Yangf30f1122018-02-26 17:59:38 -0800164// Build hwui library with ThinLTO by default.
165cc_defaults {
166 name: "hwui_lto",
167 target: {
168 android: {
169 lto: {
170 thin: true,
171 },
172 },
173 },
174}
175
Colin Crossf6298102017-04-19 15:25:25 -0700176// ------------------------
Alec Mourief37c242020-03-02 21:38:09 +0000177// framework-graphics jar
178// ------------------------
179
Paul Duffin4e006622020-05-31 16:55:13 +0100180java_sdk_library {
Alec Mourief37c242020-03-02 21:38:09 +0000181 name: "framework-graphics",
Paul Duffin4e006622020-05-31 16:55:13 +0100182 defaults: ["framework-module-defaults"],
183 visibility: [
184 "//frameworks/base", // Framework
185 ],
Alec Mourief37c242020-03-02 21:38:09 +0000186
187 srcs: [
188 ":framework-graphics-srcs",
189 ],
190
191 permitted_packages: [
192 "android.graphics",
193 ],
194
Alec Mourief37c242020-03-02 21:38:09 +0000195 // TODO: once framework-graphics is officially part of the
196 // UI-rendering module this line would no longer be
197 // needed.
198 installable: true,
199
Paul Duffin4e006622020-05-31 16:55:13 +0100200 // Disable api_lint that the defaults enable
201 // TODO: enable this
202 api_lint: {
203 enabled: false,
204 },
Anton Hansson96b08ae2020-12-21 16:59:06 +0000205 // TODO: remove this
206 unsafe_ignore_missing_latest_api: true,
Alec Mourief37c242020-03-02 21:38:09 +0000207}
208
209filegroup {
210 name: "framework-graphics-srcs",
211 srcs: [
212 "apex/java/**/*.java",
213 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700214 path: "apex/java",
Alec Mourief37c242020-03-02 21:38:09 +0000215}
216
Alec Mourief37c242020-03-02 21:38:09 +0000217// ------------------------
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400218// APEX
219// ------------------------
220
221cc_library_headers {
222 name: "android_graphics_apex_headers",
223
224 host_supported: true,
225 export_include_dirs: [
226 "apex/include",
227 ],
228 target: {
229 windows: {
230 enabled: true,
231 },
Tej Singh78f65b62021-03-18 16:19:55 -0700232 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400233}
234
235cc_defaults {
236 name: "android_graphics_apex",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400237 cflags: [
238 "-Wno-unused-parameter",
239 "-Wno-non-virtual-dtor",
240 "-Wno-maybe-uninitialized",
241 "-Wno-parentheses",
242 "-Wall",
243 "-Werror",
244 "-Wno-error=deprecated-declarations",
245 "-Wunused",
246 "-Wunreachable-code",
247 ],
248
249 cppflags: ["-Wno-conversion-null"],
250
251 srcs: [
252 "apex/android_matrix.cpp",
253 "apex/android_paint.cpp",
254 "apex/android_region.cpp",
Leon Scroggins IIIcd9e7b42022-04-08 15:27:57 -0400255 "apex/properties.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400256 ],
257
Tej Singh78f65b62021-03-18 16:19:55 -0700258 header_libs: ["android_graphics_apex_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400259
260 target: {
261 android: {
262 srcs: [ // sources that depend on android only libraries
263 "apex/android_bitmap.cpp",
264 "apex/android_canvas.cpp",
265 "apex/jni_runtime.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400266 ],
267 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400268 host: {
269 srcs: [
270 "apex/LayoutlibLoader.cpp",
271 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700272 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400273 },
274}
275
276// ------------------------
277// Android Graphics JNI
278// ------------------------
279
280cc_library_headers {
281 name: "android_graphics_jni_headers",
282
283 host_supported: true,
284 export_include_dirs: [
285 "jni",
286 ],
287 target: {
288 windows: {
289 enabled: true,
290 },
Tej Singh78f65b62021-03-18 16:19:55 -0700291 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400292}
293
294cc_defaults {
295 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400296 cflags: [
297 "-Wno-unused-parameter",
298 "-Wno-non-virtual-dtor",
299 "-Wno-maybe-uninitialized",
300 "-Wno-parentheses",
301
302 "-DGL_GLEXT_PROTOTYPES",
303 "-DEGL_EGLEXT_PROTOTYPES",
304
305 "-DU_USING_ICU_NAMESPACE=0",
306
307 "-Wall",
308 "-Werror",
309 "-Wno-error=deprecated-declarations",
310 "-Wunused",
311 "-Wunreachable-code",
312 ],
313
314 cppflags: ["-Wno-conversion-null"],
315
316 srcs: [
317 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
318 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
319 "jni/android_graphics_Canvas.cpp",
320 "jni/android_graphics_ColorSpace.cpp",
321 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
322 "jni/android_graphics_drawable_VectorDrawable.cpp",
323 "jni/android_graphics_HardwareRendererObserver.cpp",
324 "jni/android_graphics_Matrix.cpp",
325 "jni/android_graphics_Picture.cpp",
326 "jni/android_graphics_DisplayListCanvas.cpp",
327 "jni/android_graphics_RenderNode.cpp",
328 "jni/android_nio_utils.cpp",
329 "jni/android_util_PathParser.cpp",
330
331 "jni/Bitmap.cpp",
332 "jni/BitmapFactory.cpp",
333 "jni/ByteBufferStreamAdaptor.cpp",
334 "jni/Camera.cpp",
335 "jni/CanvasProperty.cpp",
336 "jni/ColorFilter.cpp",
337 "jni/CreateJavaOutputStreamAdaptor.cpp",
338 "jni/FontFamily.cpp",
339 "jni/FontUtils.cpp",
340 "jni/Graphics.cpp",
341 "jni/ImageDecoder.cpp",
342 "jni/Interpolator.cpp",
343 "jni/MaskFilter.cpp",
344 "jni/NinePatch.cpp",
345 "jni/NinePatchPeeker.cpp",
346 "jni/Paint.cpp",
347 "jni/PaintFilter.cpp",
348 "jni/Path.cpp",
349 "jni/PathEffect.cpp",
350 "jni/PathMeasure.cpp",
351 "jni/Picture.cpp",
Jerome Gaillard9ce48282021-12-02 17:11:28 +0000352 "jni/Region.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400353 "jni/Shader.cpp",
Nader Jawad390d6e82020-09-24 21:35:03 -0700354 "jni/RenderEffect.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400355 "jni/Typeface.cpp",
356 "jni/Utils.cpp",
357 "jni/YuvToJpegEncoder.cpp",
358 "jni/fonts/Font.cpp",
359 "jni/fonts/FontFamily.cpp",
360 "jni/text/LineBreaker.cpp",
361 "jni/text/MeasuredText.cpp",
Seigo Nonakaf3a19152020-09-14 15:29:42 -0700362 "jni/text/TextShaper.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400363 ],
364
Tej Singh78f65b62021-03-18 16:19:55 -0700365 header_libs: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400366
367 include_dirs: [
368 "external/skia/include/private",
369 "external/skia/src/codec",
370 "external/skia/src/core",
371 "external/skia/src/effects",
372 "external/skia/src/image",
373 "external/skia/src/images",
374 ],
375
376 shared_libs: [
377 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400378 "libcutils",
379 "libharfbuzz_ng",
380 "liblog",
381 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400382 "libz",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400383 "libjpeg",
384 ],
385
Tej Singh78f65b62021-03-18 16:19:55 -0700386 static_libs: [
387 "libnativehelper_lazy",
388 "libziparchive_for_incfs",
389 ],
Orion Hodson33cbf8b2021-02-08 16:17:07 +0000390
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400391 target: {
392 android: {
393 srcs: [ // sources that depend on android only libraries
394 "jni/AnimatedImageDrawable.cpp",
395 "jni/android_graphics_TextureLayer.cpp",
396 "jni/android_graphics_HardwareRenderer.cpp",
397 "jni/BitmapRegionDecoder.cpp",
398 "jni/GIFMovie.cpp",
399 "jni/GraphicsStatsService.cpp",
400 "jni/Movie.cpp",
401 "jni/MovieImpl.cpp",
402 "jni/pdf/PdfDocument.cpp",
403 "jni/pdf/PdfEditor.cpp",
404 "jni/pdf/PdfRenderer.cpp",
405 "jni/pdf/PdfUtils.cpp",
406 ],
407 shared_libs: [
408 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500409 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500410 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400411 "libmediandk",
412 "libnativedisplay",
413 "libnativewindow",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400414 "libpdfium",
415 ],
416 static_libs: [
417 "libgif",
Tej Singh78f65b62021-03-18 16:19:55 -0700418 "libstatslog_hwui",
419 "libstatspull_lazy",
420 "libstatssocket_lazy",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400421 ],
422 },
423 host: {
424 cflags: [
425 "-Wno-unused-const-variable",
426 "-Wno-unused-function",
427 ],
428 static_libs: [
429 "libandroidfw",
430 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700431 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400432 },
433}
434
Tej Singh78f65b62021-03-18 16:19:55 -0700435cc_library_static {
436 name: "libstatslog_hwui",
437 generated_sources: ["statslog_hwui.cpp"],
438 generated_headers: ["statslog_hwui.h"],
439 export_generated_headers: ["statslog_hwui.h"],
440 static_libs: [
441 "libstatssocket_lazy",
442 "libstatspull_lazy",
443 ],
444}
445
446genrule {
447 name: "statslog_hwui.h",
448 tools: ["stats-log-api-gen"],
449 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
450 " --namespace android,uirenderer,stats",
451 out: [
452 "statslog_hwui.h",
453 ],
454}
455
456genrule {
457 name: "statslog_hwui.cpp",
458 tools: ["stats-log-api-gen"],
459 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
460 " --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
461 out: [
462 "statslog_hwui.cpp",
463 ],
464}
465
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400466// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700467// library
468// ------------------------
469
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400470cc_library_headers {
471 name: "libhwui_internal_headers",
472
473 host_supported: true,
474 export_include_dirs: [
475 ".",
476 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700477 header_libs: ["android_graphics_jni_headers"],
478 export_header_lib_headers: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400479}
480
Colin Crossf6298102017-04-19 15:25:25 -0700481cc_defaults {
482 name: "libhwui_defaults",
483 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400484
485 whole_static_libs: ["libskia"],
486
Colin Crossf6298102017-04-19 15:25:25 -0700487 srcs: [
John Reckdc95f102020-11-16 12:35:02 -0500488 "canvas/CanvasFrontend.cpp",
John Reck013127b2020-10-29 20:53:51 -0400489 "canvas/CanvasOpBuffer.cpp",
490 "canvas/CanvasOpRasterizer.cpp",
John Reck5cb290b2021-02-01 13:47:31 -0500491 "effects/StretchEffect.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700492 "pipeline/skia/HolePunch.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100493 "pipeline/skia/SkiaDisplayList.cpp",
494 "pipeline/skia/SkiaRecordingCanvas.cpp",
Nader Jawad197743f2021-04-19 19:45:13 -0700495 "pipeline/skia/StretchMask.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100496 "pipeline/skia/RenderNodeDrawable.cpp",
497 "pipeline/skia/ReorderBarrierDrawables.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700498 "pipeline/skia/TransformCanvas.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100499 "renderthread/Frame.cpp",
500 "renderthread/RenderTask.cpp",
501 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500502 "hwui/AnimatedImageDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700503 "hwui/Bitmap.cpp",
Mike Reed0f9dce72021-02-12 21:20:33 -0500504 "hwui/BlurDrawLooper.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700505 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500506 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700507 "hwui/MinikinSkia.cpp",
508 "hwui/MinikinUtils.cpp",
509 "hwui/PaintImpl.cpp",
510 "hwui/Typeface.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700511 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100512 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700513 "utils/LinearAllocator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700514 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100515 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700516 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100517 "AnimatorManager.cpp",
518 "CanvasTransform.cpp",
519 "DamageAccumulator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700520 "Interpolator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100521 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700522 "Matrix.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700523 "PathParser.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700524 "Properties.cpp",
525 "PropertyValuesAnimatorSet.cpp",
526 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100527 "RecordingCanvas.cpp",
528 "RenderNode.cpp",
529 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100530 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700531 "SkiaCanvas.cpp",
Mike Reed74065272021-04-12 09:52:07 -0400532 "SkiaInterpolator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700533 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700534 ],
535
Kweku Adams228b6d22018-04-12 13:09:04 -0700536 proto: {
537 export_proto_headers: true,
538 },
539
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100540 target: {
541 android: {
Long Ling9e6c9fb2022-02-02 14:32:09 -0800542 header_libs: [
543 "libandroid_headers_private",
544 "libtonemap_headers",
545 ],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100546
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100547 srcs: [
Jerome Gaillardf9a4dc42020-01-29 15:23:26 +0000548 "hwui/AnimatedImageThread.cpp",
Stan Ilieve0fae232020-01-07 17:21:49 -0500549 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100550 "pipeline/skia/GLFunctorDrawable.cpp",
551 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100552 "pipeline/skia/ShaderCache.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100553 "pipeline/skia/SkiaMemoryTracer.cpp",
554 "pipeline/skia/SkiaOpenGLPipeline.cpp",
555 "pipeline/skia/SkiaPipeline.cpp",
556 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100557 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100558 "pipeline/skia/VkFunctorDrawable.cpp",
559 "pipeline/skia/VkInteropFunctorDrawable.cpp",
560 "renderstate/RenderState.cpp",
561 "renderthread/CacheManager.cpp",
562 "renderthread/CanvasContext.cpp",
563 "renderthread/DrawFrameTask.cpp",
564 "renderthread/EglManager.cpp",
565 "renderthread/ReliableSurface.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700566 "renderthread/RenderEffectCapabilityQuery.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100567 "renderthread/VulkanManager.cpp",
568 "renderthread/VulkanSurface.cpp",
569 "renderthread/RenderProxy.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100570 "renderthread/RenderThread.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100571 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100572 "thread/CommonPool.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100573 "utils/GLUtils.cpp",
Alec Mouri45238012020-01-29 11:04:40 -0800574 "utils/NdkUtils.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100575 "utils/StringUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400576 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100577 "DeferredLayerUpdater.cpp",
578 "DeviceInfo.cpp",
579 "FrameInfo.cpp",
580 "FrameInfoVisualizer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100581 "HardwareBitmapUploader.cpp",
582 "HWUIProperties.sysprop",
583 "JankTracker.cpp",
Pablo Gamito88660d72021-08-09 14:37:56 +0000584 "FrameMetricsReporter.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100585 "Layer.cpp",
586 "LayerUpdateQueue.cpp",
587 "ProfileData.cpp",
588 "ProfileDataContainer.cpp",
589 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100590 "TreeInfo.cpp",
591 "WebViewFunctorManager.cpp",
592 "protos/graphicsstats.proto",
593 ],
594
595 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
596 cflags: ["-Wno-implicit-fallthrough"],
597 },
598 host: {
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100599 srcs: [
600 "utils/HostColorSpace.cpp",
601 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100602 export_static_lib_headers: [
603 "libarect",
604 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700605 },
606 },
Colin Crossf6298102017-04-19 15:25:25 -0700607}
608
609cc_library {
610 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100611 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700612 defaults: [
613 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400614 "android_graphics_apex",
615 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700616 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700617 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400618 export_header_lib_headers: ["android_graphics_apex_headers"],
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400619 target: {
620 android: {
621 version_script: "libhwui.map.txt",
Tej Singh78f65b62021-03-18 16:19:55 -0700622 },
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400623 },
Yi Kong7c0a3ad2022-01-08 01:01:20 +0800624 afdo: true,
Colin Crossf6298102017-04-19 15:25:25 -0700625}
626
Colin Crossf6298102017-04-19 15:25:25 -0700627cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700628 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700629 defaults: [
630 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700631 ],
Colin Crossf6298102017-04-19 15:25:25 -0700632}
633
634cc_defaults {
635 name: "hwui_test_defaults",
636 defaults: ["hwui_defaults"],
637 test_suites: ["device-tests"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100638 header_libs: ["libandroid_headers_private"],
Alec Mouri680414e2020-01-28 09:22:33 -0800639 target: {
640 android: {
641 shared_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700642 "libgui",
643 "libui",
644 ],
645 },
Alec Mouri680414e2020-01-28 09:22:33 -0800646 },
Colin Crossf6298102017-04-19 15:25:25 -0700647 srcs: [
648 "tests/common/scenes/*.cpp",
649 "tests/common/LeakChecker.cpp",
650 "tests/common/TestListViewSceneBase.cpp",
651 "tests/common/TestContext.cpp",
652 "tests/common/TestScene.cpp",
653 "tests/common/TestUtils.cpp",
654 ],
655}
656
657// ------------------------
658// unit tests
659// ------------------------
660
661cc_test {
662 name: "hwui_unit_tests",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400663 defaults: [
664 "hwui_test_defaults",
665 "android_graphics_apex",
666 "android_graphics_jni",
667 ],
Colin Crossf6298102017-04-19 15:25:25 -0700668
669 static_libs: [
670 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700671 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700672 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800673 shared_libs: [
674 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800675 ],
Colin Crossf6298102017-04-19 15:25:25 -0700676 srcs: [
677 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400678 "tests/unit/ABitmapTests.cpp",
Nolan Scobie892cac22022-10-24 19:57:43 -0400679 "tests/unit/AutoBackendTextureReleaseTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400680 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700681 "tests/unit/CanvasContextTests.cpp",
John Reck013127b2020-10-29 20:53:51 -0400682 "tests/unit/CanvasOpTests.cpp",
John Reckdc95f102020-11-16 12:35:02 -0500683 "tests/unit/CanvasFrontendTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700684 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700685 "tests/unit/DamageAccumulatorTests.cpp",
686 "tests/unit/DeferredLayerUpdaterTests.cpp",
John Reck064650b2021-01-19 21:29:24 -0500687 "tests/unit/EglManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700688 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700689 "tests/unit/GraphicsStatsServiceTests.cpp",
Jorim Jaggi10f328c2021-01-19 00:08:02 +0100690 "tests/unit/JankTrackerTests.cpp",
Pablo Gamitodfb85a22021-08-26 01:19:05 +0200691 "tests/unit/FrameMetricsReporterTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700692 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700693 "tests/unit/LinearAllocatorTests.cpp",
694 "tests/unit/MatrixTests.cpp",
John Reck95735052020-12-15 13:39:22 -0500695 "tests/unit/OpBufferTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700696 "tests/unit/PathInterpolatorTests.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700697 "tests/unit/RenderEffectCapabilityQueryTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700698 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700699 "tests/unit/RenderNodeTests.cpp",
700 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800701 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400702 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700703 "tests/unit/SkiaBehaviorTests.cpp",
704 "tests/unit/SkiaDisplayListTests.cpp",
705 "tests/unit/SkiaPipelineTests.cpp",
706 "tests/unit/SkiaRenderPropertiesTests.cpp",
707 "tests/unit/SkiaCanvasTests.cpp",
Nader Jawadc401b232021-05-21 12:52:05 -0700708 "tests/unit/StretchEffectTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700709 "tests/unit/StringUtilsTests.cpp",
710 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700711 "tests/unit/ThreadBaseTests.cpp",
712 "tests/unit/TypefaceTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700713 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800714 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700715 ],
716}
717
718// ------------------------
719// Macro-bench app
720// ------------------------
721
722cc_benchmark {
723 name: "hwuimacro",
724 defaults: ["hwui_test_defaults"],
725
John Reck23462d82019-05-29 16:55:06 -0700726 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800727 shared_libs: [
728 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800729 ],
Colin Crossf6298102017-04-19 15:25:25 -0700730
731 srcs: [
732 "tests/macrobench/TestSceneRunner.cpp",
733 "tests/macrobench/main.cpp",
734 ],
735}
736
737// ------------------------
738// Micro-bench app
739// ---------------------
740
741cc_benchmark {
742 name: "hwuimicro",
743 defaults: ["hwui_test_defaults"],
744
John Reck23462d82019-05-29 16:55:06 -0700745 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800746 shared_libs: [
747 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800748 ],
Colin Crossf6298102017-04-19 15:25:25 -0700749
750 srcs: [
751 "tests/microbench/main.cpp",
John Reckb5eeb182020-12-09 13:45:39 -0500752 "tests/microbench/CanvasOpBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700753 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700754 "tests/microbench/LinearAllocatorBench.cpp",
755 "tests/microbench/PathParserBench.cpp",
756 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700757 ],
758}