gralloc: expose Gralloc4 get/dump functions
Expose Gralloc4 functions up to GraphicBufferAllocator/Mapper.
By adding the functions to GraphicBufferAllocator/Mapper,
the rest of the system can depend on GraphicBufferAllocator/Mapper
instead of talking directly to IAllocator/IMapper.
Bug: 141632767
Test: Implementation will be tested through
VtsHalGraphicsMapperV4_0TargetTest
Framework plumbing will be testing when it is exposed to
GraphicBuffer
Change-Id: Ie74a335a9d3a1e085e9fa186b327be8d21e870de
diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp
index 0e23ddf..040a62b 100644
--- a/libs/ui/Gralloc2.cpp
+++ b/libs/ui/Gralloc2.cpp
@@ -351,12 +351,6 @@
return releaseFence;
}
-status_t Gralloc2Mapper::isSupported(uint32_t /*width*/, uint32_t /*height*/,
- android::PixelFormat /*format*/, uint32_t /*layerCount*/,
- uint64_t /*usage*/, bool* /*outSupported*/) const {
- return INVALID_OPERATION;
-}
-
Gralloc2Allocator::Gralloc2Allocator(const Gralloc2Mapper& mapper) : mMapper(mapper) {
mAllocator = IAllocator::getService();
if (mAllocator == nullptr) {
@@ -369,7 +363,7 @@
return mAllocator != nullptr;
}
-std::string Gralloc2Allocator::dumpDebugInfo() const {
+std::string Gralloc2Allocator::dumpDebugInfo(bool /*less*/) const {
std::string debugInfo;
mAllocator->dumpDebugInfo([&](const auto& tmpDebugInfo) {
@@ -379,10 +373,10 @@
return debugInfo;
}
-status_t Gralloc2Allocator::allocate(uint32_t width, uint32_t height, PixelFormat format,
- uint32_t layerCount, uint64_t usage, uint32_t bufferCount,
- uint32_t* outStride, buffer_handle_t* outBufferHandles,
- bool importBuffers) const {
+status_t Gralloc2Allocator::allocate(std::string /*requestorName*/, uint32_t width, uint32_t height,
+ PixelFormat format, uint32_t layerCount, uint64_t usage,
+ uint32_t bufferCount, uint32_t* outStride,
+ buffer_handle_t* outBufferHandles, bool importBuffers) const {
IMapper::BufferDescriptorInfo descriptorInfo = {};
descriptorInfo.width = width;
descriptorInfo.height = height;