blob: 88f73d6cf25119983abe78f005b3941f3eeebae7 [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",
Alec Mouria7bd3b92022-04-14 23:24:28 +0000111 "android.hardware.graphics.composer3-V1-ndk",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100112 "liblog",
113 "libcutils",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100114 "libutils",
115 "libEGL",
116 "libGLESv1_CM",
117 "libGLESv2",
118 "libGLESv3",
119 "libvulkan",
Alec Mouri22d753f2019-09-05 17:11:45 -0700120 "libnativedisplay",
Derek Sollenbergere78f7c92019-07-31 15:18:47 -0400121 "libnativewindow",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100122 "libprotobuf-cpp-lite",
123 "libft2",
124 "libandroidfw",
125 "libcrypto",
126 "libsync",
127 ],
128 static_libs: [
129 "libEGL_blobCache",
Stan Ilievc9043812020-02-03 16:57:09 -0500130 "libprotoutil",
Alec Mourid0001fe2021-11-22 10:09:22 -0800131 "libshaders",
Tej Singh78f65b62021-03-18 16:19:55 -0700132 "libstatslog_hwui",
133 "libstatspull_lazy",
134 "libstatssocket_lazy",
Alec Mourid0001fe2021-11-22 10:09:22 -0800135 "libtonemap",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100136 ],
137 },
138 host: {
139 static_libs: [
140 "libandroidfw",
141 "libutils",
142 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700143 },
144 },
Colin Crossf6298102017-04-19 15:25:25 -0700145}
146
147cc_defaults {
148 name: "hwui_bugreport_font_cache_usage",
Colin Crossf6298102017-04-19 15:25:25 -0700149 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
150}
151
152cc_defaults {
153 name: "hwui_compile_for_perf",
154 // TODO: Non-arm?
155 cflags: [
156 "-fno-omit-frame-pointer",
157 "-marm",
158 "-mapcs",
159 ],
160}
161
Zhizhou Yangf30f1122018-02-26 17:59:38 -0800162// Build hwui library with ThinLTO by default.
163cc_defaults {
164 name: "hwui_lto",
165 target: {
166 android: {
167 lto: {
168 thin: true,
169 },
170 },
171 },
172}
173
Colin Crossf6298102017-04-19 15:25:25 -0700174// ------------------------
Alec Mourief37c242020-03-02 21:38:09 +0000175// framework-graphics jar
176// ------------------------
177
Paul Duffin4e006622020-05-31 16:55:13 +0100178java_sdk_library {
Alec Mourief37c242020-03-02 21:38:09 +0000179 name: "framework-graphics",
Paul Duffin4e006622020-05-31 16:55:13 +0100180 defaults: ["framework-module-defaults"],
181 visibility: [
182 "//frameworks/base", // Framework
183 ],
Alec Mourief37c242020-03-02 21:38:09 +0000184
185 srcs: [
186 ":framework-graphics-srcs",
187 ],
188
189 permitted_packages: [
190 "android.graphics",
191 ],
192
Alec Mourief37c242020-03-02 21:38:09 +0000193 // TODO: once framework-graphics is officially part of the
194 // UI-rendering module this line would no longer be
195 // needed.
196 installable: true,
197
Paul Duffin4e006622020-05-31 16:55:13 +0100198 // Disable api_lint that the defaults enable
199 // TODO: enable this
200 api_lint: {
201 enabled: false,
202 },
Anton Hansson96b08ae2020-12-21 16:59:06 +0000203 // TODO: remove this
204 unsafe_ignore_missing_latest_api: true,
Alec Mourief37c242020-03-02 21:38:09 +0000205}
206
207filegroup {
208 name: "framework-graphics-srcs",
209 srcs: [
210 "apex/java/**/*.java",
211 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700212 path: "apex/java",
Alec Mourief37c242020-03-02 21:38:09 +0000213}
214
Alec Mourief37c242020-03-02 21:38:09 +0000215// ------------------------
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400216// APEX
217// ------------------------
218
219cc_library_headers {
220 name: "android_graphics_apex_headers",
221
222 host_supported: true,
223 export_include_dirs: [
224 "apex/include",
225 ],
226 target: {
227 windows: {
228 enabled: true,
229 },
Tej Singh78f65b62021-03-18 16:19:55 -0700230 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400231}
232
233cc_defaults {
234 name: "android_graphics_apex",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400235 cflags: [
236 "-Wno-unused-parameter",
237 "-Wno-non-virtual-dtor",
238 "-Wno-maybe-uninitialized",
239 "-Wno-parentheses",
240 "-Wall",
241 "-Werror",
242 "-Wno-error=deprecated-declarations",
243 "-Wunused",
244 "-Wunreachable-code",
245 ],
246
247 cppflags: ["-Wno-conversion-null"],
248
249 srcs: [
250 "apex/android_matrix.cpp",
251 "apex/android_paint.cpp",
252 "apex/android_region.cpp",
Leon Scroggins IIIcd9e7b42022-04-08 15:27:57 -0400253 "apex/properties.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400254 ],
255
Tej Singh78f65b62021-03-18 16:19:55 -0700256 header_libs: ["android_graphics_apex_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400257
258 target: {
259 android: {
260 srcs: [ // sources that depend on android only libraries
261 "apex/android_bitmap.cpp",
262 "apex/android_canvas.cpp",
263 "apex/jni_runtime.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400264 ],
265 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400266 host: {
267 srcs: [
268 "apex/LayoutlibLoader.cpp",
269 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700270 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400271 },
272}
273
274// ------------------------
275// Android Graphics JNI
276// ------------------------
277
278cc_library_headers {
279 name: "android_graphics_jni_headers",
280
281 host_supported: true,
282 export_include_dirs: [
283 "jni",
284 ],
285 target: {
286 windows: {
287 enabled: true,
288 },
Tej Singh78f65b62021-03-18 16:19:55 -0700289 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400290}
291
292cc_defaults {
293 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400294 cflags: [
295 "-Wno-unused-parameter",
296 "-Wno-non-virtual-dtor",
297 "-Wno-maybe-uninitialized",
298 "-Wno-parentheses",
299
300 "-DGL_GLEXT_PROTOTYPES",
301 "-DEGL_EGLEXT_PROTOTYPES",
302
303 "-DU_USING_ICU_NAMESPACE=0",
304
305 "-Wall",
306 "-Werror",
307 "-Wno-error=deprecated-declarations",
308 "-Wunused",
309 "-Wunreachable-code",
310 ],
311
312 cppflags: ["-Wno-conversion-null"],
313
314 srcs: [
315 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
316 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
317 "jni/android_graphics_Canvas.cpp",
318 "jni/android_graphics_ColorSpace.cpp",
319 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
320 "jni/android_graphics_drawable_VectorDrawable.cpp",
321 "jni/android_graphics_HardwareRendererObserver.cpp",
322 "jni/android_graphics_Matrix.cpp",
323 "jni/android_graphics_Picture.cpp",
324 "jni/android_graphics_DisplayListCanvas.cpp",
325 "jni/android_graphics_RenderNode.cpp",
326 "jni/android_nio_utils.cpp",
327 "jni/android_util_PathParser.cpp",
328
329 "jni/Bitmap.cpp",
330 "jni/BitmapFactory.cpp",
331 "jni/ByteBufferStreamAdaptor.cpp",
332 "jni/Camera.cpp",
333 "jni/CanvasProperty.cpp",
334 "jni/ColorFilter.cpp",
335 "jni/CreateJavaOutputStreamAdaptor.cpp",
336 "jni/FontFamily.cpp",
337 "jni/FontUtils.cpp",
338 "jni/Graphics.cpp",
339 "jni/ImageDecoder.cpp",
340 "jni/Interpolator.cpp",
341 "jni/MaskFilter.cpp",
342 "jni/NinePatch.cpp",
343 "jni/NinePatchPeeker.cpp",
344 "jni/Paint.cpp",
345 "jni/PaintFilter.cpp",
346 "jni/Path.cpp",
347 "jni/PathEffect.cpp",
Chet Haase0834e9f2022-08-15 23:01:03 +0000348 "jni/PathIterator.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400349 "jni/PathMeasure.cpp",
350 "jni/Picture.cpp",
Jerome Gaillard9ce48282021-12-02 17:11:28 +0000351 "jni/Region.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400352 "jni/Shader.cpp",
Nader Jawad390d6e82020-09-24 21:35:03 -0700353 "jni/RenderEffect.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400354 "jni/Typeface.cpp",
355 "jni/Utils.cpp",
356 "jni/YuvToJpegEncoder.cpp",
357 "jni/fonts/Font.cpp",
358 "jni/fonts/FontFamily.cpp",
359 "jni/text/LineBreaker.cpp",
360 "jni/text/MeasuredText.cpp",
Seigo Nonakaf3a19152020-09-14 15:29:42 -0700361 "jni/text/TextShaper.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400362 ],
363
Tej Singh78f65b62021-03-18 16:19:55 -0700364 header_libs: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400365
366 include_dirs: [
367 "external/skia/include/private",
368 "external/skia/src/codec",
369 "external/skia/src/core",
370 "external/skia/src/effects",
371 "external/skia/src/image",
372 "external/skia/src/images",
373 ],
374
375 shared_libs: [
376 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400377 "libcutils",
378 "libharfbuzz_ng",
379 "liblog",
380 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400381 "libz",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400382 "libjpeg",
383 ],
384
Tej Singh78f65b62021-03-18 16:19:55 -0700385 static_libs: [
386 "libnativehelper_lazy",
387 "libziparchive_for_incfs",
388 ],
Orion Hodson33cbf8b2021-02-08 16:17:07 +0000389
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400390 target: {
391 android: {
392 srcs: [ // sources that depend on android only libraries
393 "jni/AnimatedImageDrawable.cpp",
394 "jni/android_graphics_TextureLayer.cpp",
395 "jni/android_graphics_HardwareRenderer.cpp",
396 "jni/BitmapRegionDecoder.cpp",
397 "jni/GIFMovie.cpp",
398 "jni/GraphicsStatsService.cpp",
399 "jni/Movie.cpp",
400 "jni/MovieImpl.cpp",
401 "jni/pdf/PdfDocument.cpp",
402 "jni/pdf/PdfEditor.cpp",
403 "jni/pdf/PdfRenderer.cpp",
404 "jni/pdf/PdfUtils.cpp",
405 ],
406 shared_libs: [
407 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500408 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500409 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400410 "libmediandk",
411 "libnativedisplay",
412 "libnativewindow",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400413 "libpdfium",
414 ],
415 static_libs: [
416 "libgif",
Tej Singh78f65b62021-03-18 16:19:55 -0700417 "libstatslog_hwui",
418 "libstatspull_lazy",
419 "libstatssocket_lazy",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400420 ],
421 },
422 host: {
423 cflags: [
424 "-Wno-unused-const-variable",
425 "-Wno-unused-function",
426 ],
427 static_libs: [
428 "libandroidfw",
429 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700430 },
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400431 },
432}
433
Tej Singh78f65b62021-03-18 16:19:55 -0700434cc_library_static {
435 name: "libstatslog_hwui",
436 generated_sources: ["statslog_hwui.cpp"],
437 generated_headers: ["statslog_hwui.h"],
438 export_generated_headers: ["statslog_hwui.h"],
439 static_libs: [
440 "libstatssocket_lazy",
441 "libstatspull_lazy",
442 ],
443}
444
445genrule {
446 name: "statslog_hwui.h",
447 tools: ["stats-log-api-gen"],
448 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
449 " --namespace android,uirenderer,stats",
450 out: [
451 "statslog_hwui.h",
452 ],
453}
454
455genrule {
456 name: "statslog_hwui.cpp",
457 tools: ["stats-log-api-gen"],
458 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
459 " --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
460 out: [
461 "statslog_hwui.cpp",
462 ],
463}
464
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400465// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700466// library
467// ------------------------
468
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400469cc_library_headers {
470 name: "libhwui_internal_headers",
471
472 host_supported: true,
473 export_include_dirs: [
474 ".",
475 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700476 header_libs: ["android_graphics_jni_headers"],
477 export_header_lib_headers: ["android_graphics_jni_headers"],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400478}
479
Colin Crossf6298102017-04-19 15:25:25 -0700480cc_defaults {
481 name: "libhwui_defaults",
482 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400483
484 whole_static_libs: ["libskia"],
485
Colin Crossf6298102017-04-19 15:25:25 -0700486 srcs: [
John Reckdc95f102020-11-16 12:35:02 -0500487 "canvas/CanvasFrontend.cpp",
John Reck013127b2020-10-29 20:53:51 -0400488 "canvas/CanvasOpBuffer.cpp",
489 "canvas/CanvasOpRasterizer.cpp",
John Reck5cb290b2021-02-01 13:47:31 -0500490 "effects/StretchEffect.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700491 "pipeline/skia/HolePunch.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100492 "pipeline/skia/SkiaDisplayList.cpp",
493 "pipeline/skia/SkiaRecordingCanvas.cpp",
Nader Jawad197743f2021-04-19 19:45:13 -0700494 "pipeline/skia/StretchMask.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100495 "pipeline/skia/RenderNodeDrawable.cpp",
496 "pipeline/skia/ReorderBarrierDrawables.cpp",
Nader Jawad2dc632a2021-03-29 18:51:29 -0700497 "pipeline/skia/TransformCanvas.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100498 "renderthread/Frame.cpp",
499 "renderthread/RenderTask.cpp",
500 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500501 "hwui/AnimatedImageDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700502 "hwui/Bitmap.cpp",
Mike Reed0f9dce72021-02-12 21:20:33 -0500503 "hwui/BlurDrawLooper.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700504 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500505 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700506 "hwui/MinikinSkia.cpp",
507 "hwui/MinikinUtils.cpp",
508 "hwui/PaintImpl.cpp",
509 "hwui/Typeface.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700510 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100511 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700512 "utils/LinearAllocator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700513 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100514 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700515 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100516 "AnimatorManager.cpp",
517 "CanvasTransform.cpp",
518 "DamageAccumulator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700519 "Interpolator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100520 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700521 "Matrix.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700522 "PathParser.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700523 "Properties.cpp",
524 "PropertyValuesAnimatorSet.cpp",
525 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100526 "RecordingCanvas.cpp",
527 "RenderNode.cpp",
528 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100529 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700530 "SkiaCanvas.cpp",
Mike Reed74065272021-04-12 09:52:07 -0400531 "SkiaInterpolator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700532 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700533 ],
534
Kweku Adams228b6d22018-04-12 13:09:04 -0700535 proto: {
536 export_proto_headers: true,
537 },
538
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100539 target: {
540 android: {
Long Ling9e6c9fb2022-02-02 14:32:09 -0800541 header_libs: [
542 "libandroid_headers_private",
543 "libtonemap_headers",
544 ],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100545
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100546 srcs: [
Jerome Gaillardf9a4dc42020-01-29 15:23:26 +0000547 "hwui/AnimatedImageThread.cpp",
Stan Ilieve0fae232020-01-07 17:21:49 -0500548 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100549 "pipeline/skia/GLFunctorDrawable.cpp",
550 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100551 "pipeline/skia/ShaderCache.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100552 "pipeline/skia/SkiaMemoryTracer.cpp",
553 "pipeline/skia/SkiaOpenGLPipeline.cpp",
554 "pipeline/skia/SkiaPipeline.cpp",
555 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100556 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100557 "pipeline/skia/VkFunctorDrawable.cpp",
558 "pipeline/skia/VkInteropFunctorDrawable.cpp",
559 "renderstate/RenderState.cpp",
560 "renderthread/CacheManager.cpp",
561 "renderthread/CanvasContext.cpp",
562 "renderthread/DrawFrameTask.cpp",
563 "renderthread/EglManager.cpp",
564 "renderthread/ReliableSurface.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700565 "renderthread/RenderEffectCapabilityQuery.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100566 "renderthread/VulkanManager.cpp",
567 "renderthread/VulkanSurface.cpp",
568 "renderthread/RenderProxy.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100569 "renderthread/RenderThread.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100570 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100571 "thread/CommonPool.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100572 "utils/GLUtils.cpp",
Alec Mouri45238012020-01-29 11:04:40 -0800573 "utils/NdkUtils.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100574 "utils/StringUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400575 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100576 "DeferredLayerUpdater.cpp",
577 "DeviceInfo.cpp",
578 "FrameInfo.cpp",
579 "FrameInfoVisualizer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100580 "HardwareBitmapUploader.cpp",
581 "HWUIProperties.sysprop",
582 "JankTracker.cpp",
Pablo Gamito88660d72021-08-09 14:37:56 +0000583 "FrameMetricsReporter.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100584 "Layer.cpp",
585 "LayerUpdateQueue.cpp",
586 "ProfileData.cpp",
587 "ProfileDataContainer.cpp",
588 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100589 "TreeInfo.cpp",
590 "WebViewFunctorManager.cpp",
591 "protos/graphicsstats.proto",
592 ],
593
594 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
595 cflags: ["-Wno-implicit-fallthrough"],
596 },
597 host: {
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100598 srcs: [
599 "utils/HostColorSpace.cpp",
600 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100601 export_static_lib_headers: [
602 "libarect",
603 ],
Tej Singh78f65b62021-03-18 16:19:55 -0700604 },
605 },
Colin Crossf6298102017-04-19 15:25:25 -0700606}
607
608cc_library {
609 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100610 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700611 defaults: [
612 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400613 "android_graphics_apex",
614 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700615 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700616 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400617 export_header_lib_headers: ["android_graphics_apex_headers"],
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400618 target: {
619 android: {
620 version_script: "libhwui.map.txt",
Tej Singh78f65b62021-03-18 16:19:55 -0700621 },
Derek Sollenberger2c5d6342020-04-09 09:44:54 -0400622 },
Yi Kong7c0a3ad2022-01-08 01:01:20 +0800623 afdo: true,
Colin Crossf6298102017-04-19 15:25:25 -0700624}
625
Colin Crossf6298102017-04-19 15:25:25 -0700626cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700627 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700628 defaults: [
629 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700630 ],
Colin Crossf6298102017-04-19 15:25:25 -0700631}
632
633cc_defaults {
634 name: "hwui_test_defaults",
635 defaults: ["hwui_defaults"],
636 test_suites: ["device-tests"],
Jorim Jaggi71db8892021-02-03 23:19:29 +0100637 header_libs: ["libandroid_headers_private"],
Alec Mouri680414e2020-01-28 09:22:33 -0800638 target: {
639 android: {
640 shared_libs: [
Tej Singh78f65b62021-03-18 16:19:55 -0700641 "libgui",
642 "libui",
643 ],
644 },
Alec Mouri680414e2020-01-28 09:22:33 -0800645 },
Colin Crossf6298102017-04-19 15:25:25 -0700646 srcs: [
647 "tests/common/scenes/*.cpp",
648 "tests/common/LeakChecker.cpp",
649 "tests/common/TestListViewSceneBase.cpp",
650 "tests/common/TestContext.cpp",
651 "tests/common/TestScene.cpp",
652 "tests/common/TestUtils.cpp",
653 ],
654}
655
656// ------------------------
657// unit tests
658// ------------------------
659
660cc_test {
661 name: "hwui_unit_tests",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400662 defaults: [
663 "hwui_test_defaults",
664 "android_graphics_apex",
665 "android_graphics_jni",
666 ],
Colin Crossf6298102017-04-19 15:25:25 -0700667
668 static_libs: [
669 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700670 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700671 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800672 shared_libs: [
673 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800674 ],
Colin Crossf6298102017-04-19 15:25:25 -0700675 srcs: [
676 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400677 "tests/unit/ABitmapTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400678 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700679 "tests/unit/CanvasContextTests.cpp",
John Reck013127b2020-10-29 20:53:51 -0400680 "tests/unit/CanvasOpTests.cpp",
John Reckdc95f102020-11-16 12:35:02 -0500681 "tests/unit/CanvasFrontendTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700682 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700683 "tests/unit/DamageAccumulatorTests.cpp",
684 "tests/unit/DeferredLayerUpdaterTests.cpp",
John Reck064650b2021-01-19 21:29:24 -0500685 "tests/unit/EglManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700686 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700687 "tests/unit/GraphicsStatsServiceTests.cpp",
Jorim Jaggi10f328c2021-01-19 00:08:02 +0100688 "tests/unit/JankTrackerTests.cpp",
Pablo Gamitodfb85a22021-08-26 01:19:05 +0200689 "tests/unit/FrameMetricsReporterTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700690 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700691 "tests/unit/LinearAllocatorTests.cpp",
692 "tests/unit/MatrixTests.cpp",
John Reck95735052020-12-15 13:39:22 -0500693 "tests/unit/OpBufferTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700694 "tests/unit/PathInterpolatorTests.cpp",
Nader Jawad086645d2021-09-24 13:42:47 -0700695 "tests/unit/RenderEffectCapabilityQueryTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700696 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700697 "tests/unit/RenderNodeTests.cpp",
698 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800699 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400700 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700701 "tests/unit/SkiaBehaviorTests.cpp",
702 "tests/unit/SkiaDisplayListTests.cpp",
703 "tests/unit/SkiaPipelineTests.cpp",
704 "tests/unit/SkiaRenderPropertiesTests.cpp",
705 "tests/unit/SkiaCanvasTests.cpp",
Nader Jawadc401b232021-05-21 12:52:05 -0700706 "tests/unit/StretchEffectTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700707 "tests/unit/StringUtilsTests.cpp",
708 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700709 "tests/unit/ThreadBaseTests.cpp",
710 "tests/unit/TypefaceTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700711 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800712 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700713 ],
714}
715
716// ------------------------
717// Macro-bench app
718// ------------------------
719
720cc_benchmark {
721 name: "hwuimacro",
722 defaults: ["hwui_test_defaults"],
723
John Reck23462d82019-05-29 16:55:06 -0700724 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800725 shared_libs: [
726 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800727 ],
Colin Crossf6298102017-04-19 15:25:25 -0700728
729 srcs: [
730 "tests/macrobench/TestSceneRunner.cpp",
731 "tests/macrobench/main.cpp",
732 ],
733}
734
735// ------------------------
736// Micro-bench app
737// ---------------------
738
739cc_benchmark {
740 name: "hwuimicro",
741 defaults: ["hwui_test_defaults"],
742
John Reck23462d82019-05-29 16:55:06 -0700743 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800744 shared_libs: [
745 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800746 ],
Colin Crossf6298102017-04-19 15:25:25 -0700747
748 srcs: [
749 "tests/microbench/main.cpp",
John Reckb5eeb182020-12-09 13:45:39 -0500750 "tests/microbench/CanvasOpBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700751 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700752 "tests/microbench/LinearAllocatorBench.cpp",
753 "tests/microbench/PathParserBench.cpp",
754 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700755 ],
756}