From b511645d9956cf3267e5244295197146d4a69d45 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 15 Dec 2017 14:41:42 -0800 Subject: [PATCH] graphics: make allocator default impl a static library Convert the default impl into a static library, android.hardware.graphics.allocator@2.0-passthrough. Test: boots and VTS Change-Id: I8ec8b30766462ecb3fb789af7c6dbb3c088ccf57 --- graphics/allocator/2.0/default/Android.bp | 11 ++++----- .../2.0/utils/passthrough/Android.bp | 23 +++++++++++++++++++ .../passthrough}/Gralloc0Allocator.cpp | 0 .../passthrough}/Gralloc0Allocator.h | 0 .../passthrough}/Gralloc1Allocator.cpp | 0 .../passthrough}/Gralloc1Allocator.h | 0 6 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 graphics/allocator/2.0/utils/passthrough/Android.bp rename graphics/allocator/2.0/{default => utils/passthrough}/Gralloc0Allocator.cpp (100%) rename graphics/allocator/2.0/{default => utils/passthrough}/Gralloc0Allocator.h (100%) rename graphics/allocator/2.0/{default => utils/passthrough}/Gralloc1Allocator.cpp (100%) rename graphics/allocator/2.0/{default => utils/passthrough}/Gralloc1Allocator.h (100%) diff --git a/graphics/allocator/2.0/default/Android.bp b/graphics/allocator/2.0/default/Android.bp index 7964032548..f100d96030 100644 --- a/graphics/allocator/2.0/default/Android.bp +++ b/graphics/allocator/2.0/default/Android.bp @@ -1,10 +1,12 @@ cc_library_shared { name: "android.hardware.graphics.allocator@2.0-impl", defaults: ["hidl_defaults"], - proprietary: true, + vendor: true, relative_install_path: "hw", - srcs: ["Gralloc.cpp", "Gralloc0Allocator.cpp", "Gralloc1Allocator.cpp"], - cppflags: ["-Wall", "-Wextra"], + srcs: ["Gralloc.cpp"], + static_libs: [ + "android.hardware.graphics.allocator@2.0-passthrough", + ], shared_libs: [ "android.hardware.graphics.allocator@2.0", "libbase", @@ -15,9 +17,6 @@ cc_library_shared { "liblog", "libutils", ], - header_libs: [ - "libgrallocmapperincludes", - ], } cc_binary { diff --git a/graphics/allocator/2.0/utils/passthrough/Android.bp b/graphics/allocator/2.0/utils/passthrough/Android.bp new file mode 100644 index 0000000000..fe7096188b --- /dev/null +++ b/graphics/allocator/2.0/utils/passthrough/Android.bp @@ -0,0 +1,23 @@ +cc_library_static { + name: "android.hardware.graphics.allocator@2.0-passthrough", + defaults: ["hidl_defaults"], + vendor: true, + srcs: [ + "Gralloc0Allocator.cpp", + "Gralloc1Allocator.cpp", + ], + shared_libs: [ + "android.hardware.graphics.allocator@2.0", + "android.hardware.graphics.mapper@2.0", + "libhardware", + ], + export_shared_lib_headers: [ + "android.hardware.graphics.allocator@2.0", + "android.hardware.graphics.mapper@2.0", + "libhardware", + ], + export_include_dirs: ["."], + header_libs: [ + "libgrallocmapperincludes", + ], +} diff --git a/graphics/allocator/2.0/default/Gralloc0Allocator.cpp b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp similarity index 100% rename from graphics/allocator/2.0/default/Gralloc0Allocator.cpp rename to graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.cpp diff --git a/graphics/allocator/2.0/default/Gralloc0Allocator.h b/graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h similarity index 100% rename from graphics/allocator/2.0/default/Gralloc0Allocator.h rename to graphics/allocator/2.0/utils/passthrough/Gralloc0Allocator.h diff --git a/graphics/allocator/2.0/default/Gralloc1Allocator.cpp b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp similarity index 100% rename from graphics/allocator/2.0/default/Gralloc1Allocator.cpp rename to graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.cpp diff --git a/graphics/allocator/2.0/default/Gralloc1Allocator.h b/graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h similarity index 100% rename from graphics/allocator/2.0/default/Gralloc1Allocator.h rename to graphics/allocator/2.0/utils/passthrough/Gralloc1Allocator.h