Add requestor name to GraphicBuffer alloc metadata

Adds a requestor name (usually the BufferQueue consumer's name) to the
metadata that GraphicBufferAllocator stores on allocation so that
`dumpsys SurfaceFlinger` can attempt to attribute buffer usage to the
correct client.

Bug: 30776557
Change-Id: I6e0f346584c871bb3b9d5481f82b697b0475a916
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 61ed8b6..f41e6e2 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -1920,6 +1920,10 @@
     CHECK_ERROR_CONDITION("Unable to write format");
     err = data.writeUint32(usage);
     CHECK_ERROR_CONDITION("Unable to write usage");
+    err = data.writeUtf8AsUtf16(
+            std::string("[eglCreateNativeClientBufferANDROID pid ") +
+            std::to_string(getpid()) + ']');
+    CHECK_ERROR_CONDITION("Unable to write requestor name");
     err = allocator->transact(IBinder::FIRST_CALL_TRANSACTION, data,
             &reply);
     CHECK_ERROR_CONDITION(