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

Unified Diff: include/core/SkPathRef.h

Issue 49693002: Use SkPathRef gen id for SkPath::getGenerationID (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: cleanup Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « include/core/SkPath.h ('k') | src/core/SkPath.cpp » ('j') | src/core/SkPath.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698