OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef SkRWBuffer_DEFINED | 8 #ifndef SkRWBuffer_DEFINED |
9 #define SkRWBuffer_DEFINED | 9 #define SkRWBuffer_DEFINED |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 */ | 27 */ |
28 size_t size() const { return fUsed; } | 28 size_t size() const { return fUsed; } |
29 | 29 |
30 class Iter { | 30 class Iter { |
31 public: | 31 public: |
32 Iter(const SkROBuffer*); | 32 Iter(const SkROBuffer*); |
33 | 33 |
34 void reset(const SkROBuffer*); | 34 void reset(const SkROBuffer*); |
35 | 35 |
36 /** | 36 /** |
37 * Return the current continuous block of memory, or NULL if the iterat
or is exhausted | 37 * Return the current continuous block of memory, or nullptr if the ite
rator is exhausted |
38 */ | 38 */ |
39 const void* data() const; | 39 const void* data() const; |
40 | 40 |
41 /** | 41 /** |
42 * Returns the number of bytes in the current continguous block of memo
ry, or 0 if the | 42 * Returns the number of bytes in the current continguous block of memo
ry, or 0 if the |
43 * iterator is exhausted. | 43 * iterator is exhausted. |
44 */ | 44 */ |
45 size_t size() const; | 45 size_t size() const; |
46 | 46 |
47 /** | 47 /** |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void validate() const {} | 88 void validate() const {} |
89 #endif | 89 #endif |
90 | 90 |
91 private: | 91 private: |
92 SkBufferHead* fHead; | 92 SkBufferHead* fHead; |
93 SkBufferBlock* fTail; | 93 SkBufferBlock* fTail; |
94 size_t fTotalUsed; | 94 size_t fTotalUsed; |
95 }; | 95 }; |
96 | 96 |
97 #endif | 97 #endif |
OLD | NEW |