blob: b501d40f2649d127ba987b7d93936633bc738c96 [file] [log] [blame]
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "frameworks_native_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["frameworks_native_license"],
default_team: "trendy_team_android_core_graphics_stack",
}
cc_defaults {
name: "renderengine_defaults",
cflags: [
"-DLOG_TAG=\"RenderEngine\"",
"-Wall",
"-Werror",
"-Wthread-safety",
"-Wunused",
"-Wunreachable-code",
],
}
cc_defaults {
name: "librenderengine_defaults",
defaults: [
"android.hardware.graphics.composer3-ndk_shared",
"renderengine_defaults",
],
cflags: [
"-DGL_GLEXT_PROTOTYPES",
"-DEGL_EGLEXT_PROTOTYPES",
],
shared_libs: [
"libbase",
"libcutils",
"libEGL",
"libGLESv1_CM",
"libGLESv2",
"libgui",
"liblog",
"libnativewindow",
"libprocessgroup",
"libsync",
"libui",
"libutils",
"libvulkan",
],
static_libs: [
"libshaders",
"libtonemap",
"libsurfaceflinger_common",
],
local_include_dirs: ["include"],
export_include_dirs: ["include"],
}
// Needed by FlagManager to access a #define.
cc_library_static {
name: "librenderengine_includes",
local_include_dirs: ["include"],
export_include_dirs: ["include"],
}
filegroup {
name: "librenderengine_sources",
srcs: [
"ExternalTexture.cpp",
"RenderEngine.cpp",
],
}
filegroup {
name: "librenderengine_threaded_sources",
srcs: [
"threaded/RenderEngineThreaded.cpp",
],
}
filegroup {
name: "librenderengine_skia_sources",
srcs: [
"skia/AutoBackendTexture.cpp",
"skia/Cache.cpp",
"skia/ColorSpaces.cpp",
"skia/GLExtensions.cpp",
"skia/SkiaRenderEngine.cpp",
"skia/SkiaGLRenderEngine.cpp",
"skia/SkiaVkRenderEngine.cpp",
"skia/debug/CaptureTimer.cpp",
"skia/debug/CommonPool.cpp",
"skia/debug/SkiaCapture.cpp",
"skia/debug/SkiaMemoryReporter.cpp",
"skia/filters/BlurFilter.cpp",
"skia/filters/GaussianBlurFilter.cpp",
"skia/filters/KawaseBlurFilter.cpp",
"skia/filters/LinearEffect.cpp",
"skia/filters/StretchShaderFactory.cpp",
],
}
// Used to consolidate and simplify pulling Skia & Skia deps into targets that depend on
// librenderengine. This allows shared deps to be deduplicated (e.g. Perfetto), which doesn't seem
// possible if libskia_renderengine is just pulled into librenderengine via whole_static_libs.
cc_defaults {
name: "librenderengine_deps",
defaults: ["skia_renderengine_deps"],
static_libs: ["libskia_renderengine"],
}
// Note: if compilation fails when adding librenderengine as a dependency, try adding
// librenderengine_deps to the defaults field of your dependent target.
cc_library_static {
name: "librenderengine",
defaults: [
"librenderengine_defaults",
"librenderengine_deps",
],
double_loadable: true,
cflags: [
"-fvisibility=hidden",
"-Werror=format",
"-Wno-unused-parameter",
],
srcs: [
":librenderengine_sources",
":librenderengine_threaded_sources",
":librenderengine_skia_sources",
],
header_libs: [
"libtonemap_headers",
],
include_dirs: [
"external/skia/src/gpu",
],
lto: {
thin: true,
},
}
cc_library_static {
name: "librenderengine_mocks",
defaults: ["librenderengine_defaults"],
srcs: [
"mock/RenderEngine.cpp",
],
static_libs: [
"libgtest",
"libgmock",
],
local_include_dirs: ["include"],
export_include_dirs: ["include"],
}