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

Unified Diff: src/gpu/GrAAConvexTessellator.cpp

Issue 1225683008: When GrAAConvesTesselator was merging the first and last point of the array, it was deleting the la… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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/gpu/GrAAConvexTessellator.cpp
diff --git a/src/gpu/GrAAConvexTessellator.cpp b/src/gpu/GrAAConvexTessellator.cpp
index 85ce7ba9ed6bc17681cbc791d7134210861e0539..e38ba3c3aed8c96a63ab83f70abb55c192e6ea79 100644
--- a/src/gpu/GrAAConvexTessellator.cpp
+++ b/src/gpu/GrAAConvexTessellator.cpp
@@ -681,7 +681,12 @@ bool GrAAConvexTessellator::createInsetRing(const Ring& lastRing, Ring* nextRing
if (!dupPrevVsNext) {
dst[cur] = fCandidateVerts.fuseWithPrior(lastRing.origEdgeID(cur));
} else {
- dst[cur] = dst[cur-1] = fCandidateVerts.fuseWithBoth();
+ const int fused = fCandidateVerts.fuseWithBoth();
+ dst[cur] = fused;
+ const int targetIdx = dst[cur - 1];
+ for (int i = cur - 1; i >= 0 && dst[i] == targetIdx; i--) {
+ dst[i] = fused;
+ }
}
}
« 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