Index: src/gpu/GrAAConvexPathRenderer.cpp |
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp |
index 3e1af80485308832d7c3b2bd6dae78047fe55112..2af5bb2e43f2589b93836a5db3e13d61feee46cc 100644 |
--- a/src/gpu/GrAAConvexPathRenderer.cpp |
+++ b/src/gpu/GrAAConvexPathRenderer.cpp |
@@ -35,12 +35,12 @@ struct Segment { |
} fType; |
// line uses one pt, quad uses 2 pts |
- GrPoint fPts[2]; |
+ SkPoint fPts[2]; |
// normal to edge ending at each pt |
- GrVec fNorms[2]; |
+ SkVector fNorms[2]; |
// is the corner where the previous segment meets this segment |
// sharp. If so, fMid is a normalized bisector facing outward. |
- GrVec fMid; |
+ SkVector fMid; |
int countPoints() { |
GR_STATIC_ASSERT(0 == kLine && 1 == kQuad); |
@@ -118,11 +118,11 @@ static void compute_vectors(SegmentArray* segments, |
int count = segments->count(); |
// Make the normals point towards the outside |
- GrPoint::Side normSide; |
+ SkPoint::Side normSide; |
if (dir == SkPath::kCCW_Direction) { |
- normSide = GrPoint::kRight_Side; |
+ normSide = SkPoint::kRight_Side; |
} else { |
- normSide = GrPoint::kLeft_Side; |
+ normSide = SkPoint::kLeft_Side; |
} |
*vCount = 0; |
@@ -133,7 +133,7 @@ static void compute_vectors(SegmentArray* segments, |
int b = (a + 1) % count; |
Segment& segb = (*segments)[b]; |
- const GrPoint* prevPt = &sega.endPt(); |
+ const SkPoint* prevPt = &sega.endPt(); |
int n = segb.countPoints(); |
for (int p = 0; p < n; ++p) { |
segb.fNorms[p] = segb.fPts[p] - *prevPt; |
@@ -173,15 +173,15 @@ struct DegenerateTestData { |
kLine, |
kNonDegenerate |
} fStage; |
- GrPoint fFirstPoint; |
- GrVec fLineNormal; |
+ SkPoint fFirstPoint; |
+ SkVector fLineNormal; |
SkScalar fLineC; |
}; |
static const SkScalar kClose = (SK_Scalar1 / 16); |
static const SkScalar kCloseSqd = SkScalarMul(kClose, kClose); |
-static void update_degenerate_test(DegenerateTestData* data, const GrPoint& pt) { |
+static void update_degenerate_test(DegenerateTestData* data, const SkPoint& pt) { |
switch (data->fStage) { |
case DegenerateTestData::kInitial: |
data->fFirstPoint = pt; |
@@ -288,7 +288,7 @@ static bool get_segments(const SkPath& path, |
} |
for (;;) { |
- GrPoint pts[4]; |
+ SkPoint pts[4]; |
SkPath::Verb verb = iter.next(pts); |
switch (verb) { |
case SkPath::kMove_Verb: |
@@ -330,8 +330,8 @@ static bool get_segments(const SkPath& path, |
} |
struct QuadVertex { |
- GrPoint fPos; |
- GrPoint fUV; |
+ SkPoint fPos; |
+ SkPoint fUV; |
SkScalar fD0; |
SkScalar fD1; |
}; |
@@ -439,9 +439,9 @@ static void create_vertices(const SegmentArray& segments, |
*v += 5; |
*i += 9; |
} else { |
- GrPoint qpts[] = {sega.endPt(), segb.fPts[0], segb.fPts[1]}; |
+ SkPoint qpts[] = {sega.endPt(), segb.fPts[0], segb.fPts[1]}; |
- GrVec midVec = segb.fNorms[0] + segb.fNorms[1]; |
+ SkVector midVec = segb.fNorms[0] + segb.fNorms[1]; |
midVec.normalize(); |
verts[*v + 0].fPos = fanPt; |
@@ -468,7 +468,7 @@ static void create_vertices(const SegmentArray& segments, |
verts[*v + 5].fD1 = -SK_ScalarMax/100; |
GrPathUtils::QuadUVMatrix toUV(qpts); |
- toUV.apply<6, sizeof(QuadVertex), sizeof(GrPoint)>(verts + *v); |
+ toUV.apply<6, sizeof(QuadVertex), sizeof(SkPoint)>(verts + *v); |
idxs[*i + 0] = *v + 3; |
idxs[*i + 1] = *v + 1; |
@@ -618,7 +618,7 @@ namespace { |
// position + edge |
extern const GrVertexAttrib gPathAttribs[] = { |
{kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBinding}, |
- {kVec4f_GrVertexAttribType, sizeof(GrPoint), kEffect_GrVertexAttribBinding} |
+ {kVec4f_GrVertexAttribType, sizeof(SkPoint), kEffect_GrVertexAttribBinding} |
}; |
}; |