diff options
author | Igor Murashkin <iam@google.com> | 2013-08-16 14:07:10 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-08-16 14:07:10 -0700 |
commit | 0ba1a16bbb2c7ea5f52691c062613a2309821354 (patch) | |
tree | 38772d0f2945c8e8615763f2b4e76ed725d3ee91 | |
parent | 3b835a8db09e59321da2c42972690edd5cae9714 (diff) | |
parent | e60a0b1e6a29d79b4d0ec0374446cb829bcadee4 (diff) | |
download | frameworks_native-0ba1a16bbb2c7ea5f52691c062613a2309821354.zip frameworks_native-0ba1a16bbb2c7ea5f52691c062613a2309821354.tar.gz frameworks_native-0ba1a16bbb2c7ea5f52691c062613a2309821354.tar.bz2 |
am e60a0b1e: Merge "gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired" into klp-dev
* commit 'e60a0b1e6a29d79b4d0ec0374446cb829bcadee4':
gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired
-rw-r--r-- | include/gui/CpuConsumer.h | 2 | ||||
-rw-r--r-- | libs/gui/CpuConsumer.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/gui/CpuConsumer.h b/include/gui/CpuConsumer.h index 9290676..6f4c2ec 100644 --- a/include/gui/CpuConsumer.h +++ b/include/gui/CpuConsumer.h @@ -90,7 +90,7 @@ class CpuConsumer : public ConsumerBase // Gets the next graphics buffer from the producer and locks it for CPU use, // filling out the passed-in locked buffer structure with the native pointer // and metadata. Returns BAD_VALUE if no new buffer is available, and - // INVALID_OPERATION if the maximum number of buffers is already locked. + // NOT_ENOUGH_DATA if the maximum number of buffers is already locked. // // Only a fixed number of buffers can be locked at a time, determined by the // construction-time maxLockedBuffers parameter. If INVALID_OPERATION is diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index 3db46bc..bff55d1 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -72,7 +72,9 @@ status_t CpuConsumer::lockNextBuffer(LockedBuffer *nativeBuffer) { if (!nativeBuffer) return BAD_VALUE; if (mCurrentLockedBuffers == mMaxLockedBuffers) { - return INVALID_OPERATION; + CC_LOGW("Max buffers have been locked (%d), cannot lock anymore.", + mMaxLockedBuffers); + return NOT_ENOUGH_DATA; } BufferQueue::BufferItem b; |