Index: src/gpu/GrDistanceFieldTextContext.cpp |
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp |
index b7b4f9903f1fdeba7f63fe62ec802c4ff4fec610..8704820f17badf914784cade8f7344d78960590e 100755 |
--- a/src/gpu/GrDistanceFieldTextContext.cpp |
+++ b/src/gpu/GrDistanceFieldTextContext.cpp |
@@ -342,10 +342,12 @@ HAS_ATLAS: |
fMaxVertices = kMinRequestedVerts; |
if (useColorVerts) { |
fDrawTarget->drawState()->setVertexAttribs<gTextVertexWithColorAttribs>( |
- SK_ARRAY_COUNT(gTextVertexWithColorAttribs)); |
+ SK_ARRAY_COUNT(gTextVertexWithColorAttribs), |
+ 2 * sizeof(SkPoint) + sizeof(GrColor)); |
} else { |
fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>( |
- SK_ARRAY_COUNT(gTextVertexAttribs)); |
+ SK_ARRAY_COUNT(gTextVertexAttribs), |
+ 2 * sizeof(SkPoint)); |
} |
bool flush = fDrawTarget->geometryHints(&fMaxVertices, NULL); |
if (flush) { |
@@ -353,10 +355,12 @@ HAS_ATLAS: |
fContext->flush(); |
if (useColorVerts) { |
fDrawTarget->drawState()->setVertexAttribs<gTextVertexWithColorAttribs>( |
- SK_ARRAY_COUNT(gTextVertexWithColorAttribs)); |
+ SK_ARRAY_COUNT(gTextVertexWithColorAttribs), |
+ 2 * sizeof(SkPoint) + sizeof(GrColor)); |
} else { |
fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>( |
- SK_ARRAY_COUNT(gTextVertexAttribs)); |
+ SK_ARRAY_COUNT(gTextVertexAttribs), |
+ 2 * sizeof(SkPoint)); |
} |
} |
fMaxVertices = kDefaultRequestedVerts; |
@@ -406,7 +410,7 @@ HAS_ATLAS: |
size_t vertSize = fUseLCDText ? (2 * sizeof(SkPoint)) |
: (2 * sizeof(SkPoint) + sizeof(GrColor)); |
- SkASSERT(vertSize == fDrawTarget->getDrawState().getVertexSize()); |
+ SkASSERT(vertSize == fDrawTarget->getDrawState().getVertexStride()); |
SkPoint* positions = reinterpret_cast<SkPoint*>( |
reinterpret_cast<intptr_t>(fVertices) + vertSize * fCurrVertex); |