Fix single-pass tessellator wedges

Change-Id: I5d7f4e2c0c3884e84633695967e6c4ed7c480d80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264819
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Chris Dalton 2020-01-16 13:28:32 -07:00 committed by Skia Commit-Bot
parent 1321a3d1e2
commit b53bdf16aa

View File

@ -27,7 +27,9 @@ void GrTessellatePathOp::onPrepare(GrOpFlushState* state) {
int maxVertexCount = GrPathParser::MaxPossibleWedgeVertices(fPath);
if (auto* wedgeData = (SkPoint*)state->makeVertexSpace(
sizeof(SkPoint), maxVertexCount, &fWedgeBuffer, &fBaseWedgeVertex)) {
fWedgeVertexCount = GrPathParser::EmitCenterWedges(fPath, wedgeData);
if (!(fWedgeVertexCount = GrPathParser::EmitCenterWedges(fPath, wedgeData))) {
fWedgeBuffer.reset();
}
state->putBackVertices(maxVertexCount - fWedgeVertexCount, sizeof(SkPoint));
}
}