Chromium Code Reviews| Index: include/core/SkPathRef.h |
| diff --git a/include/core/SkPathRef.h b/include/core/SkPathRef.h |
| index d832944ec340a6a04c573aeb029a8ff5c9cc9dfd..399e37e88148f712a840787e247d8a6c6b273806 100644 |
| --- a/include/core/SkPathRef.h |
| +++ b/include/core/SkPathRef.h |
| @@ -227,6 +227,14 @@ public: |
| */ |
| uint32_t writeSize(); |
| + /** |
| + * Gets an ID that uniquely identifies the contents of the path ref. If two path refs have the |
| + * same ID then they have the same verbs and points. However, two path refs may have the same |
| + * contents but different genIDs. Zero is reserved and means an ID has not yet been determined |
|
mtklein
2013/10/29 20:38:36
We don't ever return 0 here do we? Do we need to
bsalomon
2013/10/29 20:45:04
good point, done.
|
| + * for the path ref. |
| + */ |
| + uint32_t genID() const; |
| + |
| private: |
| enum SerializationOffsets { |
| kIsFinite_SerializationShift = 25, // requires 1 bit |
| @@ -380,14 +388,6 @@ private: |
| return reinterpret_cast<intptr_t>(fVerbs) - reinterpret_cast<intptr_t>(fPoints); |
| } |
| - /** |
| - * Gets an ID that uniquely identifies the contents of the path ref. If two path refs have the |
| - * same ID then they have the same verbs and points. However, two path refs may have the same |
| - * contents but different genIDs. Zero is reserved and means an ID has not yet been determined |
| - * for the path ref. |
| - */ |
| - int32_t genID() const; |
| - |
| SkDEBUGCODE(void validate() const;) |
| /** |
| @@ -413,7 +413,7 @@ private: |
| enum { |
| kEmptyGenID = 1, // GenID reserved for path ref with zero points and zero verbs. |
| }; |
| - mutable int32_t fGenerationID; |
| + mutable uint32_t fGenerationID; |
| SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use at any time. |
| typedef SkRefCnt INHERITED; |