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