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

Unified Diff: src/core/SkPath.cpp

Issue 22911002: Update how SkPath handles fGenerationID and fSourcePath, and add tests to cover. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: ued -> used Created 7 years, 4 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') | tests/PathTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPath.cpp
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index ed2f555ca56bfcca932c7be2a33621faffa35748..47fa5524658b5d8e1f7fbeb51f37c1f00cac95de 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -180,7 +180,8 @@ void SkPath::resetFields() {
fIsOval = false;
#ifdef SK_BUILD_FOR_ANDROID
GEN_ID_INC;
- fSourcePath = NULL;
+ // We don't touch fSourcePath. It's used to track texture garbage collection, so we don't
+ // want to muck with it if it's been set to something non-NULL.
#endif
}
@@ -189,7 +190,7 @@ SkPath::SkPath(const SkPath& that)
this->copyFields(that);
#ifdef SK_BUILD_FOR_ANDROID
fGenerationID = that.fGenerationID;
- fSourcePath = NULL; // TODO(mtklein): follow up with Android: do we want to copy this too?
+ fSourcePath = that.fSourcePath;
#endif
SkDEBUGCODE(that.validate();)
}
@@ -206,7 +207,7 @@ SkPath& SkPath::operator=(const SkPath& that) {
this->copyFields(that);
#ifdef SK_BUILD_FOR_ANDROID
GEN_ID_INC; // Similar to swap, we can't just copy this or it could go back in time.
- fSourcePath = NULL; // TODO(mtklein): follow up with Android: do we want to copy this too?
+ fSourcePath = that.fSourcePath;
#endif
}
SkDEBUGCODE(this->validate();)
« no previous file with comments | « include/core/SkPath.h ('k') | tests/PathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698