Index: src/gpu/GrDrawTarget.cpp |
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp |
index 9605781d34d62f625fcb2c46efeff0d8238ed9b1..2d27859c3ee5fd61aef50ac5e64300e2dc66ac09 100644 |
--- a/src/gpu/GrDrawTarget.cpp |
+++ b/src/gpu/GrDrawTarget.cpp |
@@ -195,10 +195,10 @@ |
int indexCount, |
void** vertices, |
void** indices) { |
- size_t vertexStride = this->drawState()->getVertexStride(); |
+ size_t vertexSize = this->drawState()->getVertexSize(); |
this->willReserveVertexAndIndexSpace(vertexCount, indexCount); |
if (vertexCount) { |
- if (!this->reserveVertexSpace(vertexStride, vertexCount, vertices)) { |
+ if (!this->reserveVertexSpace(vertexSize, vertexCount, vertices)) { |
if (indexCount) { |
this->resetIndexSource(); |
} |
@@ -278,7 +278,7 @@ |
this->releasePreviousVertexSource(); |
GeometrySrcState& geoSrc = fGeoSrcStateStack.back(); |
geoSrc.fVertexSrc = kArray_GeometrySrcType; |
- geoSrc.fVertexSize = this->drawState()->getVertexStride(); |
+ geoSrc.fVertexSize = this->drawState()->getVertexSize(); |
geoSrc.fVertexCount = vertexCount; |
this->onSetVertexSourceToArray(vertexArray, vertexCount); |
} |
@@ -298,7 +298,7 @@ |
geoSrc.fVertexSrc = kBuffer_GeometrySrcType; |
geoSrc.fVertexBuffer = buffer; |
buffer->ref(); |
- geoSrc.fVertexSize = this->drawState()->getVertexStride(); |
+ geoSrc.fVertexSize = this->drawState()->getVertexSize(); |
} |
void GrDrawTarget::setIndexSourceToBuffer(const GrIndexBuffer* buffer) { |
@@ -673,9 +673,9 @@ |
void set_vertex_attributes(GrDrawState* drawState, bool hasUVs) { |
if (hasUVs) { |
- drawState->setVertexAttribs<gBWRectPosUVAttribs>(2, 2 * sizeof(SkPoint)); |
+ drawState->setVertexAttribs<gBWRectPosUVAttribs>(2); |
} else { |
- drawState->setVertexAttribs<gBWRectPosUVAttribs>(1, sizeof(SkPoint)); |
+ drawState->setVertexAttribs<gBWRectPosUVAttribs>(1); |
} |
} |
@@ -693,16 +693,16 @@ |
return; |
} |
- size_t vstride = this->drawState()->getVertexStride(); |
- geo.positions()->setRectFan(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, vstride); |
+ size_t vsize = this->drawState()->getVertexSize(); |
+ geo.positions()->setRectFan(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, vsize); |
if (NULL != localRect) { |
SkPoint* coords = GrTCast<SkPoint*>(GrTCast<intptr_t>(geo.vertices()) + |
sizeof(SkPoint)); |
coords->setRectFan(localRect->fLeft, localRect->fTop, |
localRect->fRight, localRect->fBottom, |
- vstride); |
+ vsize); |
if (NULL != localMatrix) { |
- localMatrix->mapPointsWithStride(coords, vstride, 4); |
+ localMatrix->mapPointsWithStride(coords, vsize, 4); |
} |
} |
SkRect bounds; |