From b141fcbba99a1f4660b0533516c02639002d473b Mon Sep 17 00:00:00 2001 From: Stephen White Date: Thu, 14 Jun 2018 10:15:47 -0400 Subject: GrTessellator: rename intersection check args. Now that there's a required ordering of the arguments to check_for_intersection(), rename the parameters to match. Cosmetic change only. Change-Id: I68f6ae0b6e5f89a3344048cf73fedabded9ed138 Reviewed-on: https://skia-review.googlesource.com/134823 Reviewed-by: Robert Phillips Commit-Queue: Stephen White --- src/gpu/GrTessellator.cpp | 48 +++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp index 449d00841f..6490c5b73a 100644 --- a/src/gpu/GrTessellator.cpp +++ b/src/gpu/GrTessellator.cpp @@ -1211,14 +1211,14 @@ SkPoint clamp(SkPoint p, SkPoint min, SkPoint max, Comparator& c) { } } -bool check_for_intersection(Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, +bool check_for_intersection(Edge* left, Edge* right, EdgeList* activeEdges, Vertex** current, VertexList* mesh, Comparator& c, SkArenaAlloc& alloc) { - if (!edge || !other) { + if (!left || !right) { return false; } SkPoint p; uint8_t alpha; - if (edge->intersect(*other, &p, &alpha) && p.isFinite()) { + if (left->intersect(*right, &p, &alpha) && p.isFinite()) { Vertex* v; LOG("found intersection, pt is %g, %g\n", p.fX, p.fY); Vertex* top = *current; @@ -1227,28 +1227,28 @@ bool check_for_intersection(Edge* edge, Edge* other, EdgeList* activeEdges, Vert while (top && c.sweep_lt(p, top->fPoint)) { top = top->fPrev; } - if (!nearly_flat(c, edge)) { - p = clamp(p, edge->fTop->fPoint, edge->fBottom->fPoint, c); + if (!nearly_flat(c, left)) { + p = clamp(p, left->fTop->fPoint, left->fBottom->fPoint, c); } - if (!nearly_flat(c, other)) { - p = clamp(p, other->fTop->fPoint, other->fBottom->fPoint, c); + if (!nearly_flat(c, right)) { + p = clamp(p, right->fTop->fPoint, right->fBottom->fPoint, c); } - if (p == edge->fTop->fPoint) { - v = edge->fTop; - } else if (p == edge->fBottom->fPoint) { - v = edge->fBottom; - } else if (p == other->fTop->fPoint) { - v = other->fTop; - } else if (p == other->fBottom->fPoint) { - v = other->fBottom; + if (p == left->fTop->fPoint) { + v = left->fTop; + } else if (p == left->fBottom->fPoint) { + v = left->fBottom; + } else if (p == right->fTop->fPoint) { + v = right->fTop; + } else if (p == right->fBottom->fPoint) { + v = right->fBottom; } else { v = create_sorted_vertex(p, alpha, mesh, top, c, alloc); - if (edge->fTop->fPartner) { - Line line1 = edge->fLine; - Line line2 = other->fLine; - int dir = edge->fType == Edge::Type::kOuter ? -1 : 1; - line1.fC += sqrt(edge->fLine.magSq()) * (edge->fWinding > 0 ? 1 : -1) * dir; - line2.fC += sqrt(other->fLine.magSq()) * (other->fWinding > 0 ? 1 : -1) * dir; + if (left->fTop->fPartner) { + Line line1 = left->fLine; + Line line2 = right->fLine; + int dir = left->fType == Edge::Type::kOuter ? -1 : 1; + line1.fC += sqrt(left->fLine.magSq()) * (left->fWinding > 0 ? 1 : -1) * dir; + line2.fC += sqrt(right->fLine.magSq()) * (right->fWinding > 0 ? 1 : -1) * dir; SkPoint p; if (line1.intersect(line2, &p)) { LOG("synthesizing partner (%g,%g) for intersection vertex %g\n", @@ -1258,12 +1258,12 @@ bool check_for_intersection(Edge* edge, Edge* other, EdgeList* activeEdges, Vert } } rewind(activeEdges, current, top ? top : v, c); - split_edge(edge, v, activeEdges, current, c, alloc); - split_edge(other, v, activeEdges, current, c, alloc); + split_edge(left, v, activeEdges, current, c, alloc); + split_edge(right, v, activeEdges, current, c, alloc); v->fAlpha = SkTMax(v->fAlpha, alpha); return true; } - return intersect_edge_pair(edge, other, activeEdges, current, c, alloc); + return intersect_edge_pair(left, right, activeEdges, current, c, alloc); } void sanitize_contours(VertexList* contours, int contourCnt, bool approximate) { -- cgit v1.2.3