aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/StrokePathRenderer
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-28 23:08:28 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-28 23:08:28 +0000
commitaf3a3b9fb1f3be46082013a2d1977d12faf1f61c (patch)
tree7fafb55c8e8b5043478d11e0f0e48fd2ef5c7007 /experimental/StrokePathRenderer
parent2b1b8c083b969a2a798b03d1754a3fc99ea054df (diff)
Revert r7901 & r7899 to allow DEPS roll
git-svn-id: http://skia.googlecode.com/svn/trunk@7909 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/StrokePathRenderer')
-rw-r--r--experimental/StrokePathRenderer/GrStrokePathRenderer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp b/experimental/StrokePathRenderer/GrStrokePathRenderer.cpp
index a8ae91727a..03c135df60 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
- target->drawState()->setDefaultVertexAttribs();
- GrDrawTarget::AutoReleaseGeometry arg(target, maxVertexCount, maxIndexCount);
+ GrDrawTarget::AutoReleaseGeometry arg(target, layout, 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.5f);
+ const SkScalar radius = SkScalarMul(width, 0.5);
SkPoint *firstPt = verts, *lastPt = NULL;
SkVector firstDir, dir;
firstDir.set(0, 0);