Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index a9c6ce0b5a2c1223b30deb5387c36e3a19389db8..819774a076a88b657f270dd7bc171a4a4908aaa6 100755 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -502,7 +502,15 @@ |
} |
GrDrawTarget::DrawInfo drawInfo; |
- drawInfo.init(primType, vertexBuffer, firstVertex, vertexCount); |
+ drawInfo.setPrimitiveType(primType); |
+ drawInfo.setVertexBuffer(vertexBuffer); |
+ drawInfo.setStartVertex(firstVertex); |
+ drawInfo.setVertexCount(vertexCount); |
+ drawInfo.setStartIndex(0); |
+ drawInfo.setIndexCount(0); |
+ drawInfo.setInstanceCount(0); |
+ drawInfo.setVerticesPerInstance(0); |
+ drawInfo.setIndicesPerInstance(0); |
batchTarget->draw(drawInfo); |
} |
@@ -821,8 +829,8 @@ |
return; |
} |
- const GrIndexBuffer* indexBuffer = NULL; |
- int firstIndex = 0; |
+ const GrIndexBuffer* indexBuffer; |
+ int firstIndex; |
void* indices = NULL; |
if (this->hasIndices()) { |
@@ -862,12 +870,17 @@ |
} |
GrDrawTarget::DrawInfo drawInfo; |
+ drawInfo.setPrimitiveType(this->primitiveType()); |
+ drawInfo.setVertexBuffer(vertexBuffer); |
+ drawInfo.setStartVertex(firstVertex); |
+ drawInfo.setVertexCount(this->vertexCount()); |
if (this->hasIndices()) { |
- drawInfo.initIndexed(this->primitiveType(), vertexBuffer, indexBuffer, firstVertex, |
- firstIndex, this->vertexCount(), this->indexCount()); |
- |
+ drawInfo.setIndexBuffer(indexBuffer); |
+ drawInfo.setStartIndex(firstIndex); |
+ drawInfo.setIndexCount(this->indexCount()); |
} else { |
- drawInfo.init(this->primitiveType(), vertexBuffer, firstVertex, this->vertexCount()); |
+ drawInfo.setStartIndex(0); |
+ drawInfo.setIndexCount(0); |
} |
batchTarget->draw(drawInfo); |
} |