| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 GrBufferAllocPool_DEFINED | 8 #ifndef GrBufferAllocPool_DEFINED |
| 9 #define GrBufferAllocPool_DEFINED | 9 #define GrBufferAllocPool_DEFINED |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 size_t fMinBlockSize; | 121 size_t fMinBlockSize; |
| 122 BufferType fBufferType; | 122 BufferType fBufferType; |
| 123 | 123 |
| 124 SkTArray<BufferBlock> fBlocks; | 124 SkTArray<BufferBlock> fBlocks; |
| 125 int fPreallocBuffersInUse; | 125 int fPreallocBuffersInUse; |
| 126 // We attempt to cycle through the preallocated buffers rather than | 126 // We attempt to cycle through the preallocated buffers rather than |
| 127 // always starting from the first. | 127 // always starting from the first. |
| 128 int fPreallocBufferStartIdx; | 128 int fPreallocBufferStartIdx; |
| 129 SkAutoMalloc fCpuData; | 129 SkAutoMalloc fCpuData; |
| 130 void* fBufferPtr; | 130 void* fBufferPtr; |
| 131 size_t fGeometryBufferMapThreshold; |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 class GrVertexBuffer; | 134 class GrVertexBuffer; |
| 134 | 135 |
| 135 /** | 136 /** |
| 136 * A GrBufferAllocPool of vertex buffers | 137 * A GrBufferAllocPool of vertex buffers |
| 137 */ | 138 */ |
| 138 class GrVertexBufferAllocPool : public GrBufferAllocPool { | 139 class GrVertexBufferAllocPool : public GrBufferAllocPool { |
| 139 public: | 140 public: |
| 140 /** | 141 /** |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 */ | 221 */ |
| 221 void* makeSpace(int indexCount, | 222 void* makeSpace(int indexCount, |
| 222 const GrIndexBuffer** buffer, | 223 const GrIndexBuffer** buffer, |
| 223 int* startIndex); | 224 int* startIndex); |
| 224 | 225 |
| 225 private: | 226 private: |
| 226 typedef GrBufferAllocPool INHERITED; | 227 typedef GrBufferAllocPool INHERITED; |
| 227 }; | 228 }; |
| 228 | 229 |
| 229 #endif | 230 #endif |
| OLD | NEW |