diff options
author | 2019-12-12 14:26:59 -0800 | |
---|---|---|
committer | 2019-12-16 09:30:50 -0800 | |
commit | 317482c2e910aeab2eaac0bfe0d12d2843ecce8a (patch) | |
tree | 5e0b5510707190fb0e49eeef3254b211c36b88e3 /libs/ui/Gralloc4.cpp | |
parent | e33b053781ef12815b1e3da6c28b469595a2deb0 (diff) |
gralloc: add gralloc4 HDR metadata support
Add the ability to get and set HDR metadata.
Bug: 141632767
Test: VtsHalGraphicsMapperV4_0TargetTest
Change-Id: If6beca4b4280b3b94ef4fd295d530f067c7c3e59
Diffstat (limited to 'libs/ui/Gralloc4.cpp')
-rw-r--r-- | libs/ui/Gralloc4.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/ui/Gralloc4.cpp b/libs/ui/Gralloc4.cpp index 2c897cf4ff..30c48c8dc6 100644 --- a/libs/ui/Gralloc4.cpp +++ b/libs/ui/Gralloc4.cpp @@ -614,6 +614,24 @@ status_t Gralloc4Mapper::getBlendMode(buffer_handle_t bufferHandle, outBlendMode); } +status_t Gralloc4Mapper::getSmpte2086(buffer_handle_t bufferHandle, + std::optional<ui::Smpte2086>* outSmpte2086) const { + return get(bufferHandle, gralloc4::MetadataType_Smpte2086, gralloc4::decodeSmpte2086, + outSmpte2086); +} + +status_t Gralloc4Mapper::getCta861_3(buffer_handle_t bufferHandle, + std::optional<ui::Cta861_3>* outCta861_3) const { + return get(bufferHandle, gralloc4::MetadataType_Cta861_3, gralloc4::decodeCta861_3, + outCta861_3); +} + +status_t Gralloc4Mapper::getSmpte2094_40( + buffer_handle_t bufferHandle, std::optional<std::vector<uint8_t>>* outSmpte2094_40) const { + return get(bufferHandle, gralloc4::MetadataType_Smpte2094_40, gralloc4::decodeSmpte2094_40, + outSmpte2094_40); +} + template <class T> status_t Gralloc4Mapper::getDefault(uint32_t width, uint32_t height, PixelFormat format, uint32_t layerCount, uint64_t usage, |