diff options
author | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-01 18:21:22 +0000 |
---|---|---|
committer | jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-03-01 18:21:22 +0000 |
commit | 9b855c7c95ce9fff7a447e4a6bdf8a469c1f3097 (patch) | |
tree | a97672e09387e62ddec1deca227f024806820222 /experimental/StrokePathRenderer | |
parent | df8114d84616f8a85a5064f8deef2cca083193f8 (diff) |
Resubmit r7899 and r7901.
git-svn-id: http://skia.googlecode.com/svn/trunk@7929 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/StrokePathRenderer')
-rw-r--r-- | experimental/StrokePathRenderer/GrStrokePathRenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp index 03c135df60..a8ae91727a 100644 --- a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp +++ b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp @@ -111,11 +111,11 @@ bool GrStrokePathRenderer::onDrawPath(const SkPath& origPath, // Allocate vertices const int nbQuads = origPath.countPoints() + 1; // Could be "-1" if path is not closed - GrVertexLayout layout = 0; // Just 3D points const int extraVerts = isMiter || isBevel ? 1 : 0; const int maxVertexCount = nbQuads * (4 + extraVerts); const int maxIndexCount = nbQuads * (6 + extraVerts * 3); // Each extra vert adds a triangle - GrDrawTarget::AutoReleaseGeometry arg(target, layout, maxVertexCount, maxIndexCount); + target->drawState()->setDefaultVertexAttribs(); + GrDrawTarget::AutoReleaseGeometry arg(target, maxVertexCount, maxIndexCount); if (!arg.succeeded()) { return false; } @@ -126,7 +126,7 @@ bool GrStrokePathRenderer::onDrawPath(const SkPath& origPath, // Transform the path into a list of triangles SkPath::Iter iter(origPath, false); SkPoint pts[4]; - const SkScalar radius = SkScalarMul(width, 0.5); + const SkScalar radius = SkScalarMul(width, 0.5f); SkPoint *firstPt = verts, *lastPt = NULL; SkVector firstDir, dir; firstDir.set(0, 0); |