summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceTexture.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2011-07-06 11:09:55 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-07-06 11:09:55 -0700
commit7eef784ea9764c9ca86efb730fcdceda51a0ea87 (patch)
tree4d4000dea1fe292a305b8892185ee3516c05f7f4 /libs/gui/SurfaceTexture.cpp
parent5f517c149fd64c0631913d55617cb2cf369384a0 (diff)
parenteec0f7ebac85d3d1b1151e62b2ed0f25c138d447 (diff)
Merge "return an error code with gralloc buffer allocation failures"
Diffstat (limited to 'libs/gui/SurfaceTexture.cpp')
-rw-r--r--libs/gui/SurfaceTexture.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index 3bf6477cf208..886a3fb22263 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -352,11 +352,13 @@ status_t SurfaceTexture::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
((uint32_t(buffer->usage) & usage) != usage))
{
usage |= GraphicBuffer::USAGE_HW_TEXTURE;
+ status_t error;
sp<GraphicBuffer> graphicBuffer(
- mGraphicBufferAlloc->createGraphicBuffer(w, h, format, usage));
+ mGraphicBufferAlloc->createGraphicBuffer(
+ w, h, format, usage, &error));
if (graphicBuffer == 0) {
LOGE("dequeueBuffer: SurfaceComposer::createGraphicBuffer failed");
- return NO_MEMORY;
+ return error;
}
if (updateFormat) {
mPixelFormat = format;