2021-02-12 17:07:05 -08:00
|
|
|
package {
|
|
|
|
default_applicable_licenses: ["frameworks_base_libs_hwui_license"],
|
|
|
|
}
|
|
|
|
|
|
|
|
// Added automatically by a large-scale-change that took the approach of
|
|
|
|
// 'apply every license found to every target'. While this makes sure we respect
|
|
|
|
// every license restriction, it may not be entirely correct.
|
|
|
|
//
|
|
|
|
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
|
|
|
|
//
|
|
|
|
// Please consider splitting the single license below into multiple licenses,
|
|
|
|
// taking care not to lose any license_kind information, and overriding the
|
|
|
|
// default license using the 'licenses: [...]' property on targets as needed.
|
|
|
|
//
|
|
|
|
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
|
|
|
|
// to attach the license to, and including a comment whether the files may be
|
|
|
|
// used in the current project.
|
|
|
|
// See: http://go/android-license-faq
|
|
|
|
license {
|
|
|
|
name: "frameworks_base_libs_hwui_license",
|
|
|
|
visibility: [":__subpackages__"],
|
|
|
|
license_kinds: [
|
|
|
|
"SPDX-license-identifier-Apache-2.0",
|
|
|
|
"SPDX-license-identifier-BSD",
|
|
|
|
],
|
|
|
|
license_text: [
|
|
|
|
"NOTICE",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-04-19 15:25:25 -07:00
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_defaults",
|
|
|
|
defaults: [
|
|
|
|
"hwui_static_deps",
|
2017-11-16 22:40:00 -08:00
|
|
|
"skia_deps",
|
2017-04-19 15:25:25 -07:00
|
|
|
//"hwui_bugreport_font_cache_usage",
|
|
|
|
//"hwui_compile_for_perf",
|
2017-11-16 22:40:00 -08:00
|
|
|
"hwui_pgo",
|
2018-03-09 00:03:57 +00:00
|
|
|
"hwui_lto",
|
2017-04-19 15:25:25 -07:00
|
|
|
],
|
|
|
|
|
2018-12-13 16:40:14 -08:00
|
|
|
cpp_std: "experimental",
|
|
|
|
|
2017-04-19 15:25:25 -07:00
|
|
|
cflags: [
|
|
|
|
"-DEGL_EGLEXT_PROTOTYPES",
|
|
|
|
"-DGL_GLEXT_PROTOTYPES",
|
|
|
|
"-DATRACE_TAG=ATRACE_TAG_VIEW",
|
|
|
|
"-DLOG_TAG=\"OpenGLRenderer\"",
|
|
|
|
"-Wall",
|
2021-07-03 02:22:12 +00:00
|
|
|
"-Wthread-safety",
|
2017-04-19 15:25:25 -07:00
|
|
|
"-Wno-unused-parameter",
|
|
|
|
"-Wunreachable-code",
|
|
|
|
"-Werror",
|
|
|
|
"-fvisibility=hidden",
|
|
|
|
|
|
|
|
// GCC false-positives on this warning, and since we -Werror that's
|
|
|
|
// a problem
|
|
|
|
"-Wno-free-nonheap-object",
|
|
|
|
],
|
|
|
|
|
|
|
|
include_dirs: [
|
|
|
|
"external/skia/include/private",
|
|
|
|
"external/skia/src/core",
|
|
|
|
],
|
|
|
|
|
|
|
|
product_variables: {
|
2018-07-11 11:21:09 -07:00
|
|
|
eng: {
|
|
|
|
lto: {
|
|
|
|
never: true,
|
|
|
|
},
|
|
|
|
},
|
2017-04-19 15:25:25 -07:00
|
|
|
},
|
2019-06-05 10:30:20 +01:00
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
include_dirs: [
|
|
|
|
"external/skia/src/effects",
|
|
|
|
"external/skia/src/image",
|
|
|
|
"external/skia/src/utils",
|
|
|
|
"external/skia/src/gpu",
|
|
|
|
"external/skia/src/shaders",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
include_dirs: [
|
|
|
|
"external/vulkan-headers/include",
|
|
|
|
],
|
|
|
|
cflags: [
|
|
|
|
"-Wno-unused-variable",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
|
|
|
},
|
2017-04-19 15:25:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_static_deps",
|
|
|
|
shared_libs: [
|
2019-05-28 18:07:56 +01:00
|
|
|
"libbase",
|
2017-04-19 15:25:25 -07:00
|
|
|
"libharfbuzz_ng",
|
|
|
|
"libminikin",
|
|
|
|
],
|
2019-06-05 10:30:20 +01:00
|
|
|
|
2020-01-29 11:04:40 -08:00
|
|
|
static_libs: [
|
|
|
|
"libui-types",
|
|
|
|
],
|
|
|
|
|
2019-06-05 10:30:20 +01:00
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
shared_libs: [
|
|
|
|
"liblog",
|
|
|
|
"libcutils",
|
|
|
|
"libutils",
|
|
|
|
"libEGL",
|
|
|
|
"libGLESv1_CM",
|
|
|
|
"libGLESv2",
|
|
|
|
"libGLESv3",
|
|
|
|
"libvulkan",
|
2019-09-05 17:11:45 -07:00
|
|
|
"libnativedisplay",
|
2019-07-31 15:18:47 -04:00
|
|
|
"libnativewindow",
|
2019-06-05 10:30:20 +01:00
|
|
|
"libprotobuf-cpp-lite",
|
|
|
|
"libft2",
|
|
|
|
"libandroidfw",
|
|
|
|
"libcrypto",
|
|
|
|
"libsync",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libEGL_blobCache",
|
2020-02-03 16:57:09 -05:00
|
|
|
"libprotoutil",
|
2021-03-18 16:19:55 -07:00
|
|
|
"libstatslog_hwui",
|
|
|
|
"libstatspull_lazy",
|
|
|
|
"libstatssocket_lazy",
|
2019-06-05 10:30:20 +01:00
|
|
|
],
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
static_libs: [
|
|
|
|
"libandroidfw",
|
|
|
|
"libutils",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
|
|
|
},
|
2017-04-19 15:25:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_bugreport_font_cache_usage",
|
|
|
|
cflags: ["-DBUGREPORT_FONT_CACHE_USAGE"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_compile_for_perf",
|
|
|
|
// TODO: Non-arm?
|
|
|
|
cflags: [
|
|
|
|
"-fno-omit-frame-pointer",
|
|
|
|
"-marm",
|
|
|
|
"-mapcs",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-11-16 22:40:00 -08:00
|
|
|
// Build libhwui with PGO by default.
|
|
|
|
// Location of PGO profile data is defined in build/soong/cc/pgo.go
|
|
|
|
// and is separate from hwui.
|
|
|
|
// To turn it off, set ANDROID_PGO_NO_PROFILE_USE environment variable
|
|
|
|
// or set enable_profile_use property to false.
|
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_pgo",
|
|
|
|
|
|
|
|
pgo: {
|
|
|
|
instrumentation: true,
|
|
|
|
profile_file: "hwui/hwui.profdata",
|
|
|
|
benchmarks: ["hwui"],
|
2017-12-06 16:59:06 -08:00
|
|
|
enable_profile_use: true,
|
2017-11-16 22:40:00 -08:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2018-02-26 17:59:38 -08:00
|
|
|
// Build hwui library with ThinLTO by default.
|
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_lto",
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
lto: {
|
|
|
|
thin: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2020-03-02 21:38:09 +00:00
|
|
|
// ------------------------
|
|
|
|
// framework-graphics jar
|
|
|
|
// ------------------------
|
|
|
|
|
2020-05-31 16:55:13 +01:00
|
|
|
java_sdk_library {
|
2020-03-02 21:38:09 +00:00
|
|
|
name: "framework-graphics",
|
2020-05-31 16:55:13 +01:00
|
|
|
defaults: ["framework-module-defaults"],
|
|
|
|
visibility: [
|
|
|
|
"//frameworks/base", // Framework
|
|
|
|
],
|
2020-03-02 21:38:09 +00:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
":framework-graphics-srcs",
|
|
|
|
],
|
|
|
|
|
|
|
|
permitted_packages: [
|
|
|
|
"android.graphics",
|
|
|
|
],
|
|
|
|
|
|
|
|
// TODO: once framework-graphics is officially part of the
|
|
|
|
// UI-rendering module this line would no longer be
|
|
|
|
// needed.
|
|
|
|
installable: true,
|
|
|
|
|
2020-05-31 16:55:13 +01:00
|
|
|
// Disable api_lint that the defaults enable
|
|
|
|
// TODO: enable this
|
|
|
|
api_lint: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
2020-12-21 16:59:06 +00:00
|
|
|
// TODO: remove this
|
|
|
|
unsafe_ignore_missing_latest_api: true,
|
2020-03-02 21:38:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
filegroup {
|
|
|
|
name: "framework-graphics-srcs",
|
|
|
|
srcs: [
|
|
|
|
"apex/java/**/*.java",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
path: "apex/java",
|
2020-03-02 21:38:09 +00:00
|
|
|
}
|
|
|
|
|
2019-10-24 11:49:54 -04:00
|
|
|
// ------------------------
|
|
|
|
// APEX
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
cc_library_headers {
|
|
|
|
name: "android_graphics_apex_headers",
|
|
|
|
|
|
|
|
host_supported: true,
|
|
|
|
export_include_dirs: [
|
|
|
|
"apex/include",
|
|
|
|
],
|
|
|
|
target: {
|
|
|
|
windows: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
2019-10-24 11:49:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "android_graphics_apex",
|
|
|
|
cflags: [
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
"-Wno-non-virtual-dtor",
|
|
|
|
"-Wno-maybe-uninitialized",
|
|
|
|
"-Wno-parentheses",
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-error=deprecated-declarations",
|
|
|
|
"-Wunused",
|
|
|
|
"-Wunreachable-code",
|
|
|
|
],
|
|
|
|
|
|
|
|
cppflags: ["-Wno-conversion-null"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"apex/android_matrix.cpp",
|
|
|
|
"apex/android_paint.cpp",
|
|
|
|
"apex/android_region.cpp",
|
|
|
|
],
|
|
|
|
|
2021-03-18 16:19:55 -07:00
|
|
|
header_libs: ["android_graphics_apex_headers"],
|
2019-10-24 11:49:54 -04:00
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
srcs: [ // sources that depend on android only libraries
|
|
|
|
"apex/android_bitmap.cpp",
|
|
|
|
"apex/android_canvas.cpp",
|
|
|
|
"apex/jni_runtime.cpp",
|
|
|
|
"apex/renderthread.cpp",
|
|
|
|
],
|
|
|
|
},
|
2019-10-25 11:11:32 -04:00
|
|
|
host: {
|
|
|
|
srcs: [
|
|
|
|
"apex/LayoutlibLoader.cpp",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
2019-10-24 11:49:54 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------
|
|
|
|
// Android Graphics JNI
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
cc_library_headers {
|
|
|
|
name: "android_graphics_jni_headers",
|
|
|
|
|
|
|
|
host_supported: true,
|
|
|
|
export_include_dirs: [
|
|
|
|
"jni",
|
|
|
|
],
|
|
|
|
target: {
|
|
|
|
windows: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
2019-10-24 11:49:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "android_graphics_jni",
|
|
|
|
cflags: [
|
|
|
|
"-Wno-unused-parameter",
|
|
|
|
"-Wno-non-virtual-dtor",
|
|
|
|
"-Wno-maybe-uninitialized",
|
|
|
|
"-Wno-parentheses",
|
|
|
|
|
|
|
|
"-DGL_GLEXT_PROTOTYPES",
|
|
|
|
"-DEGL_EGLEXT_PROTOTYPES",
|
|
|
|
|
|
|
|
"-DU_USING_ICU_NAMESPACE=0",
|
|
|
|
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wno-error=deprecated-declarations",
|
|
|
|
"-Wunused",
|
|
|
|
"-Wunreachable-code",
|
|
|
|
],
|
|
|
|
|
|
|
|
cppflags: ["-Wno-conversion-null"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"jni/android_graphics_animation_NativeInterpolatorFactory.cpp",
|
|
|
|
"jni/android_graphics_animation_RenderNodeAnimator.cpp",
|
|
|
|
"jni/android_graphics_Canvas.cpp",
|
|
|
|
"jni/android_graphics_ColorSpace.cpp",
|
|
|
|
"jni/android_graphics_drawable_AnimatedVectorDrawable.cpp",
|
|
|
|
"jni/android_graphics_drawable_VectorDrawable.cpp",
|
|
|
|
"jni/android_graphics_HardwareRendererObserver.cpp",
|
|
|
|
"jni/android_graphics_Matrix.cpp",
|
|
|
|
"jni/android_graphics_Picture.cpp",
|
|
|
|
"jni/android_graphics_DisplayListCanvas.cpp",
|
|
|
|
"jni/android_graphics_RenderNode.cpp",
|
|
|
|
"jni/android_nio_utils.cpp",
|
|
|
|
"jni/android_util_PathParser.cpp",
|
|
|
|
|
|
|
|
"jni/Bitmap.cpp",
|
|
|
|
"jni/BitmapFactory.cpp",
|
|
|
|
"jni/ByteBufferStreamAdaptor.cpp",
|
|
|
|
"jni/Camera.cpp",
|
|
|
|
"jni/CanvasProperty.cpp",
|
|
|
|
"jni/ColorFilter.cpp",
|
|
|
|
"jni/CreateJavaOutputStreamAdaptor.cpp",
|
|
|
|
"jni/FontFamily.cpp",
|
|
|
|
"jni/FontUtils.cpp",
|
|
|
|
"jni/Graphics.cpp",
|
|
|
|
"jni/ImageDecoder.cpp",
|
|
|
|
"jni/Interpolator.cpp",
|
|
|
|
"jni/MaskFilter.cpp",
|
|
|
|
"jni/NinePatch.cpp",
|
|
|
|
"jni/NinePatchPeeker.cpp",
|
|
|
|
"jni/Paint.cpp",
|
|
|
|
"jni/PaintFilter.cpp",
|
|
|
|
"jni/Path.cpp",
|
|
|
|
"jni/PathEffect.cpp",
|
|
|
|
"jni/PathMeasure.cpp",
|
|
|
|
"jni/Picture.cpp",
|
|
|
|
"jni/Shader.cpp",
|
2020-09-24 21:35:03 -07:00
|
|
|
"jni/RenderEffect.cpp",
|
2019-10-24 11:49:54 -04:00
|
|
|
"jni/Typeface.cpp",
|
|
|
|
"jni/Utils.cpp",
|
|
|
|
"jni/YuvToJpegEncoder.cpp",
|
|
|
|
"jni/fonts/Font.cpp",
|
|
|
|
"jni/fonts/FontFamily.cpp",
|
|
|
|
"jni/text/LineBreaker.cpp",
|
|
|
|
"jni/text/MeasuredText.cpp",
|
2020-09-14 15:29:42 -07:00
|
|
|
"jni/text/TextShaper.cpp",
|
2019-10-24 11:49:54 -04:00
|
|
|
],
|
|
|
|
|
2021-03-18 16:19:55 -07:00
|
|
|
header_libs: ["android_graphics_jni_headers"],
|
2019-10-24 11:49:54 -04:00
|
|
|
|
|
|
|
include_dirs: [
|
|
|
|
"external/skia/include/private",
|
|
|
|
"external/skia/src/codec",
|
|
|
|
"external/skia/src/core",
|
|
|
|
"external/skia/src/effects",
|
|
|
|
"external/skia/src/image",
|
|
|
|
"external/skia/src/images",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"libharfbuzz_ng",
|
|
|
|
"liblog",
|
|
|
|
"libminikin",
|
|
|
|
"libz",
|
|
|
|
"libjpeg",
|
|
|
|
],
|
|
|
|
|
2021-03-18 16:19:55 -07:00
|
|
|
static_libs: [
|
|
|
|
"libnativehelper_lazy",
|
|
|
|
"libziparchive_for_incfs",
|
|
|
|
],
|
2021-02-08 16:17:07 +00:00
|
|
|
|
2019-10-24 11:49:54 -04:00
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
srcs: [ // sources that depend on android only libraries
|
|
|
|
"jni/AnimatedImageDrawable.cpp",
|
|
|
|
"jni/android_graphics_TextureLayer.cpp",
|
|
|
|
"jni/android_graphics_HardwareRenderer.cpp",
|
|
|
|
"jni/BitmapRegionDecoder.cpp",
|
|
|
|
"jni/GIFMovie.cpp",
|
|
|
|
"jni/GraphicsStatsService.cpp",
|
|
|
|
"jni/Movie.cpp",
|
|
|
|
"jni/MovieImpl.cpp",
|
2020-02-14 14:16:34 -05:00
|
|
|
"jni/Region.cpp", // requires libbinder_ndk
|
2019-10-24 11:49:54 -04:00
|
|
|
"jni/pdf/PdfDocument.cpp",
|
|
|
|
"jni/pdf/PdfEditor.cpp",
|
|
|
|
"jni/pdf/PdfRenderer.cpp",
|
|
|
|
"jni/pdf/PdfUtils.cpp",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libandroidfw",
|
2020-02-18 14:51:17 -05:00
|
|
|
"libbinder",
|
2020-02-14 14:16:34 -05:00
|
|
|
"libbinder_ndk",
|
2019-10-24 11:49:54 -04:00
|
|
|
"libmediandk",
|
|
|
|
"libnativedisplay",
|
|
|
|
"libnativewindow",
|
|
|
|
"libpdfium",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libgif",
|
2021-03-18 16:19:55 -07:00
|
|
|
"libstatslog_hwui",
|
|
|
|
"libstatspull_lazy",
|
|
|
|
"libstatssocket_lazy",
|
2019-10-24 11:49:54 -04:00
|
|
|
],
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
cflags: [
|
|
|
|
"-Wno-unused-const-variable",
|
|
|
|
"-Wno-unused-function",
|
|
|
|
],
|
|
|
|
static_libs: [
|
|
|
|
"libandroidfw",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
2019-10-24 11:49:54 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2021-03-18 16:19:55 -07:00
|
|
|
cc_library_static {
|
|
|
|
name: "libstatslog_hwui",
|
|
|
|
generated_sources: ["statslog_hwui.cpp"],
|
|
|
|
generated_headers: ["statslog_hwui.h"],
|
|
|
|
export_generated_headers: ["statslog_hwui.h"],
|
|
|
|
static_libs: [
|
|
|
|
"libstatssocket_lazy",
|
|
|
|
"libstatspull_lazy",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "statslog_hwui.h",
|
|
|
|
tools: ["stats-log-api-gen"],
|
|
|
|
cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_hwui.h --module hwui" +
|
|
|
|
" --namespace android,uirenderer,stats",
|
|
|
|
out: [
|
|
|
|
"statslog_hwui.h",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
genrule {
|
|
|
|
name: "statslog_hwui.cpp",
|
|
|
|
tools: ["stats-log-api-gen"],
|
|
|
|
cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_hwui.cpp --module hwui" +
|
|
|
|
" --namespace android,uirenderer,stats --importHeader statslog_hwui.h",
|
|
|
|
out: [
|
|
|
|
"statslog_hwui.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-04-19 15:25:25 -07:00
|
|
|
// ------------------------
|
|
|
|
// library
|
|
|
|
// ------------------------
|
|
|
|
|
2019-10-24 11:49:54 -04:00
|
|
|
cc_library_headers {
|
|
|
|
name: "libhwui_internal_headers",
|
|
|
|
|
|
|
|
host_supported: true,
|
|
|
|
export_include_dirs: [
|
|
|
|
".",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
header_libs: ["android_graphics_jni_headers"],
|
|
|
|
export_header_lib_headers: ["android_graphics_jni_headers"],
|
2019-10-24 11:49:54 -04:00
|
|
|
}
|
|
|
|
|
2017-04-19 15:25:25 -07:00
|
|
|
cc_defaults {
|
|
|
|
name: "libhwui_defaults",
|
|
|
|
defaults: ["hwui_defaults"],
|
2017-07-24 09:42:07 -04:00
|
|
|
|
|
|
|
whole_static_libs: ["libskia"],
|
|
|
|
|
2017-04-19 15:25:25 -07:00
|
|
|
srcs: [
|
2020-11-16 12:35:02 -05:00
|
|
|
"canvas/CanvasFrontend.cpp",
|
2020-10-29 20:53:51 -04:00
|
|
|
"canvas/CanvasOpBuffer.cpp",
|
|
|
|
"canvas/CanvasOpRasterizer.cpp",
|
2021-02-01 13:47:31 -05:00
|
|
|
"effects/StretchEffect.cpp",
|
2021-03-29 18:51:29 -07:00
|
|
|
"pipeline/skia/HolePunch.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"pipeline/skia/SkiaDisplayList.cpp",
|
|
|
|
"pipeline/skia/SkiaRecordingCanvas.cpp",
|
2021-04-19 19:45:13 -07:00
|
|
|
"pipeline/skia/StretchMask.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"pipeline/skia/RenderNodeDrawable.cpp",
|
|
|
|
"pipeline/skia/ReorderBarrierDrawables.cpp",
|
2021-03-29 18:51:29 -07:00
|
|
|
"pipeline/skia/TransformCanvas.cpp",
|
2019-07-03 15:21:14 +01:00
|
|
|
"renderthread/Frame.cpp",
|
|
|
|
"renderthread/RenderTask.cpp",
|
|
|
|
"renderthread/TimeLord.cpp",
|
2018-01-22 10:25:26 -05:00
|
|
|
"hwui/AnimatedImageDrawable.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"hwui/Bitmap.cpp",
|
2021-02-12 21:20:33 -05:00
|
|
|
"hwui/BlurDrawLooper.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"hwui/Canvas.cpp",
|
2019-12-11 11:02:15 -05:00
|
|
|
"hwui/ImageDecoder.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"hwui/MinikinSkia.cpp",
|
|
|
|
"hwui/MinikinUtils.cpp",
|
|
|
|
"hwui/PaintImpl.cpp",
|
|
|
|
"hwui/Typeface.cpp",
|
|
|
|
"utils/Blur.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"utils/Color.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"utils/LinearAllocator.cpp",
|
|
|
|
"utils/VectorDrawableUtils.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"AnimationContext.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"Animator.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"AnimatorManager.cpp",
|
|
|
|
"CanvasTransform.cpp",
|
|
|
|
"DamageAccumulator.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"Interpolator.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"LightingInfo.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"Matrix.cpp",
|
|
|
|
"PathParser.cpp",
|
|
|
|
"Properties.cpp",
|
|
|
|
"PropertyValuesAnimatorSet.cpp",
|
|
|
|
"PropertyValuesHolder.cpp",
|
2019-06-18 15:51:57 +01:00
|
|
|
"RecordingCanvas.cpp",
|
|
|
|
"RenderNode.cpp",
|
|
|
|
"RenderProperties.cpp",
|
2019-07-04 09:41:13 +01:00
|
|
|
"RootRenderNode.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"SkiaCanvas.cpp",
|
2021-04-12 09:52:07 -04:00
|
|
|
"SkiaInterpolator.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"VectorDrawable.cpp",
|
|
|
|
],
|
|
|
|
|
2018-04-12 13:09:04 -07:00
|
|
|
proto: {
|
|
|
|
export_proto_headers: true,
|
|
|
|
},
|
|
|
|
|
2019-06-05 10:30:20 +01:00
|
|
|
target: {
|
|
|
|
android: {
|
2021-03-18 16:19:55 -07:00
|
|
|
header_libs: ["libandroid_headers_private"],
|
2021-02-03 23:19:29 +01:00
|
|
|
|
2019-06-05 10:30:20 +01:00
|
|
|
srcs: [
|
2020-01-29 15:23:26 +00:00
|
|
|
"hwui/AnimatedImageThread.cpp",
|
2020-01-07 17:21:49 -05:00
|
|
|
"pipeline/skia/ATraceMemoryDump.cpp",
|
2019-06-05 10:30:20 +01:00
|
|
|
"pipeline/skia/GLFunctorDrawable.cpp",
|
|
|
|
"pipeline/skia/LayerDrawable.cpp",
|
|
|
|
"pipeline/skia/ShaderCache.cpp",
|
|
|
|
"pipeline/skia/SkiaMemoryTracer.cpp",
|
|
|
|
"pipeline/skia/SkiaOpenGLPipeline.cpp",
|
|
|
|
"pipeline/skia/SkiaPipeline.cpp",
|
|
|
|
"pipeline/skia/SkiaProfileRenderer.cpp",
|
|
|
|
"pipeline/skia/SkiaVulkanPipeline.cpp",
|
|
|
|
"pipeline/skia/VkFunctorDrawable.cpp",
|
|
|
|
"pipeline/skia/VkInteropFunctorDrawable.cpp",
|
|
|
|
"renderstate/RenderState.cpp",
|
|
|
|
"renderthread/CacheManager.cpp",
|
|
|
|
"renderthread/CanvasContext.cpp",
|
|
|
|
"renderthread/DrawFrameTask.cpp",
|
|
|
|
"renderthread/EglManager.cpp",
|
|
|
|
"renderthread/ReliableSurface.cpp",
|
|
|
|
"renderthread/VulkanManager.cpp",
|
|
|
|
"renderthread/VulkanSurface.cpp",
|
|
|
|
"renderthread/RenderProxy.cpp",
|
|
|
|
"renderthread/RenderThread.cpp",
|
|
|
|
"service/GraphicsStatsService.cpp",
|
|
|
|
"thread/CommonPool.cpp",
|
|
|
|
"utils/GLUtils.cpp",
|
2020-01-29 11:04:40 -08:00
|
|
|
"utils/NdkUtils.cpp",
|
2019-06-05 10:30:20 +01:00
|
|
|
"utils/StringUtils.cpp",
|
2019-09-17 14:07:23 -04:00
|
|
|
"AutoBackendTextureRelease.cpp",
|
2019-06-05 10:30:20 +01:00
|
|
|
"DeferredLayerUpdater.cpp",
|
|
|
|
"DeviceInfo.cpp",
|
|
|
|
"FrameInfo.cpp",
|
|
|
|
"FrameInfoVisualizer.cpp",
|
|
|
|
"HardwareBitmapUploader.cpp",
|
|
|
|
"HWUIProperties.sysprop",
|
|
|
|
"JankTracker.cpp",
|
|
|
|
"Layer.cpp",
|
|
|
|
"LayerUpdateQueue.cpp",
|
|
|
|
"ProfileData.cpp",
|
|
|
|
"ProfileDataContainer.cpp",
|
|
|
|
"Readback.cpp",
|
|
|
|
"TreeInfo.cpp",
|
|
|
|
"WebViewFunctorManager.cpp",
|
|
|
|
"protos/graphicsstats.proto",
|
|
|
|
],
|
|
|
|
|
|
|
|
// Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
|
|
|
|
cflags: ["-Wno-implicit-fallthrough"],
|
|
|
|
},
|
|
|
|
host: {
|
2019-06-18 15:51:57 +01:00
|
|
|
srcs: [
|
|
|
|
"utils/HostColorSpace.cpp",
|
|
|
|
],
|
2019-06-05 10:30:20 +01:00
|
|
|
export_static_lib_headers: [
|
|
|
|
"libarect",
|
|
|
|
],
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
|
|
|
},
|
2017-04-19 15:25:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_library {
|
|
|
|
name: "libhwui",
|
2019-06-05 10:30:20 +01:00
|
|
|
host_supported: true,
|
2017-06-01 10:45:36 -07:00
|
|
|
defaults: [
|
|
|
|
"libhwui_defaults",
|
2019-10-24 11:49:54 -04:00
|
|
|
"android_graphics_apex",
|
|
|
|
"android_graphics_jni",
|
2021-04-23 14:09:16 -07:00
|
|
|
"linker_hugepage_aligned",
|
2017-10-13 11:42:13 -07:00
|
|
|
],
|
2019-10-24 11:49:54 -04:00
|
|
|
export_header_lib_headers: ["android_graphics_apex_headers"],
|
2020-04-09 09:44:54 -04:00
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
version_script: "libhwui.map.txt",
|
2021-03-18 16:19:55 -07:00
|
|
|
},
|
2020-04-09 09:44:54 -04:00
|
|
|
},
|
2017-04-19 15:25:25 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_library_static {
|
2019-05-29 16:55:06 -07:00
|
|
|
name: "libhwui_static",
|
2017-04-19 15:25:25 -07:00
|
|
|
defaults: [
|
|
|
|
"libhwui_defaults",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "hwui_test_defaults",
|
|
|
|
defaults: ["hwui_defaults"],
|
|
|
|
test_suites: ["device-tests"],
|
2021-02-03 23:19:29 +01:00
|
|
|
header_libs: ["libandroid_headers_private"],
|
2020-01-28 09:22:33 -08:00
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
shared_libs: [
|
2021-03-18 16:19:55 -07:00
|
|
|
"libgui",
|
|
|
|
"libui",
|
|
|
|
],
|
|
|
|
},
|
2020-01-28 09:22:33 -08:00
|
|
|
},
|
2017-04-19 15:25:25 -07:00
|
|
|
srcs: [
|
|
|
|
"tests/common/scenes/*.cpp",
|
|
|
|
"tests/common/LeakChecker.cpp",
|
|
|
|
"tests/common/TestListViewSceneBase.cpp",
|
|
|
|
"tests/common/TestContext.cpp",
|
|
|
|
"tests/common/TestScene.cpp",
|
|
|
|
"tests/common/TestUtils.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------
|
|
|
|
// unit tests
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "hwui_unit_tests",
|
2020-04-06 11:43:59 -04:00
|
|
|
defaults: [
|
|
|
|
"hwui_test_defaults",
|
|
|
|
"android_graphics_apex",
|
|
|
|
"android_graphics_jni",
|
|
|
|
],
|
2017-04-19 15:25:25 -07:00
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libgmock",
|
2019-05-29 16:55:06 -07:00
|
|
|
"libhwui_static",
|
2017-04-19 15:25:25 -07:00
|
|
|
],
|
2018-01-26 11:59:14 -08:00
|
|
|
shared_libs: [
|
|
|
|
"libmemunreachable",
|
|
|
|
],
|
2017-04-19 15:25:25 -07:00
|
|
|
srcs: [
|
|
|
|
"tests/unit/main.cpp",
|
2020-04-06 11:43:59 -04:00
|
|
|
"tests/unit/ABitmapTests.cpp",
|
2017-06-01 13:07:39 -04:00
|
|
|
"tests/unit/CacheManagerTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/CanvasContextTests.cpp",
|
2020-10-29 20:53:51 -04:00
|
|
|
"tests/unit/CanvasOpTests.cpp",
|
2020-11-16 12:35:02 -05:00
|
|
|
"tests/unit/CanvasFrontendTests.cpp",
|
2019-03-14 13:15:28 -07:00
|
|
|
"tests/unit/CommonPoolTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/DamageAccumulatorTests.cpp",
|
|
|
|
"tests/unit/DeferredLayerUpdaterTests.cpp",
|
2021-01-19 21:29:24 -05:00
|
|
|
"tests/unit/EglManagerTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/FatVectorTests.cpp",
|
|
|
|
"tests/unit/GraphicsStatsServiceTests.cpp",
|
2021-01-19 00:08:02 +01:00
|
|
|
"tests/unit/JankTrackerTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/LayerUpdateQueueTests.cpp",
|
|
|
|
"tests/unit/LinearAllocatorTests.cpp",
|
|
|
|
"tests/unit/MatrixTests.cpp",
|
2020-12-15 13:39:22 -05:00
|
|
|
"tests/unit/OpBufferTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/PathInterpolatorTests.cpp",
|
|
|
|
"tests/unit/RenderNodeDrawableTests.cpp",
|
|
|
|
"tests/unit/RenderNodeTests.cpp",
|
|
|
|
"tests/unit/RenderPropertiesTests.cpp",
|
2019-02-19 10:38:50 -08:00
|
|
|
"tests/unit/RenderThreadTests.cpp",
|
2017-10-09 15:49:32 -04:00
|
|
|
"tests/unit/ShaderCacheTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/SkiaBehaviorTests.cpp",
|
|
|
|
"tests/unit/SkiaDisplayListTests.cpp",
|
|
|
|
"tests/unit/SkiaPipelineTests.cpp",
|
|
|
|
"tests/unit/SkiaRenderPropertiesTests.cpp",
|
|
|
|
"tests/unit/SkiaCanvasTests.cpp",
|
2021-05-21 12:52:05 -07:00
|
|
|
"tests/unit/StretchEffectTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/StringUtilsTests.cpp",
|
|
|
|
"tests/unit/TestUtilsTests.cpp",
|
2017-10-23 13:10:41 -07:00
|
|
|
"tests/unit/ThreadBaseTests.cpp",
|
|
|
|
"tests/unit/TypefaceTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/unit/VectorDrawableTests.cpp",
|
2018-12-13 16:40:14 -08:00
|
|
|
"tests/unit/WebViewFunctorManagerTests.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------
|
|
|
|
// Macro-bench app
|
|
|
|
// ------------------------
|
|
|
|
|
|
|
|
cc_benchmark {
|
|
|
|
name: "hwuimacro",
|
|
|
|
defaults: ["hwui_test_defaults"],
|
|
|
|
|
2019-05-29 16:55:06 -07:00
|
|
|
static_libs: ["libhwui"],
|
2018-01-26 11:59:14 -08:00
|
|
|
shared_libs: [
|
|
|
|
"libmemunreachable",
|
|
|
|
],
|
2017-04-19 15:25:25 -07:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/macrobench/TestSceneRunner.cpp",
|
|
|
|
"tests/macrobench/main.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------
|
|
|
|
// Micro-bench app
|
|
|
|
// ---------------------
|
|
|
|
|
|
|
|
cc_benchmark {
|
|
|
|
name: "hwuimicro",
|
|
|
|
defaults: ["hwui_test_defaults"],
|
|
|
|
|
2019-05-29 16:55:06 -07:00
|
|
|
static_libs: ["libhwui_static"],
|
2018-01-26 11:59:14 -08:00
|
|
|
shared_libs: [
|
|
|
|
"libmemunreachable",
|
|
|
|
],
|
2017-04-19 15:25:25 -07:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/microbench/main.cpp",
|
2020-12-09 13:45:39 -05:00
|
|
|
"tests/microbench/CanvasOpBench.cpp",
|
2017-04-19 15:25:25 -07:00
|
|
|
"tests/microbench/DisplayListCanvasBench.cpp",
|
|
|
|
"tests/microbench/LinearAllocatorBench.cpp",
|
|
|
|
"tests/microbench/PathParserBench.cpp",
|
|
|
|
"tests/microbench/RenderNodeBench.cpp",
|
|
|
|
],
|
|
|
|
}
|
2017-11-17 11:32:16 -08:00
|
|
|
|
|
|
|
// ----------------------------------------
|
|
|
|
// Phony target to build benchmarks for PGO
|
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
phony {
|
|
|
|
name: "pgo-targets-hwui",
|
|
|
|
required: [
|
|
|
|
"hwuimicro",
|
|
|
|
"hwuimacro",
|
2021-03-18 16:19:55 -07:00
|
|
|
],
|
2017-11-17 11:32:16 -08:00
|
|
|
}
|