Chromium Code Reviews| 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--; |
| + } |
| } |
| } |