graphics: add a default implementation to IAllocator
The default implementatoin is built on top of conventional gralloc1.
This also adds a static library, libgralloc1-adapter. It is intended to
ease the porting of gralloc0 to gralloc1.
Test: booted to launcher, tested with YouTube and some games.
Change-Id: Id640b1d5a1e1eea1aafabb6c134e6be6e71afff5
diff --git a/graphics/allocator/2.0/default/Android.bp b/graphics/allocator/2.0/default/Android.bp
new file mode 100644
index 0000000..9a24773
--- /dev/null
+++ b/graphics/allocator/2.0/default/Android.bp
@@ -0,0 +1,24 @@
+cc_library_shared {
+ name: "android.hardware.graphics.allocator@2.0-impl",
+ relative_install_path: "hw",
+ srcs: ["Gralloc.cpp"],
+ cppflags: ["-Wall", "-Wextra"],
+ shared_libs: [
+ "android.hardware.graphics.allocator@2.0",
+ "libbase",
+ "libcutils",
+ "libhardware",
+ "libhidl",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ ],
+}
+
+cc_library_static {
+ name: "libgralloc1-adapter",
+ srcs: ["gralloc1-adapter.c"],
+ include_dirs: ["system/core/libsync/include"],
+ cflags: ["-Wall", "-Wextra", "-Wno-unused-parameter"],
+ export_include_dirs: ["."],
+}