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

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: upload again, rietveld diff failed. 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
« no previous file with comments | « include/core/SkPath.h ('k') | src/core/SkPath.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPathRef.h
diff --git a/include/core/SkPathRef.h b/include/core/SkPathRef.h
index d832944ec340a6a04c573aeb029a8ff5c9cc9dfd..aea0a912750bf3fe26b9b6d5c0387d669303a9c6 100644
--- a/include/core/SkPathRef.h
+++ b/include/core/SkPathRef.h
@@ -227,6 +227,13 @@ 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.
+ */
+ uint32_t genID() const;
+
private:
enum SerializationOffsets {
kIsFinite_SerializationShift = 25, // requires 1 bit
@@ -380,14 +387,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 +412,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698