Index: src/gpu/GrBitmapTextContext.cpp |
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp |
index 0c4d324d895b49ffb5236cfa86183830082a3229..4fdf0b0bd99c7ab974b0649885820482eb80f933 100755 |
--- a/src/gpu/GrBitmapTextContext.cpp |
+++ b/src/gpu/GrBitmapTextContext.cpp |
@@ -528,10 +528,10 @@ HAS_ATLAS: |
fMaxVertices = kMinRequestedVerts; |
if (useColorVerts) { |
fDrawTarget->drawState()->setVertexAttribs<gTextVertexWithColorAttribs>( |
- SK_ARRAY_COUNT(gTextVertexWithColorAttribs)); |
+ SK_ARRAY_COUNT(gTextVertexWithColorAttribs), 2 * sizeof(SkPoint) + sizeof(GrColor)); |
bsalomon
2014/08/27 17:46:27
Maybe capture these in some static consts with gTe
egdaniel
2014/08/27 18:33:55
Done.
|
} else { |
fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>( |
- SK_ARRAY_COUNT(gTextVertexAttribs)); |
+ SK_ARRAY_COUNT(gTextVertexAttribs), 2 * sizeof(SkPoint)); |
} |
bool flush = fDrawTarget->geometryHints(&fMaxVertices, NULL); |
if (flush) { |
@@ -539,10 +539,10 @@ 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; |
@@ -577,7 +577,7 @@ HAS_ATLAS: |
size_t vertSize = useColorVerts ? (2 * sizeof(SkPoint) + sizeof(GrColor)) : |
(2 * sizeof(SkPoint)); |
- SkASSERT(vertSize == fDrawTarget->getDrawState().getVertexSize()); |
+ SkASSERT(vertSize == fDrawTarget->getDrawState().getVertexStride()); |
SkPoint* positions = reinterpret_cast<SkPoint*>( |
reinterpret_cast<intptr_t>(fVertices) + vertSize * fCurrVertex); |