diff options
author | 2016-08-24 12:17:29 -0700 | |
---|---|---|
committer | 2016-08-24 12:17:29 -0700 | |
commit | 024e9313ce69ced1f853d737de680ef9f50ed26d (patch) | |
tree | 0973985deb030d81a76bd123c8e21f3d5c23b7b8 /libs/gui/GraphicBufferAlloc.cpp | |
parent | ce730f66e2d3745b77ecb212c28771b42e8abf52 (diff) |
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
Diffstat (limited to 'libs/gui/GraphicBufferAlloc.cpp')
-rw-r--r-- | libs/gui/GraphicBufferAlloc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<GraphicBuffer> GraphicBufferAlloc::createGraphicBuffer(uint32_t width, - uint32_t height, PixelFormat format, uint32_t usage, status_t* error) { - sp<GraphicBuffer> graphicBuffer( - new GraphicBuffer(width, height, format, usage)); + uint32_t height, PixelFormat format, uint32_t usage, + std::string requestorName, status_t* error) { + sp<GraphicBuffer> graphicBuffer(new GraphicBuffer( + width, height, format, usage, std::move(requestorName))); status_t err = graphicBuffer->initCheck(); *error = err; if (err != 0 || graphicBuffer->handle == 0) { |