Merge "Fix a bug in SurfaceTexture::dequeueBuffer." into honeycomb

This commit is contained in:
Jamie Gennis 2011-01-13 12:13:56 -08:00 committed by Android (Google) Code Review
commit 0579d57502

View File

@ -131,7 +131,7 @@ status_t SurfaceTexture::dequeueBuffer(int *buf) {
Mutex::Autolock lock(mMutex);
int found = INVALID_BUFFER_SLOT;
for (int i = 0; i < mBufferCount; i++) {
if (!mSlots[i].mOwnedByClient && i != mCurrentTexture) {
if (!mSlots[i].mOwnedByClient && i != mCurrentTexture && i != mLastQueued) {
mSlots[i].mOwnedByClient = true;
found = i;
break;