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 | |
11 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
12 #include "SkReadBuffer.h" | |
13 #include "SkWriteBuffer.h" | |
14 #include "SkTSearch.h" | 11 #include "SkTSearch.h" |
15 | 12 |
16 SkBitmapHeapEntry::SkBitmapHeapEntry() | 13 SkBitmapHeapEntry::SkBitmapHeapEntry() |
17 : fSlot(-1) | 14 : fSlot(-1) |
18 , fRefCount(0) | 15 , fRefCount(0) |
19 , fBytesAllocated(0) { | 16 , fBytesAllocated(0) { |
20 } | 17 } |
21 | 18 |
22 SkBitmapHeapEntry::~SkBitmapHeapEntry() { | 19 SkBitmapHeapEntry::~SkBitmapHeapEntry() { |
23 SkASSERT(0 == fRefCount); | 20 SkASSERT(0 == fRefCount); |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 for (int i = 0; i < fDeferredEntries.count(); i++) { | 383 for (int i = 0; i < fDeferredEntries.count(); i++) { |
387 SkASSERT(fOwnerCount != IGNORE_OWNERS); | 384 SkASSERT(fOwnerCount != IGNORE_OWNERS); |
388 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); | 385 SkBitmapHeapEntry* heapEntry = this->getEntry(fDeferredEntries[i]); |
389 SkASSERT(heapEntry != NULL); | 386 SkASSERT(heapEntry != NULL); |
390 heapEntry->addReferences(fOwnerCount); | 387 heapEntry->addReferences(fOwnerCount); |
391 } | 388 } |
392 } | 389 } |
393 fDeferAddingOwners = false; | 390 fDeferAddingOwners = false; |
394 fDeferredEntries.reset(); | 391 fDeferredEntries.reset(); |
395 } | 392 } |
OLD | NEW |