summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-05-17 17:35:21 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-05-17 17:35:21 -0700
commit15727818edf0c9bd88303656ccb43fccd2515007 (patch)
tree711b2f492c7eb905efcfe8c0e49b0c6b52a4007f
parent595f9db22d8161b1dd5cd178d8ae829f51308303 (diff)
parente1f61055b4abb96a86d1ff24b5a7777dfe40fe5f (diff)
downloadframeworks_av-15727818edf0c9bd88303656ccb43fccd2515007.zip
frameworks_av-15727818edf0c9bd88303656ccb43fccd2515007.tar.gz
frameworks_av-15727818edf0c9bd88303656ccb43fccd2515007.tar.bz2
am d4a5ea29: am 2b2529f2: Merge "fix some bugs in SharedBufferStack::resize" into kraken
-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;
}
};