From 024e9313ce69ced1f853d737de680ef9f50ed26d Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Wed, 24 Aug 2016 12:17:29 -0700 Subject: 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 --- libs/gui/GraphicBufferAlloc.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libs/gui/GraphicBufferAlloc.cpp') diff --git a/libs/gui/GraphicBufferAlloc.cpp b/libs/gui/GraphicBufferAlloc.cpp index 9643402dfa..e6150f4926 100644 --- a/libs/gui/GraphicBufferAlloc.cpp +++ b/libs/gui/GraphicBufferAlloc.cpp @@ -32,9 +32,10 @@ GraphicBufferAlloc::~GraphicBufferAlloc() { } sp GraphicBufferAlloc::createGraphicBuffer(uint32_t width, - uint32_t height, PixelFormat format, uint32_t usage, status_t* error) { - sp graphicBuffer( - new GraphicBuffer(width, height, format, usage)); + uint32_t height, PixelFormat format, uint32_t usage, + std::string requestorName, status_t* error) { + sp graphicBuffer(new GraphicBuffer( + width, height, format, usage, std::move(requestorName))); status_t err = graphicBuffer->initCheck(); *error = err; if (err != 0 || graphicBuffer->handle == 0) { -- cgit v1.2.3-59-g8ed1b