Merge "Update Mapper4 SetBadMetadata VTS test for optional metadata"

This commit is contained in:
Treehugger Robot 2022-05-19 20:22:26 +00:00 committed by Gerrit Code Review
commit 40800aa0cb

View file

@ -2001,6 +2001,11 @@ TEST_P(GraphicsMapperHidlTest, SetBadMetadata) {
mGralloc->set(bufferHandle, gralloc4::MetadataType_Dataspace, vec)); mGralloc->set(bufferHandle, gralloc4::MetadataType_Dataspace, vec));
ASSERT_EQ(Error::UNSUPPORTED, ASSERT_EQ(Error::UNSUPPORTED,
mGralloc->set(bufferHandle, gralloc4::MetadataType_BlendMode, vec)); mGralloc->set(bufferHandle, gralloc4::MetadataType_BlendMode, vec));
// Keep optional metadata types below and populate the encoded metadata vec
// with some arbitrary different metadata because the common gralloc4::decode*()
// functions do not distinguish between an empty vec and bad value.
ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
ASSERT_EQ(Error::UNSUPPORTED, ASSERT_EQ(Error::UNSUPPORTED,
mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec)); mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
ASSERT_EQ(Error::UNSUPPORTED, ASSERT_EQ(Error::UNSUPPORTED,