aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAAConvexPathRenderer.cpp
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 /src/gpu/GrAAConvexPathRenderer.cpp
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 'src/gpu/GrAAConvexPathRenderer.cpp')
-rw-r--r--src/gpu/GrAAConvexPathRenderer.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 46e75a07a6..98eaab84cd 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -453,6 +453,9 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath,
}
const SkMatrix* vm = &adcd.getOriginalMatrix();
+ GrVertexLayout layout = 0;
+ layout |= GrDrawState::kEdge_VertexLayoutBit;
+
// We use the fact that SkPath::transform path does subdivision based on
// perspective. Otherwise, we apply the view matrix when copying to the
// segment representation.
@@ -478,22 +481,11 @@ bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath,
return false;
}
- // position + edge
- static const GrVertexAttrib kAttribs[] = {
- GrVertexAttrib(kVec2f_GrVertexAttribType, 0),
- GrVertexAttrib(kVec4f_GrVertexAttribType, sizeof(GrPoint))
- };
- static const GrAttribBindings bindings = GrDrawState::kEdge_AttribBindingsBit;
-
- drawState->setVertexAttribs(kAttribs, SK_ARRAY_COUNT(kAttribs));
- drawState->setAttribIndex(GrDrawState::kPosition_AttribIndex, 0);
- drawState->setAttribIndex(GrDrawState::kEdge_AttribIndex, 1);
- drawState->setAttribBindings(bindings);
+ drawState->setVertexLayout(layout);
GrDrawTarget::AutoReleaseGeometry arg(target, vCount, iCount);
if (!arg.succeeded()) {
return false;
}
- GrAssert(sizeof(QuadVertex) == drawState->getVertexSize());
verts = reinterpret_cast<QuadVertex*>(arg.vertices());
idxs = reinterpret_cast<uint16_t*>(arg.indices());