blob: 339f83b5f009334603a74b7ff698f61f4cc0225d [file] [log] [blame]
cc_defaults {
name: "surfaceflinger_defaults",
cflags: [
"-DLOG_TAG=\"SurfaceFlinger\"",
"-Wall",
"-Werror",
"-Wformat",
"-Wthread-safety",
"-Wunused",
"-Wunreachable-code",
],
cppflags: ["-std=c++1z"],
}
cc_defaults {
name: "libsurfaceflinger_defaults",
defaults: ["surfaceflinger_defaults"],
cflags: [
"-DGL_GLEXT_PROTOTYPES",
"-DEGL_EGLEXT_PROTOTYPES",
],
include_dirs: [
"frameworks/native/vulkan/vkjson",
"frameworks/native/vulkan/include",
],
shared_libs: [
"android.frameworks.vr.composer@1.0",
"android.hardware.configstore-utils",
"android.hardware.configstore@1.0",
"android.hardware.configstore@1.1",
"android.hardware.configstore@1.2",
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.3",
"android.hardware.power@1.0",
"android.hardware.power@1.3",
"libbase",
"libbinder",
"libbufferhubqueue",
"libcutils",
"libdl",
"libEGL",
"libfmq",
"libGLESv1_CM",
"libGLESv2",
"libgui",
"libhardware",
"libhidlbase",
"libhidltransport",
"libhwbinder",
"liblayers_proto",
"liblog",
"libnativewindow",
"libpdx_default_transport",
"libprotobuf-cpp-lite",
"libsync",
"libtimestats_proto",
"libui",
"libutils",
"libvulkan",
],
static_libs: [
"librenderengine",
"libserviceutils",
"libtrace_proto",
"libvkjson",
"libvr_manager",
"libvrflinger",
],
header_libs: [
"android.hardware.graphics.composer@2.1-command-buffer",
"android.hardware.graphics.composer@2.2-command-buffer",
"android.hardware.graphics.composer@2.3-command-buffer",
],
export_static_lib_headers: [
"librenderengine",
"libserviceutils",
],
export_shared_lib_headers: [
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.3",
"android.hardware.power@1.3",
"libhidlbase",
"libhidltransport",
"libhwbinder",
],
}
cc_defaults {
name: "libsurfaceflinger_production_defaults",
defaults: ["libsurfaceflinger_defaults"],
cflags: [
"-fvisibility=hidden",
"-fwhole-program-vtables", // requires ThinLTO
],
lto: {
thin: true,
},
}
cc_library_headers {
name: "libsurfaceflinger_headers",
export_include_dirs: ["."],
static_libs: ["libserviceutils"],
export_static_lib_headers: ["libserviceutils"],
}
filegroup {
name: "libsurfaceflinger_sources",
srcs: [
"BufferLayer.cpp",
"BufferLayerConsumer.cpp",
"BufferQueueLayer.cpp",
"BufferStateLayer.cpp",
"Client.cpp",
"ColorLayer.cpp",
"ContainerLayer.cpp",
"DisplayDevice.cpp",
"DisplayHardware/ComposerHal.cpp",
"DisplayHardware/DisplayIdentification.cpp",
"DisplayHardware/FramebufferSurface.cpp",
"DisplayHardware/HWC2.cpp",
"DisplayHardware/HWComposer.cpp",
"DisplayHardware/HWComposerBufferCache.cpp",
"DisplayHardware/PowerAdvisor.cpp",
"DisplayHardware/VirtualDisplaySurface.cpp",
"Effects/Daltonizer.cpp",
"EventLog/EventLog.cpp",
"FrameTracker.cpp",
"GpuService.cpp",
"Layer.cpp",
"LayerBE.cpp",
"LayerProtoHelper.cpp",
"LayerRejecter.cpp",
"LayerStats.cpp",
"LayerVector.cpp",
"MonitoredProducer.cpp",
"NativeWindowSurface.cpp",
"RenderArea.cpp",
"Scheduler/DispSync.cpp",
"Scheduler/DispSyncSource.cpp",
"Scheduler/EventControlThread.cpp",
"Scheduler/EventThread.cpp",
"Scheduler/MessageQueue.cpp",
"Scheduler/Scheduler.cpp",
"StartPropertySetThread.cpp",
"SurfaceFlinger.cpp",
"SurfaceInterceptor.cpp",
"SurfaceTracing.cpp",
"TimeStats/TimeStats.cpp",
],
}
cc_library_shared {
// Please use libsurfaceflinger_defaults to configure how the sources are
// built, so the same settings can be used elsewhere.
name: "libsurfaceflinger",
defaults: ["libsurfaceflinger_production_defaults"],
srcs: [
":libsurfaceflinger_sources",
// Note: SurfaceFlingerFactory is not in the default sources so that it
// can be easily replaced.
"SurfaceFlingerFactory.cpp",
],
logtags: ["EventLog/EventLogTags.logtags"],
}
cc_defaults {
name: "libsurfaceflinger_binary",
defaults: ["surfaceflinger_defaults"],
whole_static_libs: [
"libsigchain",
],
shared_libs: [
"android.frameworks.displayservice@1.0",
"android.hardware.configstore-utils",
"android.hardware.configstore@1.0",
"android.hardware.configstore@1.2",
"android.hardware.graphics.allocator@2.0",
"libbinder",
"libcutils",
"libdisplayservicehidl",
"libhidlbase",
"libhidltransport",
"liblayers_proto",
"liblog",
"libtimestats_proto",
"libutils",
],
static_libs: [
"libserviceutils",
"libtrace_proto",
],
ldflags: ["-Wl,--export-dynamic"],
}
filegroup {
name: "surfaceflinger_binary_sources",
srcs: ["main_surfaceflinger.cpp"],
}
cc_binary {
name: "surfaceflinger",
defaults: ["libsurfaceflinger_binary"],
init_rc: ["surfaceflinger.rc"],
srcs: [":surfaceflinger_binary_sources"],
shared_libs: ["libsurfaceflinger"],
}
cc_library_shared {
name: "libsurfaceflinger_ddmconnection",
defaults: ["surfaceflinger_defaults"],
srcs: ["DdmConnection.cpp"],
shared_libs: [
"libcutils",
"libdl",
"liblog",
],
product_variables: {
// uses jni which may not be available in PDK
pdk: {
enabled: false,
},
},
}
subdirs = [
"layerproto",
"TimeStats/timestatsproto",
"tests",
]