mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Relax constraints on getting PlaneLayouts
PlaneLayouts may only be known at allocation time. Bug: 152806713 Test: build, boot Change-Id: Ic878943b405469a70a685a895c04a1d4e2678686
This commit is contained in:
@@ -1855,13 +1855,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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user