Revert r7901 & r7899 to allow DEPS roll
git-svn-id: http://skia.googlecode.com/svn/trunk@7909 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp
index a2ad9e3..00982ee 100644
--- a/src/gpu/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/GrAAHairLinePathRenderer.cpp
@@ -495,20 +495,15 @@
int* lineCnt,
int* quadCnt,
GrDrawTarget::AutoReleaseGeometry* arg) {
- GrDrawState* drawState = target->drawState();
- int rtHeight = drawState->getRenderTarget()->height();
+ const GrDrawState& drawState = target->getDrawState();
+ int rtHeight = drawState.getRenderTarget()->height();
GrIRect devClipBounds;
- target->getClip()->getConservativeBounds(drawState->getRenderTarget(),
+ target->getClip()->getConservativeBounds(drawState.getRenderTarget(),
&devClipBounds);
- // position + edge
- static const GrVertexAttrib kAttribs[] = {
- GrVertexAttrib(kVec2f_GrVertexAttribType, 0),
- GrVertexAttrib(kVec4f_GrVertexAttribType, sizeof(GrPoint))
- };
- static const GrAttribBindings kBindings = GrDrawState::kEdge_AttribBindingsBit;
- SkMatrix viewM = drawState->getViewMatrix();
+ GrVertexLayout layout = GrDrawState::kEdge_VertexLayoutBit;
+ SkMatrix viewM = drawState.getViewMatrix();
PREALLOC_PTARRAY(128) lines;
PREALLOC_PTARRAY(128) quads;
@@ -519,10 +514,7 @@
*lineCnt = lines.count() / 2;
int vertCnt = kVertsPerLineSeg * *lineCnt + kVertsPerQuad * *quadCnt;
- target->drawState()->setVertexAttribs(kAttribs, SK_ARRAY_COUNT(kAttribs));
- target->drawState()->setAttribIndex(GrDrawState::kPosition_AttribIndex, 0);
- target->drawState()->setAttribIndex(GrDrawState::kEdge_AttribIndex, 1);
- target->drawState()->setAttribBindings(kBindings);
+ target->drawState()->setVertexLayout(layout);
GrAssert(sizeof(Vertex) == target->getDrawState().getVertexSize());
if (!arg->set(target, vertCnt, 0)) {