summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-05-17 17:27:26 -0700
committerMathias Agopian <mathias@google.com>2010-05-17 17:27:26 -0700
commitd6297f7d096cee1ce180ac7bc26604a179e742c5 (patch)
treed797e154ba3e87fd356607e48832489d76710d14 /include/private
parent2ac44f9a8c3781b5e9d6703fcb9231dbce0d8b89 (diff)
downloadframeworks_native-d6297f7d096cee1ce180ac7bc26604a179e742c5.zip
frameworks_native-d6297f7d096cee1ce180ac7bc26604a179e742c5.tar.gz
frameworks_native-d6297f7d096cee1ce180ac7bc26604a179e742c5.tar.bz2
fix some bugs in SharedBufferStack::resize
added buffers should now be labeled properly. Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
Diffstat (limited to 'include/private')
-rw-r--r--include/private/surfaceflinger/SharedBufferStack.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/surfaceflinger/SharedBufferStack.h
index c23832d..a1a02e0 100644
--- a/include/private/surfaceflinger/SharedBufferStack.h
+++ b/include/private/surfaceflinger/SharedBufferStack.h
@@ -295,7 +295,8 @@ private:
friend class BufferList;
uint32_t mask, curr;
const_iterator(uint32_t mask) :
- mask(mask), curr(31 - __builtin_clz(mask)) { }
+ mask(mask), curr(__builtin_clz(mask)) {
+ }
public:
inline bool operator == (const const_iterator& rhs) const {
return mask == rhs.mask;
@@ -304,9 +305,9 @@ private:
return mask != rhs.mask;
}
inline int operator *() const { return curr; }
- inline const const_iterator& operator ++(int) {
- mask &= ~curr;
- curr = 31 - __builtin_clz(mask);
+ inline const const_iterator& operator ++() {
+ mask &= ~(1<<(31-curr));
+ curr = __builtin_clz(mask);
return *this;
}
};