Fix issue with offsetting polygon by 0 distance. Need to output matching indices as well. Bug: skia:13417, chromium:937412 Change-Id: I251a70eb07fda8b3a257d9f57ebdd9f20ad01b5a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197160 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/utils/SkPolyUtils.cpp b/src/utils/SkPolyUtils.cpp index 0e91d09..5243579 100644 --- a/src/utils/SkPolyUtils.cpp +++ b/src/utils/SkPolyUtils.cpp
@@ -1164,6 +1164,7 @@ if (SkScalarNearlyZero(offset)) { for (int i = 0; i < inputPolygonSize; ++i) { *offsetPolygon->push() = inputPolygonVerts[i]; + *polygonIndices->push() = i; } return true; }