OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "GrMemoryPool.h" | 8 #include "GrMemoryPool.h" |
9 | 9 |
10 #ifdef SK_DEBUG | 10 #ifdef SK_DEBUG |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 SkASSERT(block->fLiveCount); | 164 SkASSERT(block->fLiveCount); |
165 SkASSERT(userSize >= fMinAllocSize); | 165 SkASSERT(userSize >= fMinAllocSize); |
166 } else { | 166 } else { |
167 SkASSERT(userSize == fPreallocSize); | 167 SkASSERT(userSize == fPreallocSize); |
168 } | 168 } |
169 if (!block->fLiveCount) { | 169 if (!block->fLiveCount) { |
170 SkASSERT(ptrOffset == kHeaderSize); | 170 SkASSERT(ptrOffset == kHeaderSize); |
171 SkASSERT(userStart == block->fCurrPtr); | 171 SkASSERT(userStart == block->fCurrPtr); |
172 } else { | 172 } else { |
173 AllocHeader* allocData = reinterpret_cast<AllocHeader*>(userStart); | 173 AllocHeader* allocData = reinterpret_cast<AllocHeader*>(userStart); |
174 SkASSERT(allocData->fSentinal == kAssignedMarker || | 174 SkASSERT(allocData->fSentinal == kAssignedMarker || |
175 allocData->fSentinal == kFreedMarker); | 175 allocData->fSentinal == kFreedMarker); |
176 SkASSERT(block == allocData->fHeader); | 176 SkASSERT(block == allocData->fHeader); |
177 } | 177 } |
178 | 178 |
179 prev = block; | 179 prev = block; |
180 } while ((block = block->fNext)); | 180 } while ((block = block->fNext)); |
181 SkASSERT(allocCount == fAllocationCnt); | 181 SkASSERT(allocCount == fAllocationCnt); |
182 SkASSERT(prev == fTail); | 182 SkASSERT(prev == fTail); |
183 SkASSERT(fAllocBlockCnt != 0 || fSize == 0); | 183 SkASSERT(fAllocBlockCnt != 0 || fSize == 0); |
184 #endif | 184 #endif |
185 } | 185 } |
OLD | NEW |