aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-15 21:14:51 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-15 21:14:51 +0000
commitcb8b0eeacfc2ff79a2b9721e3ef21d1efb507dc8 (patch)
tree2b247f21cfff9c2e0328fd4eef2e338aaae3c816 /src/core
parent259fbaf7a464827bc560517988daeb5836e11e98 (diff)
Update how SkPath handles fGenerationID and fSourcePath, and add tests to cover.
BUG= R=bungeman@google.com, reed@google.com Review URL: https://codereview.chromium.org/22911002 git-svn-id: http://skia.googlecode.com/svn/trunk@10756 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkPath.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index ed2f555ca5..47fa552465 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();)