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

Unified Diff: src/core/SkPath.cpp

Issue 954453003: Reset conicWeights in SkPath::consumeDegenerateSegments when rewinding to last Move op (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added unit test Created 5 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 | tests/PathTest.cpp » ('j') | tests/PathTest.cpp » ('J')
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 de3d297da3fe87d7465b3f169d599f692a6cf37e..0b796fc5374ec14e0fbc6e07c81e0638be47ce89 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -1660,6 +1660,7 @@ void SkPath::Iter::consumeDegenerateSegments() {
// forward before the next move is seen
const uint8_t* lastMoveVerb = 0;
const SkPoint* lastMovePt = 0;
+ const SkScalar* lastMoveWeight = NULL;
SkPoint lastPt = fLastPt;
while (fVerbs != fVerbStop) {
unsigned verb = *(fVerbs - 1); // fVerbs is one beyond the current verb
@@ -1668,6 +1669,7 @@ void SkPath::Iter::consumeDegenerateSegments() {
// Keep a record of this most recent move
lastMoveVerb = fVerbs;
lastMovePt = fPts;
+ lastMoveWeight = fConicWeights;
lastPt = fPts[0];
fVerbs--;
fPts++;
@@ -1688,6 +1690,7 @@ void SkPath::Iter::consumeDegenerateSegments() {
if (lastMoveVerb) {
fVerbs = lastMoveVerb;
fPts = lastMovePt;
+ fConicWeights = lastMoveWeight;
return;
}
return;
@@ -1703,6 +1706,7 @@ void SkPath::Iter::consumeDegenerateSegments() {
if (lastMoveVerb) {
fVerbs = lastMoveVerb;
fPts = lastMovePt;
+ fConicWeights = lastMoveWeight;
return;
}
return;
@@ -1718,6 +1722,7 @@ void SkPath::Iter::consumeDegenerateSegments() {
if (lastMoveVerb) {
fVerbs = lastMoveVerb;
fPts = lastMovePt;
+ fConicWeights = lastMoveWeight;
return;
}
return;
« no previous file with comments | « no previous file | tests/PathTest.cpp » ('j') | tests/PathTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698