| 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 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 if (fBlock->empty()) { | 96 if (fBlock->empty()) { |
| 97 Block* next = fBlock->fNext; | 97 Block* next = fBlock->fNext; |
| 98 GrFree(fBlock); | 98 GrFree(fBlock); |
| 99 fBlock = next; | 99 fBlock = next; |
| 100 GR_DEBUGCODE(fBlocksAllocated -= 1;) | 100 GR_DEBUGCODE(fBlocksAllocated -= 1;) |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| 106 #if GR_DEBUG | 106 #if SK_DEBUG |
| 107 | 107 |
| 108 void GrAllocPool::validate() const { | 108 void GrAllocPool::validate() const { |
| 109 Block* block = fBlock; | 109 Block* block = fBlock; |
| 110 int count = 0; | 110 int count = 0; |
| 111 while (block) { | 111 while (block) { |
| 112 count += 1; | 112 count += 1; |
| 113 block = block->fNext; | 113 block = block->fNext; |
| 114 } | 114 } |
| 115 SkASSERT(fBlocksAllocated == count); | 115 SkASSERT(fBlocksAllocated == count); |
| 116 } | 116 } |
| 117 | 117 |
| 118 #endif | 118 #endif |
| OLD | NEW |