diff options
author | Valerie Hau <vhau@google.com> | 2020-03-31 22:59:27 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-31 22:59:27 +0000 |
commit | 28fcdf27e4dc52a2de120bd91c043577e2d52ce3 (patch) | |
tree | 15d9370a6421a21b657560f791f51c27595b0b47 | |
parent | 8438a18c576cb81c4fb1944833a5ecdea72a47c5 (diff) | |
parent | 2229623f1fb38706f7d52d28bd43f8553ad4203a (diff) | |
download | platform_hardware_interfaces-28fcdf27e4dc52a2de120bd91c043577e2d52ce3.tar.gz platform_hardware_interfaces-28fcdf27e4dc52a2de120bd91c043577e2d52ce3.tar.bz2 platform_hardware_interfaces-28fcdf27e4dc52a2de120bd91c043577e2d52ce3.zip |
Merge "Relax constraints on getting PlaneLayouts" into rvc-dev
-rw-r--r-- | graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp index 5c8d0d8ed0..0689919ab5 100644 --- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp +++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp @@ -1865,13 +1865,15 @@ TEST_P(GraphicsMapperHidlTest, GetFromBufferDescriptorInfoChromaSiting) { */ TEST_P(GraphicsMapperHidlTest, GetFromBufferDescriptorInfoPlaneLayouts) { hidl_vec<uint8_t> vec; - ASSERT_EQ(Error::NONE, - mGralloc->getFromBufferDescriptorInfo(mDummyDescriptorInfo, - gralloc4::MetadataType_PlaneLayouts, &vec)); - - std::vector<PlaneLayout> planeLayouts; - ASSERT_EQ(NO_ERROR, gralloc4::decodePlaneLayouts(vec, &planeLayouts)); - ASSERT_NO_FATAL_FAILURE(verifyDummyDescriptorInfoPlaneLayouts(planeLayouts)); + const auto ret = mGralloc->getFromBufferDescriptorInfo( + mDummyDescriptorInfo, gralloc4::MetadataType_PlaneLayouts, &vec); + if (ret == Error::NONE) { + std::vector<PlaneLayout> planeLayouts; + ASSERT_EQ(NO_ERROR, gralloc4::decodePlaneLayouts(vec, &planeLayouts)); + ASSERT_NO_FATAL_FAILURE(verifyDummyDescriptorInfoPlaneLayouts(planeLayouts)); + } else { + ASSERT_EQ(Error::UNSUPPORTED, ret); + } } /** |