Change vertex buffer allocator functions to take size rather than layout, take two.
Resubmission of r7498.
https://codereview.appspot.com/7228078
git-svn-id: http://skia.googlecode.com/svn/trunk@7501 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index d2d1d8d..04ffaa4 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -86,7 +86,7 @@
this->releasePreviousVertexSource();
geoSrc.fVertexSrc = kNone_GeometrySrcType;
- acquired = this->onReserveVertexSpace(vertexLayout,
+ acquired = this->onReserveVertexSpace(GrDrawState::VertexSize(vertexLayout),
vertexCount,
vertices);
}
@@ -126,7 +126,7 @@
int indexCount,
void** vertices,
void** indices) {
- this->willReserveVertexAndIndexSpace(vertexLayout, vertexCount, indexCount);
+ this->willReserveVertexAndIndexSpace(GrDrawState::VertexSize(vertexLayout), vertexCount, indexCount);
if (vertexCount) {
if (!this->reserveVertexSpace(vertexLayout, vertexCount, vertices)) {
if (indexCount) {
@@ -146,7 +146,7 @@
return true;
}
-bool GrDrawTarget::geometryHints(GrVertexLayout vertexLayout,
+bool GrDrawTarget::geometryHints(size_t vertexSize,
int32_t* vertexCount,
int32_t* indexCount) const {
if (NULL != vertexCount) {