blob: e74d3966a39b1b04c3a52ec531e8d8c7a7200066 [file] [log] [blame]
Bob Badour051ef782021-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 Nainar0dfd4be2017-11-16 22:40:00 -080038 "hwui_pgo",
Pirama Arumuga Nainarb7913e12018-03-09 00:03:57 +000039 "hwui_lto",
Colin Crossf6298102017-04-19 15:25:25 -070040 ],
41
John Reck283bb462018-12-13 16:40:14 -080042 cpp_std: "experimental",
43
Colin Crossf6298102017-04-19 15:25:25 -070044 cflags: [
45 "-DEGL_EGLEXT_PROTOTYPES",
46 "-DGL_GLEXT_PROTOTYPES",
47 "-DATRACE_TAG=ATRACE_TAG_VIEW",
48 "-DLOG_TAG=\"OpenGLRenderer\"",
49 "-Wall",
50 "-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",
Fedor Kudasov86bd2142019-06-18 15:51:57 +010086 "frameworks/native/libs/math/include",
87 "frameworks/native/libs/ui/include",
Fedor Kudasov182cbf92019-06-05 10:30:20 +010088 ],
89 cflags: [
90 "-Wno-unused-variable",
91 ],
92 }
93 }
Colin Crossf6298102017-04-19 15:25:25 -070094}
95
96cc_defaults {
97 name: "hwui_static_deps",
98 shared_libs: [
Jerome Gaillarda02a12d2019-05-28 18:07:56 +010099 "libbase",
Colin Crossf6298102017-04-19 15:25:25 -0700100 "libharfbuzz_ng",
Colin Crossf6298102017-04-19 15:25:25 -0700101 "libminikin",
Colin Crossf6298102017-04-19 15:25:25 -0700102 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100103
104 target: {
105 android: {
106 shared_libs: [
107 "liblog",
108 "libcutils",
109 "libstatslog",
110 "libutils",
111 "libEGL",
112 "libGLESv1_CM",
113 "libGLESv2",
114 "libGLESv3",
115 "libvulkan",
116 "libui",
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",
Stan Ilievc9043812020-02-03 16:57:09 -0500124 "libstatspull",
125 "libstatssocket",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100126 ],
127 static_libs: [
128 "libEGL_blobCache",
Stan Ilievc9043812020-02-03 16:57:09 -0500129 "libprotoutil",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100130 ],
131 },
132 host: {
133 static_libs: [
134 "libandroidfw",
135 "libutils",
136 ],
137 }
138 }
Colin Crossf6298102017-04-19 15:25:25 -0700139}
140
141cc_defaults {
142 name: "hwui_bugreport_font_cache_usage",
Colin Crossf6298102017-04-19 15:25:25 -0700143 cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
144}
145
146cc_defaults {
147 name: "hwui_compile_for_perf",
148 // TODO: Non-arm?
149 cflags: [
150 "-fno-omit-frame-pointer",
151 "-marm",
152 "-mapcs",
153 ],
154}
155
Pirama Arumuga Nainar0dfd4be2017-11-16 22:40:00 -0800156// Build libhwui with PGO by default.
157// Location of PGO profile data is defined in build/soong/cc/pgo.go
158// and is separate from hwui.
159// To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable
160// or set enable_profile_use property to false.
161cc_defaults {
162 name: "hwui_pgo",
163
164 pgo: {
165 instrumentation: true,
166 profile_file: "hwui/hwui.profdata",
167 benchmarks: ["hwui"],
Zhizhou Yang58e1b782017-12-06 16:59:06 -0800168 enable_profile_use: true,
Pirama Arumuga Nainar0dfd4be2017-11-16 22:40:00 -0800169 },
170}
171
Zhizhou Yangf30f1122018-02-26 17:59:38 -0800172// Build hwui library with ThinLTO by default.
173cc_defaults {
174 name: "hwui_lto",
175 target: {
176 android: {
177 lto: {
178 thin: true,
179 },
180 },
181 },
182}
183
Colin Crossf6298102017-04-19 15:25:25 -0700184// ------------------------
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400185// APEX
186// ------------------------
187
188cc_library_headers {
189 name: "android_graphics_apex_headers",
190
191 host_supported: true,
192 export_include_dirs: [
193 "apex/include",
194 ],
195 target: {
196 windows: {
197 enabled: true,
198 },
199 }
200}
201
202cc_defaults {
203 name: "android_graphics_apex",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400204 cflags: [
205 "-Wno-unused-parameter",
206 "-Wno-non-virtual-dtor",
207 "-Wno-maybe-uninitialized",
208 "-Wno-parentheses",
209 "-Wall",
210 "-Werror",
211 "-Wno-error=deprecated-declarations",
212 "-Wunused",
213 "-Wunreachable-code",
214 ],
215
216 cppflags: ["-Wno-conversion-null"],
217
218 srcs: [
219 "apex/android_matrix.cpp",
220 "apex/android_paint.cpp",
221 "apex/android_region.cpp",
222 ],
223
224 header_libs: [ "android_graphics_apex_headers" ],
225
226 target: {
227 android: {
228 srcs: [ // sources that depend on android only libraries
229 "apex/android_bitmap.cpp",
230 "apex/android_canvas.cpp",
231 "apex/jni_runtime.cpp",
232 "apex/renderthread.cpp",
233 ],
234 },
Derek Sollenbergerc5882c42019-10-25 11:11:32 -0400235 host: {
236 srcs: [
237 "apex/LayoutlibLoader.cpp",
238 ],
239 }
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400240 },
241}
242
243// ------------------------
244// Android Graphics JNI
245// ------------------------
246
247cc_library_headers {
248 name: "android_graphics_jni_headers",
249
250 host_supported: true,
251 export_include_dirs: [
252 "jni",
253 ],
254 target: {
255 windows: {
256 enabled: true,
257 },
258 }
259}
260
261cc_defaults {
262 name: "android_graphics_jni",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400263 cflags: [
264 "-Wno-unused-parameter",
265 "-Wno-non-virtual-dtor",
266 "-Wno-maybe-uninitialized",
267 "-Wno-parentheses",
268
269 "-DGL_GLEXT_PROTOTYPES",
270 "-DEGL_EGLEXT_PROTOTYPES",
271
272 "-DU_USING_ICU_NAMESPACE=0",
273
274 "-Wall",
275 "-Werror",
276 "-Wno-error=deprecated-declarations",
277 "-Wunused",
278 "-Wunreachable-code",
279 ],
280
281 cppflags: ["-Wno-conversion-null"],
282
283 srcs: [
284 "jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
285 "jni/android_graphics_animation_RenderNodeAnimator.cpp",
286 "jni/android_graphics_Canvas.cpp",
287 "jni/android_graphics_ColorSpace.cpp",
288 "jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
289 "jni/android_graphics_drawable_VectorDrawable.cpp",
290 "jni/android_graphics_HardwareRendererObserver.cpp",
291 "jni/android_graphics_Matrix.cpp",
292 "jni/android_graphics_Picture.cpp",
293 "jni/android_graphics_DisplayListCanvas.cpp",
294 "jni/android_graphics_RenderNode.cpp",
295 "jni/android_nio_utils.cpp",
296 "jni/android_util_PathParser.cpp",
297
298 "jni/Bitmap.cpp",
299 "jni/BitmapFactory.cpp",
300 "jni/ByteBufferStreamAdaptor.cpp",
301 "jni/Camera.cpp",
302 "jni/CanvasProperty.cpp",
303 "jni/ColorFilter.cpp",
304 "jni/CreateJavaOutputStreamAdaptor.cpp",
305 "jni/FontFamily.cpp",
306 "jni/FontUtils.cpp",
307 "jni/Graphics.cpp",
308 "jni/ImageDecoder.cpp",
309 "jni/Interpolator.cpp",
310 "jni/MaskFilter.cpp",
311 "jni/NinePatch.cpp",
312 "jni/NinePatchPeeker.cpp",
313 "jni/Paint.cpp",
314 "jni/PaintFilter.cpp",
315 "jni/Path.cpp",
316 "jni/PathEffect.cpp",
317 "jni/PathMeasure.cpp",
318 "jni/Picture.cpp",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400319 "jni/Shader.cpp",
320 "jni/Typeface.cpp",
321 "jni/Utils.cpp",
322 "jni/YuvToJpegEncoder.cpp",
323 "jni/fonts/Font.cpp",
324 "jni/fonts/FontFamily.cpp",
325 "jni/text/LineBreaker.cpp",
326 "jni/text/MeasuredText.cpp",
327 ],
328
329 header_libs: [ "android_graphics_jni_headers" ],
330
331 include_dirs: [
332 "external/skia/include/private",
333 "external/skia/src/codec",
334 "external/skia/src/core",
335 "external/skia/src/effects",
336 "external/skia/src/image",
337 "external/skia/src/images",
338 ],
339
340 shared_libs: [
341 "libbase",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400342 "libcutils",
343 "libharfbuzz_ng",
344 "liblog",
345 "libminikin",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400346 "libz",
347 "libziparchive",
348 "libjpeg",
349 ],
350
Orion Hodson0e0351d2021-02-08 16:17:07 +0000351 static_libs: ["libnativehelper_lazy"],
352
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400353 target: {
354 android: {
355 srcs: [ // sources that depend on android only libraries
356 "jni/AnimatedImageDrawable.cpp",
357 "jni/android_graphics_TextureLayer.cpp",
358 "jni/android_graphics_HardwareRenderer.cpp",
359 "jni/BitmapRegionDecoder.cpp",
360 "jni/GIFMovie.cpp",
361 "jni/GraphicsStatsService.cpp",
362 "jni/Movie.cpp",
363 "jni/MovieImpl.cpp",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500364 "jni/Region.cpp", // requires libbinder_ndk
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400365 "jni/pdf/PdfDocument.cpp",
366 "jni/pdf/PdfEditor.cpp",
367 "jni/pdf/PdfRenderer.cpp",
368 "jni/pdf/PdfUtils.cpp",
369 ],
370 shared_libs: [
371 "libandroidfw",
Derek Sollenberger42c50042020-02-18 14:51:17 -0500372 "libbinder",
Derek Sollenberger15da7e22020-02-14 14:16:34 -0500373 "libbinder_ndk",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400374 "libmediandk",
375 "libnativedisplay",
376 "libnativewindow",
377 "libstatspull",
378 "libstatssocket",
379 "libpdfium",
380 ],
381 static_libs: [
382 "libgif",
383 "libstatslog",
384 ],
385 },
386 host: {
387 cflags: [
388 "-Wno-unused-const-variable",
389 "-Wno-unused-function",
390 ],
391 static_libs: [
392 "libandroidfw",
393 ],
394 }
395 },
396}
397
398// ------------------------
Colin Crossf6298102017-04-19 15:25:25 -0700399// library
400// ------------------------
401
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400402cc_library_headers {
403 name: "libhwui_internal_headers",
404
405 host_supported: true,
406 export_include_dirs: [
407 ".",
408 ],
409 header_libs: [ "android_graphics_jni_headers" ],
410 export_header_lib_headers: [ "android_graphics_jni_headers" ],
411}
412
Colin Crossf6298102017-04-19 15:25:25 -0700413cc_defaults {
414 name: "libhwui_defaults",
415 defaults: ["hwui_defaults"],
Derek Sollenbergerd938e5a2017-07-24 09:42:07 -0400416
417 whole_static_libs: ["libskia"],
418
Colin Crossf6298102017-04-19 15:25:25 -0700419 srcs: [
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100420 "pipeline/skia/SkiaDisplayList.cpp",
421 "pipeline/skia/SkiaRecordingCanvas.cpp",
422 "pipeline/skia/RenderNodeDrawable.cpp",
423 "pipeline/skia/ReorderBarrierDrawables.cpp",
Fedor Kudasov666f8a52019-07-03 15:21:14 +0100424 "renderthread/Frame.cpp",
425 "renderthread/RenderTask.cpp",
426 "renderthread/TimeLord.cpp",
Derek Sollenberger2d142132018-01-22 10:25:26 -0500427 "hwui/AnimatedImageDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700428 "hwui/Bitmap.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700429 "hwui/Canvas.cpp",
Leon Scroggins III753a56f2019-12-11 11:02:15 -0500430 "hwui/ImageDecoder.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700431 "hwui/MinikinSkia.cpp",
432 "hwui/MinikinUtils.cpp",
433 "hwui/PaintImpl.cpp",
434 "hwui/Typeface.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700435 "utils/Blur.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100436 "utils/Color.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700437 "utils/LinearAllocator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700438 "utils/VectorDrawableUtils.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100439 "AnimationContext.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700440 "Animator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100441 "AnimatorManager.cpp",
442 "CanvasTransform.cpp",
443 "DamageAccumulator.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700444 "Interpolator.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100445 "LightingInfo.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700446 "Matrix.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700447 "PathParser.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700448 "Properties.cpp",
449 "PropertyValuesAnimatorSet.cpp",
450 "PropertyValuesHolder.cpp",
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100451 "RecordingCanvas.cpp",
452 "RenderNode.cpp",
453 "RenderProperties.cpp",
Fedor Kudasov09cfce02019-07-04 09:41:13 +0100454 "RootRenderNode.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700455 "SkiaCanvas.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700456 "VectorDrawable.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700457 ],
458
Kweku Adams228b6d22018-04-12 13:09:04 -0700459 proto: {
460 export_proto_headers: true,
461 },
462
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100463 target: {
464 android: {
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100465 srcs: [
Jerome Gaillardf9a4dc42020-01-29 15:23:26 +0000466 "hwui/AnimatedImageThread.cpp",
Stan Ilieve0fae232020-01-07 17:21:49 -0500467 "pipeline/skia/ATraceMemoryDump.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100468 "pipeline/skia/GLFunctorDrawable.cpp",
469 "pipeline/skia/LayerDrawable.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100470 "pipeline/skia/ShaderCache.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100471 "pipeline/skia/SkiaMemoryTracer.cpp",
472 "pipeline/skia/SkiaOpenGLPipeline.cpp",
473 "pipeline/skia/SkiaPipeline.cpp",
474 "pipeline/skia/SkiaProfileRenderer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100475 "pipeline/skia/SkiaVulkanPipeline.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100476 "pipeline/skia/VkFunctorDrawable.cpp",
477 "pipeline/skia/VkInteropFunctorDrawable.cpp",
478 "renderstate/RenderState.cpp",
479 "renderthread/CacheManager.cpp",
480 "renderthread/CanvasContext.cpp",
481 "renderthread/DrawFrameTask.cpp",
482 "renderthread/EglManager.cpp",
483 "renderthread/ReliableSurface.cpp",
484 "renderthread/VulkanManager.cpp",
485 "renderthread/VulkanSurface.cpp",
486 "renderthread/RenderProxy.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100487 "renderthread/RenderThread.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100488 "service/GraphicsStatsService.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100489 "thread/CommonPool.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100490 "utils/GLUtils.cpp",
491 "utils/StringUtils.cpp",
Stan Ilievaaa9e832019-09-17 14:07:23 -0400492 "AutoBackendTextureRelease.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100493 "DeferredLayerUpdater.cpp",
494 "DeviceInfo.cpp",
495 "FrameInfo.cpp",
496 "FrameInfoVisualizer.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100497 "HardwareBitmapUploader.cpp",
498 "HWUIProperties.sysprop",
499 "JankTracker.cpp",
500 "Layer.cpp",
501 "LayerUpdateQueue.cpp",
502 "ProfileData.cpp",
503 "ProfileDataContainer.cpp",
504 "Readback.cpp",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100505 "TreeInfo.cpp",
506 "WebViewFunctorManager.cpp",
507 "protos/graphicsstats.proto",
508 ],
509
510 // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
511 cflags: ["-Wno-implicit-fallthrough"],
512 },
513 host: {
Fedor Kudasov86bd2142019-06-18 15:51:57 +0100514 srcs: [
515 "utils/HostColorSpace.cpp",
516 ],
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100517 export_static_lib_headers: [
518 "libarect",
519 ],
520 }
521 }
Colin Crossf6298102017-04-19 15:25:25 -0700522}
523
524cc_library {
525 name: "libhwui",
Fedor Kudasov182cbf92019-06-05 10:30:20 +0100526 host_supported: true,
Chris Craikd17b63c2017-06-01 10:45:36 -0700527 defaults: [
528 "libhwui_defaults",
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400529 "android_graphics_apex",
530 "android_graphics_jni",
Collin Fijalkovichc10428f2021-04-23 14:09:16 -0700531 "linker_hugepage_aligned",
Zhizhou Yang17371ec2017-10-13 11:42:13 -0700532 ],
Derek Sollenberger83ccff72019-10-24 11:49:54 -0400533 export_header_lib_headers: ["android_graphics_apex_headers"],
Colin Crossf6298102017-04-19 15:25:25 -0700534}
535
Colin Crossf6298102017-04-19 15:25:25 -0700536cc_library_static {
John Reck23462d82019-05-29 16:55:06 -0700537 name: "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700538 defaults: [
539 "libhwui_defaults",
Colin Crossf6298102017-04-19 15:25:25 -0700540 ],
Colin Crossf6298102017-04-19 15:25:25 -0700541}
542
543cc_defaults {
544 name: "hwui_test_defaults",
545 defaults: ["hwui_defaults"],
546 test_suites: ["device-tests"],
Alec Mouri680414e2020-01-28 09:22:33 -0800547 target: {
548 android: {
549 shared_libs: [
550 "libgui",
551 ],
552 }
553 },
Colin Crossf6298102017-04-19 15:25:25 -0700554 srcs: [
555 "tests/common/scenes/*.cpp",
556 "tests/common/LeakChecker.cpp",
557 "tests/common/TestListViewSceneBase.cpp",
558 "tests/common/TestContext.cpp",
559 "tests/common/TestScene.cpp",
560 "tests/common/TestUtils.cpp",
561 ],
562}
563
564// ------------------------
565// unit tests
566// ------------------------
567
568cc_test {
569 name: "hwui_unit_tests",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400570 defaults: [
571 "hwui_test_defaults",
572 "android_graphics_apex",
573 "android_graphics_jni",
574 ],
Colin Crossf6298102017-04-19 15:25:25 -0700575
576 static_libs: [
577 "libgmock",
John Reck23462d82019-05-29 16:55:06 -0700578 "libhwui_static",
Colin Crossf6298102017-04-19 15:25:25 -0700579 ],
Tej Singhbb8554a2018-01-26 11:59:14 -0800580 shared_libs: [
581 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800582 ],
Colin Crossf6298102017-04-19 15:25:25 -0700583
584 srcs: [
585 "tests/unit/main.cpp",
Derek Sollenbergerd3e9eec2020-04-06 11:43:59 -0400586 "tests/unit/ABitmapTests.cpp",
Derek Sollenbergerf9e45d12017-06-01 13:07:39 -0400587 "tests/unit/CacheManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700588 "tests/unit/CanvasContextTests.cpp",
John Reck322b8ab2019-03-14 13:15:28 -0700589 "tests/unit/CommonPoolTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700590 "tests/unit/DamageAccumulatorTests.cpp",
591 "tests/unit/DeferredLayerUpdaterTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700592 "tests/unit/FatVectorTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700593 "tests/unit/GraphicsStatsServiceTests.cpp",
594 "tests/unit/LayerUpdateQueueTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700595 "tests/unit/LinearAllocatorTests.cpp",
596 "tests/unit/MatrixTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700597 "tests/unit/PathInterpolatorTests.cpp",
598 "tests/unit/RenderNodeDrawableTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700599 "tests/unit/RenderNodeTests.cpp",
600 "tests/unit/RenderPropertiesTests.cpp",
John Reck700079e2019-02-19 10:38:50 -0800601 "tests/unit/RenderThreadTests.cpp",
Stan Ilievd495f432017-10-09 15:49:32 -0400602 "tests/unit/ShaderCacheTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700603 "tests/unit/SkiaBehaviorTests.cpp",
604 "tests/unit/SkiaDisplayListTests.cpp",
605 "tests/unit/SkiaPipelineTests.cpp",
606 "tests/unit/SkiaRenderPropertiesTests.cpp",
607 "tests/unit/SkiaCanvasTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700608 "tests/unit/StringUtilsTests.cpp",
609 "tests/unit/TestUtilsTests.cpp",
John Reckf8441e62017-10-23 13:10:41 -0700610 "tests/unit/ThreadBaseTests.cpp",
611 "tests/unit/TypefaceTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700612 "tests/unit/VectorDrawableTests.cpp",
John Reck283bb462018-12-13 16:40:14 -0800613 "tests/unit/WebViewFunctorManagerTests.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700614 ],
615}
616
617// ------------------------
618// Macro-bench app
619// ------------------------
620
621cc_benchmark {
622 name: "hwuimacro",
623 defaults: ["hwui_test_defaults"],
624
John Reck23462d82019-05-29 16:55:06 -0700625 static_libs: ["libhwui"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800626 shared_libs: [
627 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800628 ],
Colin Crossf6298102017-04-19 15:25:25 -0700629
630 srcs: [
631 "tests/macrobench/TestSceneRunner.cpp",
632 "tests/macrobench/main.cpp",
633 ],
634}
635
636// ------------------------
637// Micro-bench app
638// ---------------------
639
640cc_benchmark {
641 name: "hwuimicro",
642 defaults: ["hwui_test_defaults"],
643
John Reck23462d82019-05-29 16:55:06 -0700644 static_libs: ["libhwui_static"],
Tej Singhbb8554a2018-01-26 11:59:14 -0800645 shared_libs: [
646 "libmemunreachable",
Tej Singhbb8554a2018-01-26 11:59:14 -0800647 ],
Colin Crossf6298102017-04-19 15:25:25 -0700648
649 srcs: [
650 "tests/microbench/main.cpp",
651 "tests/microbench/DisplayListCanvasBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700652 "tests/microbench/LinearAllocatorBench.cpp",
653 "tests/microbench/PathParserBench.cpp",
654 "tests/microbench/RenderNodeBench.cpp",
Colin Crossf6298102017-04-19 15:25:25 -0700655 ],
656}
Pirama Arumuga Nainarbc1e1772017-11-17 11:32:16 -0800657
658// ----------------------------------------
659// Phony target to build benchmarks for PGO
660// ----------------------------------------
661
662phony {
663 name: "pgo-targets-hwui",
664 required: [
665 "hwuimicro",
666 "hwuimacro",
667 ]
668}