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

Unified Diff: src/core/SkPath.cpp

Issue 1711813002: check for zero conic weights in interp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | 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 10e80a47a33804476650c6a99c9d0248a609f94a..06bbeef096ba9734cb0a733c7d9b983893ad658a 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -205,7 +205,8 @@ bool SkPath::isInterpolatable(const SkPath& compare) const {
count)) {
return false;
}
- return !SkToBool(memcmp(fPathRef->conicWeights(), compare.fPathRef->conicWeights(),
+ return !fPathRef->countWeights() ||
+ !SkToBool(memcmp(fPathRef->conicWeights(), compare.fPathRef->conicWeights(),
fPathRef->countWeights() * sizeof(*fPathRef->conicWeights())));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698