summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-09-27 12:33:14 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-09-27 12:33:14 -0700
commit6949f5da669d6ec6db24da0b561ad3466aece60d (patch)
treeedb682085d26d31c87377b2393b8f3158315c2eb /include/utils
parent257fe6b3301570ec633d41692f450dba5f1b13d1 (diff)
parentd1b0a2bfe50e61241fab6a571941c207232d9212 (diff)
downloadframeworks_native-6949f5da669d6ec6db24da0b561ad3466aece60d.zip
frameworks_native-6949f5da669d6ec6db24da0b561ad3466aece60d.tar.gz
frameworks_native-6949f5da669d6ec6db24da0b561ad3466aece60d.tar.bz2
Merge "Add suuport for splitting touch events across windows." into gingerbread
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/BitSet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/utils/BitSet.h b/include/utils/BitSet.h
index 19c8bf0..f5dbcd9 100644
--- a/include/utils/BitSet.h
+++ b/include/utils/BitSet.h
@@ -38,6 +38,9 @@ struct BitSet32 {
// Clears the bit set.
inline void clear() { value = 0; }
+ // Returns the number of marked bits in the set.
+ inline uint32_t count() const { return __builtin_popcount(value); }
+
// Returns true if the bit set does not contain any marked bits.
inline bool isEmpty() const { return ! value; }