| Index: src/utils/SkBitSet.h
|
| diff --git a/src/utils/SkBitSet.h b/src/utils/SkBitSet.h
|
| index e113fd70044eb148302977ae70728565f6931426..266fd87496255ec1d2f9a528933ae0bbc32b96f3 100644
|
| --- a/src/utils/SkBitSet.h
|
| +++ b/src/utils/SkBitSet.h
|
| @@ -30,11 +30,22 @@ public:
|
|
|
| /** Set the value of the index-th bit.
|
| */
|
| - void setBit(int index, bool value);
|
| + void setBit(int index, bool value) {
|
| + uint32_t mask = 1 << (index & 31);
|
| + uint32_t* chunk = this->internalGet(index);
|
| + if (value) {
|
| + *chunk |= mask;
|
| + } else {
|
| + *chunk &= ~mask;
|
| + }
|
| + }
|
|
|
| /** Test if bit index is set.
|
| */
|
| - bool isBitSet(int index) const;
|
| + bool isBitSet(int index) const {
|
| + uint32_t mask = 1 << (index & 31);
|
| + return SkToBool(*this->internalGet(index) & mask);
|
| + }
|
|
|
| /** Or bits from source. false is returned if this doesn't have the same
|
| * bit count as source.
|
|
|