libui: update for IAllocator changes
Create an IAllocatorClient to allocate/free graphics buffers.
Test: builds and boots
Change-Id: I9978b61ee2cb6302cce34ed6d740a5616fb7e8f1
diff --git a/include/ui/GrallocAllocator.h b/include/ui/GrallocAllocator.h
index e3c4248..5645bed 100644
--- a/include/ui/GrallocAllocator.h
+++ b/include/ui/GrallocAllocator.h
@@ -32,6 +32,7 @@
using hardware::graphics::allocator::V2_0::BufferDescriptor;
using hardware::graphics::allocator::V2_0::Buffer;
using hardware::graphics::allocator::V2_0::IAllocator;
+using hardware::graphics::allocator::V2_0::IAllocatorClient;
using hardware::graphics::common::V1_0::PixelFormat;
// Allocator is a wrapper to IAllocator, a proxy to server-side allocator.
@@ -40,12 +41,12 @@
Allocator();
// this will be removed and Allocator will be always valid
- bool valid() const { return (mService != nullptr); }
+ bool valid() const { return (mAllocator != nullptr); }
std::string dumpDebugInfo() const;
Error createBufferDescriptor(
- const IAllocator::BufferDescriptorInfo& descriptorInfo,
+ const IAllocatorClient::BufferDescriptorInfo& descriptorInfo,
BufferDescriptor& descriptor) const;
void destroyBufferDescriptor(BufferDescriptor descriptor) const;
@@ -56,7 +57,8 @@
native_handle_t*& bufferHandle) const;
private:
- sp<IAllocator> mService;
+ sp<IAllocator> mAllocator;
+ sp<IAllocatorClient> mClient;
};
} // namespace Gralloc2