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 Guang Zhu <guangzhu@google.com> 2012-11-19 22:13:49 -0800
commit73d5662e4c1639e0aa462d420433fe7efa248245 (patch)
tree7dfb7296b317ed1e05d7b3dc74d0cf77e3db6926 /libs/gui/BufferQueue.cpp
parente64b38fad2cc6686fb6691aaf65c735f505a49a5 (diff)
fix typo that broke all the builds
cherry pick into master since auto-merger is blocked Bug: 7584338 Change-Id: Ie7d7c238de1fd224b3b0bae9669a8dcb2f700a79
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;
}
}
}