summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueue.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2012-11-19 17:04:44 -0800
committer Android Git Automerger <android-git-automerger@android.com> 2012-11-19 17:04:44 -0800
commit594a8773c1ef5632a8eb2ef61a86c319460d4248 (patch)
tree07fdcb5f93ca3e9eae6115d0042df63f913dc7c1 /libs/gui/BufferQueue.cpp
parent92c3a307d3ce3ec7a8808d6a2cbb324c0526ac5b (diff)
parent764c197c6fc2bf10b038c33b320a4e95594d52d8 (diff)
am 764c197c: fix typo that broke all the builds
* commit '764c197c6fc2bf10b038c33b320a4e95594d52d8': fix typo that broke all the builds
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
-rw-r--r--libs/gui/BufferQueue.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index 607e0bdbec..086e298196 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -314,12 +314,9 @@ status_t BufferQueue::dequeueBuffer(int *outBuf, sp<Fence>& outFence,
* the consumer may still have pending reads of the
* buffers in flight.
*/
- if (found >= 0) {
- bool isOlder = mSlots[i].mFrameNumber <
- mSlots[found].mFrameNumber;
- if (isOlder) {
- found = i;
- }
+ if ((found < 0) ||
+ mSlots[i].mFrameNumber < mSlots[found].mFrameNumber) {
+ found = i;
}
}
}