summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTharaga Balachandran <tbalacha@codeaurora.org>2020-04-22 16:40:09 -0400
committerGerrit - the friendly Code Review server <code-review@localhost>2020-08-19 05:20:07 -0700
commitebfe0b7f0ac53a3306920afc6e4b4a0a5f8a743d (patch)
tree0c06536fdb95361794fe59c96dbcc8dcdc638a2d
parent3b1c8dc4013ae3d9c47933dd27a02b72ecfe3814 (diff)
gralloc: Add metadata type buffer_type
CRs-Fixed: 2738373 Change-Id: I6df95891acea34e81ada3259590d9fbc75bfbd4a
-rw-r--r--gralloc/QtiMapper4.h5
-rw-r--r--gralloc/gr_buf_mgr.cpp6
2 files changed, 10 insertions, 1 deletions
diff --git a/gralloc/QtiMapper4.h b/gralloc/QtiMapper4.h
index 3c5137fc..936393d4 100644
--- a/gralloc/QtiMapper4.h
+++ b/gralloc/QtiMapper4.h
@@ -267,7 +267,10 @@ class QtiMapper : public IQtiMapper {
{qtigralloc::MetadataType_AlignedHeightInPixels, "height in private_handle_t", true, false},
#ifdef METADATA_V2
{qtigralloc::MetadataType_StandardMetadataStatus, "Is standard metadata set", true, false},
- {qtigralloc::MetadataType_VendorMetadataStatus, "Is vendor metadata set", true, false}
+ {qtigralloc::MetadataType_VendorMetadataStatus, "Is vendor metadata set", true, false},
+#endif
+#ifdef QTI_BUFFER_TYPE
+ {qtigralloc::MetadataType_BufferType, "Buffer type from private_handle_t", true, false},
#endif
};
};
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index 7e9f57fa..825d20be 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -1392,6 +1392,12 @@ Error BufferManager::GetMetadata(private_handle_t *handle, int64_t metadatatype_
qtigralloc::encodeMetadataState(metadata->isVendorMetadataSet, out);
break;
#endif
+#ifdef QTI_BUFFER_TYPE
+ case QTI_BUFFER_TYPE:
+ android::gralloc4::encodeUint32(qtigralloc::MetadataType_BufferType, handle->buffer_type,
+ out);
+ break;
+#endif
default:
error = Error::UNSUPPORTED;
}