diff options
author | 2016-10-21 15:23:44 -0700 | |
---|---|---|
committer | 2016-11-11 11:35:06 -0800 | |
commit | 6ebc46a7c01b22bc19d3c00b493f8d930b15b43a (patch) | |
tree | 6f68e8f1cf2ccde71eece4a037c8e32b4f0cd0b2 /libs/gui/GraphicBufferAlloc.cpp | |
parent | cd7dedbe69f8c90d351b97b1acea2bb3635b68ca (diff) |
Add layered buffer support to libui and libgui.
Bug: 31686534
Test: manual
Change-Id: Ia40270701467f4b785660324cad883e7da08989a
Diffstat (limited to 'libs/gui/GraphicBufferAlloc.cpp')
-rw-r--r-- | libs/gui/GraphicBufferAlloc.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/gui/GraphicBufferAlloc.cpp b/libs/gui/GraphicBufferAlloc.cpp index e6150f4926..9d045dd44e 100644 --- a/libs/gui/GraphicBufferAlloc.cpp +++ b/libs/gui/GraphicBufferAlloc.cpp @@ -32,19 +32,21 @@ GraphicBufferAlloc::~GraphicBufferAlloc() { } sp<GraphicBuffer> GraphicBufferAlloc::createGraphicBuffer(uint32_t width, - uint32_t height, PixelFormat format, uint32_t usage, - std::string requestorName, status_t* error) { + uint32_t height, PixelFormat format, uint32_t layerCount, + uint32_t usage, std::string requestorName, status_t* error) { sp<GraphicBuffer> graphicBuffer(new GraphicBuffer( - width, height, format, usage, std::move(requestorName))); + width, height, format, layerCount, usage, + std::move(requestorName))); status_t err = graphicBuffer->initCheck(); *error = err; if (err != 0 || graphicBuffer->handle == 0) { if (err == NO_MEMORY) { GraphicBuffer::dumpAllocationsToSystemLog(); } - ALOGE("GraphicBufferAlloc::createGraphicBuffer(w=%d, h=%d) " + ALOGE("GraphicBufferAlloc::createGraphicBuffer(w=%u, h=%u, lc=%u) " "failed (%s), handle=%p", - width, height, strerror(-err), graphicBuffer->handle); + width, height, layerCount, strerror(-err), + graphicBuffer->handle); return 0; } return graphicBuffer; |