Index: src/gpu/GrRectanizer_skyline.cpp |
diff --git a/src/gpu/GrRectanizer_skyline.cpp b/src/gpu/GrRectanizer_skyline.cpp |
index b759cb22ac439ed087c66e74eb649586fd356090..44da1c326a1295fc20c9b071f4b4fba004a531c1 100755 |
--- a/src/gpu/GrRectanizer_skyline.cpp |
+++ b/src/gpu/GrRectanizer_skyline.cpp |
@@ -81,8 +81,9 @@ void GrRectanizerSkyline::addSkylineLevel(int skylineIndex, int x, int y, int wi |
SkASSERT(newSegment.fX + newSegment.fWidth <= this->width()); |
SkASSERT(newSegment.fY <= this->height()); |
- // delete width of this skyline segment from following ones |
+ // delete width of the new skyline segment from following ones |
for (int i = skylineIndex+1; i < fSkyline.count(); ++i) { |
+ // The new segment subsumes all or part of fSkyline[i] |
SkASSERT(fSkyline[i-1].fX <= fSkyline[i].fX); |
if (fSkyline[i].fX < fSkyline[i-1].fX + fSkyline[i-1].fWidth) { |
@@ -92,9 +93,11 @@ void GrRectanizerSkyline::addSkylineLevel(int skylineIndex, int x, int y, int wi |
fSkyline[i].fWidth -= shrink; |
if (fSkyline[i].fWidth <= 0) { |
+ // fully consumed |
fSkyline.remove(i); |
--i; |
} else { |
+ // only partially consumed |
break; |
} |
} else { |