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.h b/src/gpu/GrDrawTarget.h
index 2d1ca6c..1c8ada1 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -254,7 +254,7 @@
* Also may hint whether the draw target should be flushed first. This is
* useful for deferred targets.
*
- * @param vertexLayout layout of vertices caller would like to reserve
+ * @param vertexSize size of vertices caller would like to reserve
* @param vertexCount in: hint about how many vertices the caller would
* like to allocate.
* out: a hint about the number of vertices that can be
@@ -268,7 +268,7 @@
*
* @return true if target should be flushed based on the input values.
*/
- virtual bool geometryHints(GrVertexLayout vertexLayout,
+ virtual bool geometryHints(size_t vertexSize,
int* vertexCount,
int* indexCount) const;
@@ -761,10 +761,10 @@
private:
// A subclass can optionally overload this function to be notified before
// vertex and index space is reserved.
- virtual void willReserveVertexAndIndexSpace(GrVertexLayout,int vertexCount, int indexCount) {}
+ virtual void willReserveVertexAndIndexSpace(size_t vertexSize, int vertexCount, int indexCount) {}
// implemented by subclass to allocate space for reserved geom
- virtual bool onReserveVertexSpace(GrVertexLayout, int vertexCount, void** vertices) = 0;
+ virtual bool onReserveVertexSpace(size_t vertexSize, int vertexCount, void** vertices) = 0;
virtual bool onReserveIndexSpace(int indexCount, void** indices) = 0;
// implemented by subclass to handle release of reserved geom space
virtual void releaseReservedVertexSpace() = 0;