| Index: src/gpu/GrBitmapTextContext.cpp
|
| diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
|
| index 17439b5672c6dbdca16c9ef4e7bd211fcaf10007..c992b9527f9202252e3fe31c7d94d0b96a00d0b2 100755
|
| --- a/src/gpu/GrBitmapTextContext.cpp
|
| +++ b/src/gpu/GrBitmapTextContext.cpp
|
| @@ -40,16 +40,12 @@
|
| {kVec2f_GrVertexAttribType, sizeof(SkPoint) , kEffect_GrVertexAttribBinding}
|
| };
|
|
|
| -static const size_t kTextVASize = 2 * sizeof(SkPoint);
|
| -
|
| // position + color + texture coord
|
| extern const GrVertexAttrib gTextVertexWithColorAttribs[] = {
|
| {kVec2f_GrVertexAttribType, 0, kPosition_GrVertexAttribBinding},
|
| {kVec4ub_GrVertexAttribType, sizeof(SkPoint), kColor_GrVertexAttribBinding},
|
| {kVec2f_GrVertexAttribType, sizeof(SkPoint) + sizeof(GrColor), kEffect_GrVertexAttribBinding}
|
| };
|
| -
|
| -static const size_t kTextVAColorSize = 2 * sizeof(SkPoint) + sizeof(GrColor);
|
|
|
| };
|
|
|
| @@ -180,12 +176,10 @@
|
| bool useColorVerts = kA8_GrMaskFormat == fStrike->getMaskFormat();
|
| if (useColorVerts) {
|
| fDrawTarget->drawState()->setVertexAttribs<gTextVertexWithColorAttribs>(
|
| - SK_ARRAY_COUNT(gTextVertexWithColorAttribs),
|
| - kTextVAColorSize);
|
| + SK_ARRAY_COUNT(gTextVertexWithColorAttribs));
|
| } else {
|
| fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>(
|
| - SK_ARRAY_COUNT(gTextVertexAttribs),
|
| - kTextVASize);
|
| + SK_ARRAY_COUNT(gTextVertexAttribs));
|
| }
|
| fVertexCount = 4*fSkPaint.textToGlyphs(text, byteLength, NULL);
|
| bool success = fDrawTarget->reserveVertexAndIndexSpace(fVertexCount,
|
| @@ -565,7 +559,7 @@
|
| size_t vertSize = useColorVerts ? (2 * sizeof(SkPoint) + sizeof(GrColor)) :
|
| (2 * sizeof(SkPoint));
|
|
|
| - SkASSERT(vertSize == fDrawTarget->getDrawState().getVertexStride());
|
| + SkASSERT(vertSize == fDrawTarget->getDrawState().getVertexSize());
|
|
|
| SkPoint* positions = reinterpret_cast<SkPoint*>(
|
| reinterpret_cast<intptr_t>(fVertices) + vertSize * fCurrVertex);
|
|
|