summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTharaga Balachandran <tbalacha@codeaurora.org>2020-05-13 17:18:25 -0400
committerGerrit - the friendly Code Review server <code-review@localhost>2020-06-26 00:34:48 -0700
commit4629b4eadcfd2994d566a3999f275a38365431a8 (patch)
tree71f4ded2f1eb784c481016396f63156e8a76f299
parent5bd7ab519a93d6314895230c14521262057d5876 (diff)
gralloc: Update get behaviour for interlaced metadata
If the interlaced metadata is not set, return standard metadata value Interlaced_None instead of Interlaced_Qti. Change-Id: Ib3ea47c1a6883bc6a8c4751f7309d7e76af7f851 CRs-Fixed: 2685558
-rw-r--r--gralloc/gr_buf_mgr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index a557886c..539bb000 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -1111,7 +1111,11 @@ Error BufferManager::GetMetadata(private_handle_t *handle, int64_t metadatatype_
android::gralloc4::encodeDataspace(dataspace, out);
break;
case (int64_t)StandardMetadataType::INTERLACED:
- android::gralloc4::encodeInterlaced(qtigralloc::Interlaced_Qti, out);
+ if (metadata->interlaced > 0) {
+ android::gralloc4::encodeInterlaced(qtigralloc::Interlaced_Qti, out);
+ } else {
+ android::gralloc4::encodeInterlaced(android::gralloc4::Interlaced_None, out);
+ }
break;
case (int64_t)StandardMetadataType::COMPRESSION:
if (handle->flags & qtigralloc::PRIV_FLAGS_UBWC_ALIGNED ||