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

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..ef237d45a22f3d04f663d9d6d4741d3511834d32 100644
--- a/src/gpu/GrAAConvexTessellator.cpp
+++ b/src/gpu/GrAAConvexTessellator.cpp
@@ -681,7 +681,14 @@ 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();
+ int fused = fCandidateVerts.fuseWithBoth();
+ dst[cur] = fused;
robertphillips 2015/07/07 18:50:54 const ?
+ int targetIdx = dst[cur - 1];
robertphillips 2015/07/07 18:50:54 I would personally make this a for loop ...
+ int i = cur - 1;
+ while (i >= 0 && dst[i] == targetIdx) {
+ dst[i] = fused;
+ i--;
+ }
}
}
« 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