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 "SkFlattenableBuffers.h" |
13 #include "SkTSearch.h" | 13 #include "SkTSearch.h" |
14 | 14 |
15 SK_DEFINE_INST_COUNT(SkBitmapHeapReader) | |
16 SK_DEFINE_INST_COUNT(SkBitmapHeap::ExternalStorage) | |
17 | |
18 SkBitmapHeapEntry::SkBitmapHeapEntry() | 15 SkBitmapHeapEntry::SkBitmapHeapEntry() |
19 : fSlot(-1) | 16 : fSlot(-1) |
20 , fRefCount(0) | 17 , fRefCount(0) |
21 , fBytesAllocated(0) { | 18 , fBytesAllocated(0) { |
22 } | 19 } |
23 | 20 |
24 SkBitmapHeapEntry::~SkBitmapHeapEntry() { | 21 SkBitmapHeapEntry::~SkBitmapHeapEntry() { |
25 SkASSERT(0 == fRefCount); | 22 SkASSERT(0 == fRefCount); |
26 } | 23 } |
27 | 24 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 for (int i = 0; i < fDeferredEntries.count(); i++) { | 390 for (int i = 0; i < fDeferredEntries.count(); i++) { |
394 SkASSERT(fOwnerCount != IGNORE_OWNERS); | 391 SkASSERT(fOwnerCount != IGNORE_OWNERS); |
395 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); | 392 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); |
396 SkASSERT(heapEntry != NULL); | 393 SkASSERT(heapEntry != NULL); |
397 heapEntry->addReferences(fOwnerCount); | 394 heapEntry->addReferences(fOwnerCount); |
398 } | 395 } |
399 } | 396 } |
400 fDeferAddingOwners = false; | 397 fDeferAddingOwners = false; |
401 fDeferredEntries.reset(); | 398 fDeferredEntries.reset(); |
402 } | 399 } |
OLD | NEW |