summaryrefslogtreecommitdiff
path: root/hwc3/impl/HalImpl.cpp
diff options
context:
space:
mode:
authorLong Ling <longling@google.com>2022-02-18 09:57:06 -0800
committerLong Ling <longling@google.com>2022-02-18 13:51:15 -0800
commitab41f421c73e1eb42f7185a1a2fdbed7ff0253fe (patch)
tree0354da8f0b1bc1ef62d076de0d0ffc11f04e15b6 /hwc3/impl/HalImpl.cpp
parent3a03279070e0c6da71766d634ef2be2193d7b94e (diff)
hwc3: update count of PerFrameMetadataKeys
count should be index + 1 Bug: 216393140 Test: check hdr10+ playback Change-Id: Iecd6d85b754139145588f8dcdebd44a32ca528ea
Diffstat (limited to 'hwc3/impl/HalImpl.cpp')
-rw-r--r--hwc3/impl/HalImpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index 17fc4b2..eb82a70 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -461,9 +461,9 @@ int32_t HalImpl::getPerFrameMetadataKeys(int64_t display,
uint32_t numKeys = 0;
auto resManager = mDevice->mResourceManager;
if (resManager->hasHDR10PlusMPP()) {
- numKeys = HWC2_HDR10_PLUS_SEI;
+ numKeys = HWC2_HDR10_PLUS_SEI + 1;
} else {
- numKeys = HWC2_MAX_FRAME_AVERAGE_LIGHT_LEVEL;
+ numKeys = HWC2_MAX_FRAME_AVERAGE_LIGHT_LEVEL + 1;
}
for (uint32_t i = 0; i < numKeys; ++i) {
PerFrameMetadataKey key;