OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrBufferAllocPool.h" | 10 #include "GrBufferAllocPool.h" |
| 11 #include "GrDrawTargetCaps.h" |
| 12 #include "GrGpu.h" |
| 13 #include "GrIndexBuffer.h" |
11 #include "GrTypes.h" | 14 #include "GrTypes.h" |
12 #include "GrVertexBuffer.h" | 15 #include "GrVertexBuffer.h" |
13 #include "GrIndexBuffer.h" | |
14 #include "GrGpu.h" | |
15 | 16 |
16 #if GR_DEBUG | 17 #if GR_DEBUG |
17 #define VALIDATE validate | 18 #define VALIDATE validate |
18 #else | 19 #else |
19 static void VALIDATE(bool = false) {} | 20 static void VALIDATE(bool = false) {} |
20 #endif | 21 #endif |
21 | 22 |
22 // page size | 23 // page size |
23 #define GrBufferAllocPool_MIN_BLOCK_SIZE ((size_t)1 << 12) | 24 #define GrBufferAllocPool_MIN_BLOCK_SIZE ((size_t)1 << 12) |
24 | 25 |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 } | 479 } |
479 } | 480 } |
480 | 481 |
481 int GrIndexBufferAllocPool::preallocatedBufferIndices() const { | 482 int GrIndexBufferAllocPool::preallocatedBufferIndices() const { |
482 return INHERITED::preallocatedBufferSize() / sizeof(uint16_t); | 483 return INHERITED::preallocatedBufferSize() / sizeof(uint16_t); |
483 } | 484 } |
484 | 485 |
485 int GrIndexBufferAllocPool::currentBufferIndices() const { | 486 int GrIndexBufferAllocPool::currentBufferIndices() const { |
486 return currentBufferItems(sizeof(uint16_t)); | 487 return currentBufferItems(sizeof(uint16_t)); |
487 } | 488 } |
OLD | NEW |