libui: Convert Allocator and Mapper to gralloc1
Converts GraphicBufferAllocator and GraphicBufferMapper to speak
gralloc 1.0 (via the C++ shim and optionally the 1On0 adapter) instead
of gralloc 0.x.
Bug: 28401203
Change-Id: Ie1649f0ee72801579be2c2d3c47177b52962a825
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 4fe0946..f28af6e 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -169,8 +169,8 @@
{
GraphicBufferAllocator& allocator = GraphicBufferAllocator::get();
uint32_t outStride = 0;
- status_t err = allocator.alloc(inWidth, inHeight, inFormat, inUsage,
- &handle, &outStride);
+ status_t err = allocator.allocate(inWidth, inHeight, inFormat, inUsage,
+ &handle, &outStride, mId);
if (err == NO_ERROR) {
width = static_cast<int>(inWidth);
height = static_cast<int>(inHeight);
@@ -390,7 +390,7 @@
mOwner = ownHandle;
if (handle != 0) {
- status_t err = mBufferMapper.registerBuffer(handle);
+ status_t err = mBufferMapper.registerBuffer(this);
if (err != NO_ERROR) {
width = height = stride = format = usage = 0;
handle = NULL;