OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 #include "SkBitmapHeap.h" | 9 #include "SkBitmapHeap.h" |
10 | 10 |
11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
12 #include "SkFlattenableBuffers.h" | 12 #include "SkReadBuffer.h" |
| 13 #include "SkWriteBuffer.h" |
13 #include "SkTSearch.h" | 14 #include "SkTSearch.h" |
14 | 15 |
15 SkBitmapHeapEntry::SkBitmapHeapEntry() | 16 SkBitmapHeapEntry::SkBitmapHeapEntry() |
16 : fSlot(-1) | 17 : fSlot(-1) |
17 , fRefCount(0) | 18 , fRefCount(0) |
18 , fBytesAllocated(0) { | 19 , fBytesAllocated(0) { |
19 } | 20 } |
20 | 21 |
21 SkBitmapHeapEntry::~SkBitmapHeapEntry() { | 22 SkBitmapHeapEntry::~SkBitmapHeapEntry() { |
22 SkASSERT(0 == fRefCount); | 23 SkASSERT(0 == fRefCount); |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 for (int i = 0; i < fDeferredEntries.count(); i++) { | 399 for (int i = 0; i < fDeferredEntries.count(); i++) { |
399 SkASSERT(fOwnerCount != IGNORE_OWNERS); | 400 SkASSERT(fOwnerCount != IGNORE_OWNERS); |
400 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); | 401 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); |
401 SkASSERT(heapEntry != NULL); | 402 SkASSERT(heapEntry != NULL); |
402 heapEntry->addReferences(fOwnerCount); | 403 heapEntry->addReferences(fOwnerCount); |
403 } | 404 } |
404 } | 405 } |
405 fDeferAddingOwners = false; | 406 fDeferAddingOwners = false; |
406 fDeferredEntries.reset(); | 407 fDeferredEntries.reset(); |
407 } | 408 } |
OLD | NEW |