From 1fec9e8defccd6cde9d16e1862ae438cc05bf8b8 Mon Sep 17 00:00:00 2001 From: Ray Zhang Date: Wed, 9 Mar 2022 16:04:38 +0800 Subject: [PATCH] gralloc: Add Timed Rendering metadata Add support to pass new Timed Rendering metadata in gralloc buffer. Change-Id: I078ee218a02935ad4fcc77dad3f2a83fd4574400 --- gralloc/QtiGralloc.h | 2 ++ gralloc/QtiGrallocMetadata.h | 2 +- gralloc/QtiGrallocPriv.h | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gralloc/QtiGralloc.h b/gralloc/QtiGralloc.h index 8055ab86..c95368aa 100644 --- a/gralloc/QtiGralloc.h +++ b/gralloc/QtiGralloc.h @@ -130,6 +130,8 @@ static const MetadataType MetadataType_YuvPlaneInfo = {VENDOR_QTI, QTI_YUV_PLANE static const MetadataType MetadataType_BufferPermission = {VENDOR_QTI, QTI_BUFFER_PERMISSION}; static const MetadataType MetadataType_MemHandle = {VENDOR_QTI, QTI_MEM_HANDLE}; +static const MetadataType MetadataType_TimedRendering = {VENDOR_QTI, QTI_TIMED_RENDERING}; + // 0 is also used as invalid value in standard metadata static const MetadataType MetadataType_Invalid = {VENDOR_QTI, 0}; diff --git a/gralloc/QtiGrallocMetadata.h b/gralloc/QtiGrallocMetadata.h index 9fa29914..506fd2e9 100644 --- a/gralloc/QtiGrallocMetadata.h +++ b/gralloc/QtiGrallocMetadata.h @@ -69,7 +69,7 @@ // Indicates buffer access permission of its client #define QTI_BUFFER_PERMISSION 10026 #define QTI_MEM_HANDLE 10027 - +#define QTI_TIMED_RENDERING 10028 // Used to indicate to framework that internal definitions are used instead #define COMPRESSION_QTI_UBWC 20001 diff --git a/gralloc/QtiGrallocPriv.h b/gralloc/QtiGrallocPriv.h index 59c55d9e..f4a5bce4 100644 --- a/gralloc/QtiGrallocPriv.h +++ b/gralloc/QtiGrallocPriv.h @@ -142,6 +142,10 @@ struct MetaData_t { VideoTimestampInfo videoTsInfo; BufferPermission bufferPerm[BUFFER_CLIENT_MAX]; int64_t memHandle; + + /* Set by clients to indicate that timed rendering will be enabled + * or disabled for this buffer. */ + uint32_t timedRendering; }; namespace qtigralloc {