diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 28f3dc2fa..1389ed6a5 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -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;