Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/utils/SkBitSet.h

Issue 2112943002: SkPDF: Glyph Useage Map improvements (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/utils/SkBitSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkBitSet_DEFINED 9 #ifndef SkBitSet_DEFINED
10 #define SkBitSet_DEFINED 10 #define SkBitSet_DEFINED
11 11
12 #include "SkTypes.h" 12 #include "SkTypes.h"
13 #include "SkTDArray.h" 13 #include "SkTDArray.h"
14 14
15 class SkBitSet { 15 class SkBitSet {
16 public: 16 public:
17 /** NumberOfBits must be greater than zero. 17 /** NumberOfBits must be greater than zero.
18 */ 18 */
19 explicit SkBitSet(int numberOfBits); 19 explicit SkBitSet(int numberOfBits);
20 explicit SkBitSet(const SkBitSet& source); 20 explicit SkBitSet(const SkBitSet& source);
21 explicit SkBitSet(SkBitSet&&);
21 22
22 SkBitSet& operator=(const SkBitSet& rhs); 23 SkBitSet& operator=(const SkBitSet& rhs);
23 bool operator==(const SkBitSet& rhs); 24 bool operator==(const SkBitSet& rhs);
24 bool operator!=(const SkBitSet& rhs); 25 bool operator!=(const SkBitSet& rhs);
25 26
26 /** Clear all data. 27 /** Clear all data.
27 */ 28 */
28 void clearAll(); 29 void clearAll();
29 30
30 /** Set the value of the index-th bit. 31 /** Set the value of the index-th bit.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 uint32_t* internalGet(int index) const { 80 uint32_t* internalGet(int index) const {
80 SkASSERT((size_t)index < fBitCount); 81 SkASSERT((size_t)index < fBitCount);
81 size_t internalIndex = index / 32; 82 size_t internalIndex = index / 32;
82 SkASSERT(internalIndex < fDwordCount); 83 SkASSERT(internalIndex < fDwordCount);
83 return reinterpret_cast<uint32_t*>(fBitData.get()) + internalIndex; 84 return reinterpret_cast<uint32_t*>(fBitData.get()) + internalIndex;
84 } 85 }
85 }; 86 };
86 87
87 88
88 #endif 89 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/utils/SkBitSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698