summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueue.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2012-11-19 16:50:24 -0800
committer Mathias Agopian <mathias@google.com> 2012-11-19 16:50:24 -0800
commit764c197c6fc2bf10b038c33b320a4e95594d52d8 (patch)
tree46a4271ccac8dd11aeffc7af10f70fb3c2896a7f /libs/gui/BufferQueue.cpp
parent3e095b251503d71bea04d6b707e8188cd30034e2 (diff)
fix typo that broke all the builds
Bug: 7584338 Change-Id: Ieb8c27a544ac583af9aa1e0376e33a673d2d9673
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;
}
}
}