| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrBatchBuffer_DEFINED | 8 #ifndef GrBatchBuffer_DEFINED |
| 9 #define GrBatchBuffer_DEFINED | 9 #define GrBatchBuffer_DEFINED |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 GrBatchTracker* currentBatchTracker() { | 74 GrBatchTracker* currentBatchTracker() { |
| 75 SkASSERT(!fFlushBuffer.empty()); | 75 SkASSERT(!fFlushBuffer.empty()); |
| 76 return &fFlushBuffer.back().fBatchTracker; | 76 return &fFlushBuffer.back().fBatchTracker; |
| 77 } | 77 } |
| 78 | 78 |
| 79 const GrDrawTargetCaps& caps() const { return *fGpu->caps(); } | 79 const GrDrawTargetCaps& caps() const { return *fGpu->caps(); } |
| 80 | 80 |
| 81 GrVertexBufferAllocPool* vertexPool() { return fVertexPool; } | 81 GrVertexBufferAllocPool* vertexPool() { return fVertexPool; } |
| 82 GrIndexBufferAllocPool* indexPool() { return fIndexPool; } | 82 GrIndexBufferAllocPool* indexPool() { return fIndexPool; } |
| 83 | 83 |
| 84 const GrIndexBuffer* quadIndexBuffer() const { return fGpu->getQuadIndexBuff
er(); } |
| 85 |
| 84 private: | 86 private: |
| 85 GrGpu* fGpu; | 87 GrGpu* fGpu; |
| 86 GrVertexBufferAllocPool* fVertexPool; | 88 GrVertexBufferAllocPool* fVertexPool; |
| 87 GrIndexBufferAllocPool* fIndexPool; | 89 GrIndexBufferAllocPool* fIndexPool; |
| 88 | 90 |
| 89 typedef void* TBufferAlign; // This wouldn't be enough align if a command us
ed long double. | 91 typedef void* TBufferAlign; // This wouldn't be enough align if a command us
ed long double. |
| 90 | 92 |
| 91 struct BufferedFlush { | 93 struct BufferedFlush { |
| 92 BufferedFlush(const GrPrimitiveProcessor* primProc, const GrPipeline* pi
peline) | 94 BufferedFlush(const GrPrimitiveProcessor* primProc, const GrPipeline* pi
peline) |
| 93 : fPrimitiveProcessor(primProc) | 95 : fPrimitiveProcessor(primProc) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 105 | 107 |
| 106 typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer; | 108 typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer; |
| 107 | 109 |
| 108 FlushBuffer fFlushBuffer; | 110 FlushBuffer fFlushBuffer; |
| 109 // TODO this is temporary | 111 // TODO this is temporary |
| 110 FlushBuffer::Iter fIter; | 112 FlushBuffer::Iter fIter; |
| 111 int fNumberOfDraws; | 113 int fNumberOfDraws; |
| 112 }; | 114 }; |
| 113 | 115 |
| 114 #endif | 116 #endif |
| OLD | NEW |