diff --git a/gralloc/QtiGralloc.h b/gralloc/QtiGralloc.h index f14821c5..d25b264e 100644 --- a/gralloc/QtiGralloc.h +++ b/gralloc/QtiGralloc.h @@ -138,6 +138,7 @@ static const MetadataType MetadataType_RgbDataAddress = {VENDOR_QTI, QTI_RGB_DAT static const MetadataType MetadataType_ColorSpace = {VENDOR_QTI, QTI_COLORSPACE}; static const MetadataType MetadataType_YuvPlaneInfo = {VENDOR_QTI, QTI_YUV_PLANE_INFO}; static const MetadataType MetadataType_BufferPermission = {VENDOR_QTI, QTI_BUFFER_PERMISSION}; +static const MetadataType MetadataType_HeapName = {VENDOR_QTI, QTI_HEAP_NAME}; static const MetadataType MetadataType_MemHandle = {VENDOR_QTI, QTI_MEM_HANDLE}; static const MetadataType MetadataType_TimedRendering = {VENDOR_QTI, QTI_TIMED_RENDERING}; diff --git a/gralloc/QtiGrallocMetadata.h b/gralloc/QtiGrallocMetadata.h index c3889b2c..6d139ddb 100644 --- a/gralloc/QtiGrallocMetadata.h +++ b/gralloc/QtiGrallocMetadata.h @@ -79,6 +79,8 @@ #define QTI_VIDEO_TRANSCODE_STATS 10030 // Early Notify line count #define QTI_EARLYNOTIFY_LINECOUNT 10031 +// Heap Name +#define QTI_HEAP_NAME 10032 // Used to indicate to framework that internal definitions are used instead #define COMPRESSION_QTI_UBWC 20001 #define INTERLACED_QTI 20002 diff --git a/gralloc/QtiGrallocPriv.h b/gralloc/QtiGrallocPriv.h index 125777c5..898e006a 100644 --- a/gralloc/QtiGrallocPriv.h +++ b/gralloc/QtiGrallocPriv.h @@ -146,6 +146,7 @@ struct MetaData_t { /* Video transcode stat populated by video decoder */ struct VideoTranscodeStatsMetadata video_transcode_stats; int32_t videoEarlyNotifyLineCount; + char heapName[MAX_NAME_LEN]; }; namespace qtigralloc { diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h index c0b64c2e..cf47b4d1 100644 --- a/gralloc/gralloc_priv.h +++ b/gralloc/gralloc_priv.h @@ -81,7 +81,7 @@ #define ROUND_UP_PAGESIZE(x) roundUpToPageSize(x) inline size_t roundUpToPageSize(size_t x) { - return (x + (size_t(getpagesize()) - 1)) & ~(size_t(getpagesize()) - 1); + return (x + ((size_t)(getpagesize()) - 1)) & ~((size_t)(getpagesize()) - 1); } /* Legacy gralloc1 definitions */