From 7b4e37a989e71e34524863e9f02d526c5ea1d088 Mon Sep 17 00:00:00 2001 From: Valerie Hau Date: Mon, 11 May 2020 12:29:03 -0700 Subject: [PATCH] Allow for failure in allocation for MapperVts Bug: 155942443 Test: build, boot Change-Id: I8698e4cf117d54a6d2ff128cc2e503308188c7e6 --- graphics/mapper/4.0/utils/vts/MapperVts.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/graphics/mapper/4.0/utils/vts/MapperVts.cpp b/graphics/mapper/4.0/utils/vts/MapperVts.cpp index cb90fa0597..9f907e6bbe 100644 --- a/graphics/mapper/4.0/utils/vts/MapperVts.cpp +++ b/graphics/mapper/4.0/utils/vts/MapperVts.cpp @@ -90,6 +90,9 @@ std::vector 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";