Merge "Allow for failure in allocation for MapperVts" into rvc-dev am: f207cca044 am: 33569f0bc0 am: 1bb7e6a864

Change-Id: Ibcc230ce5ecea0d86191ad32e2446b55af9e954b
This commit is contained in:
Valerie Hau
2020-05-12 00:19:15 +00:00
committed by Automerger Merge Worker

View File

@@ -90,6 +90,9 @@ std::vector<const native_handle_t*> Gralloc::allocate(const BufferDescriptor& de
mAllocator->allocate(
descriptor, count,
[&](const auto& tmpError, const auto& tmpStride, const auto& tmpBuffers) {
if (allowFailure && tmpError == Error::UNSUPPORTED) {
return;
}
ASSERT_EQ(Error::NONE, tmpError) << "failed to allocate buffers";
ASSERT_EQ(count, tmpBuffers.size()) << "invalid buffer array";