| Index: src/gpu/GrBatchTarget.h
|
| diff --git a/src/gpu/GrBatchTarget.h b/src/gpu/GrBatchTarget.h
|
| index 37f5c9b1427af2c742c426c774023b1fe48c9d0f..b73907746f055fc5b322f1a688742fe4b93efda5 100644
|
| --- a/src/gpu/GrBatchTarget.h
|
| +++ b/src/gpu/GrBatchTarget.h
|
| @@ -17,9 +17,6 @@
|
| * that render their batch.
|
| */
|
|
|
| -class GrIndexBufferAllocPool;
|
| -class GrVertexBufferAllocPool;
|
| -
|
| class GrBatchTarget : public SkNoncopyable {
|
| public:
|
| GrBatchTarget(GrGpu* gpu,
|
| @@ -29,13 +26,11 @@
|
| , fVertexPool(vpool)
|
| , fIndexPool(ipool)
|
| , fFlushBuffer(kFlushBufferInitialSizeInBytes)
|
| - , fIter(fFlushBuffer)
|
| - , fNumberOfDraws(0) {}
|
| + , fIter(fFlushBuffer) {}
|
|
|
| typedef GrDrawTarget::DrawInfo DrawInfo;
|
| void initDraw(const GrPrimitiveProcessor* primProc, const GrPipeline* pipeline) {
|
| GrNEW_APPEND_TO_RECORDER(fFlushBuffer, BufferedFlush, (primProc, pipeline));
|
| - fNumberOfDraws++;
|
| }
|
|
|
| void draw(const GrDrawTarget::DrawInfo& draw) {
|
| @@ -44,10 +39,8 @@
|
|
|
| // TODO this is temporary until batch is everywhere
|
| //void flush();
|
| - void resetNumberOfDraws() { fNumberOfDraws = 0; }
|
| - int numberOfDraws() const { return fNumberOfDraws; }
|
| void preFlush() { fIter = FlushBuffer::Iter(fFlushBuffer); }
|
| - void flushNext(int n);
|
| + void flushNext();
|
| void postFlush() { SkASSERT(!fIter.next()); fFlushBuffer.reset(); }
|
|
|
| // TODO This goes away when everything uses batch
|
| @@ -55,8 +48,6 @@
|
| SkASSERT(!fFlushBuffer.empty());
|
| return &fFlushBuffer.back().fBatchTracker;
|
| }
|
| -
|
| - const GrDrawTargetCaps& caps() const { return *fGpu->caps(); }
|
|
|
| GrVertexBufferAllocPool* vertexPool() { return fVertexPool; }
|
| GrIndexBufferAllocPool* indexPool() { return fIndexPool; }
|
| @@ -71,7 +62,8 @@
|
| struct BufferedFlush {
|
| BufferedFlush(const GrPrimitiveProcessor* primProc, const GrPipeline* pipeline)
|
| : fPrimitiveProcessor(primProc)
|
| - , fPipeline(pipeline) {}
|
| + , fPipeline(pipeline)
|
| + , fDraws(kDrawRecorderInitialSizeInBytes) {}
|
| typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimitiveProcessor;
|
| ProgramPrimitiveProcessor fPrimitiveProcessor;
|
| const GrPipeline* fPipeline;
|
| @@ -81,6 +73,7 @@
|
|
|
| enum {
|
| kFlushBufferInitialSizeInBytes = 8 * sizeof(BufferedFlush),
|
| + kDrawRecorderInitialSizeInBytes = 8 * sizeof(DrawInfo),
|
| };
|
|
|
| typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer;
|
| @@ -88,7 +81,6 @@
|
| FlushBuffer fFlushBuffer;
|
| // TODO this is temporary
|
| FlushBuffer::Iter fIter;
|
| - int fNumberOfDraws;
|
| };
|
|
|
| #endif
|
|
|