gralloc: name buffer at allocation time

Allow the client to name their buffer at allocation time.

b/141632767 will let the client(s) query the name of the
buffer later.

Bug: 144026910
Test: VtsHalGraphicsMapperV4_0TargetTest

Change-Id: Ib08c1909c10a1778c50b59e0a42ddf19140d8f03
diff --git a/graphics/mapper/4.0/IMapper.hal b/graphics/mapper/4.0/IMapper.hal
index 85c7c81..c809349 100644
--- a/graphics/mapper/4.0/IMapper.hal
+++ b/graphics/mapper/4.0/IMapper.hal
@@ -23,6 +23,11 @@
 interface IMapper {
     struct BufferDescriptorInfo {
         /**
+         * The name of the buffer. Useful for debugging/tracing.
+         */
+        string name;
+
+        /**
          * The width specifies how many columns of pixels must be in the
          * allocated buffer, but does not necessarily represent the offset in
          * columns between the same column in adjacent rows. The rows may be
diff --git a/graphics/mapper/4.0/types.hal b/graphics/mapper/4.0/types.hal
index 603b243..2fdfa65 100644
--- a/graphics/mapper/4.0/types.hal
+++ b/graphics/mapper/4.0/types.hal
@@ -51,7 +51,7 @@
  * createDescriptor(). It describes the properties of a buffer and is consumed
  * by the allocator.
  */
-typedef vec<uint32_t> BufferDescriptor;
+typedef vec<uint8_t> BufferDescriptor;
 
 /**
  * Structure for describing YCbCr formats for consumption by applications.
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index 706c658..6a4bd49 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -58,6 +58,7 @@
                         GraphicsMapperHidlEnvironment::Instance()->getServiceName<IAllocator>(),
                         GraphicsMapperHidlEnvironment::Instance()->getServiceName<IMapper>()));
 
+        mDummyDescriptorInfo.name = "dummy";
         mDummyDescriptorInfo.width = 64;
         mDummyDescriptorInfo.height = 64;
         mDummyDescriptorInfo.layerCount = 1;