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>
This commit is contained in:
parent
8c48f022eb
commit
6e8174e957
@ -1164,6 +1164,7 @@ bool SkOffsetSimplePolygon(const SkPoint* inputPolygonVerts, int inputPolygonSiz
|
||||
if (SkScalarNearlyZero(offset)) {
|
||||
for (int i = 0; i < inputPolygonSize; ++i) {
|
||||
*offsetPolygon->push() = inputPolygonVerts[i];
|
||||
*polygonIndices->push() = i;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user