| 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 #ifndef SkBitmapHeap_DEFINED | 8 #ifndef SkBitmapHeap_DEFINED |
| 9 #define SkBitmapHeap_DEFINED | 9 #define SkBitmapHeap_DEFINED |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 */ | 110 */ |
| 111 SkBitmapHeap(ExternalStorage* externalStorage, int32_t heapSize = UNLIMITED_
SIZE); | 111 SkBitmapHeap(ExternalStorage* externalStorage, int32_t heapSize = UNLIMITED_
SIZE); |
| 112 | 112 |
| 113 virtual ~SkBitmapHeap(); | 113 virtual ~SkBitmapHeap(); |
| 114 | 114 |
| 115 /** | 115 /** |
| 116 * Retrieves the bitmap from the specified slot in the heap | 116 * Retrieves the bitmap from the specified slot in the heap |
| 117 * | 117 * |
| 118 * @return The bitmap located at that slot or NULL if external storage is b
eing used. | 118 * @return The bitmap located at that slot or NULL if external storage is b
eing used. |
| 119 */ | 119 */ |
| 120 SkBitmap* getBitmap(int32_t slot) const SK_OVERRIDE { | 120 SkBitmap* getBitmap(int32_t slot) const override { |
| 121 SkASSERT(fExternalStorage == NULL); | 121 SkASSERT(fExternalStorage == NULL); |
| 122 SkBitmapHeapEntry* entry = getEntry(slot); | 122 SkBitmapHeapEntry* entry = getEntry(slot); |
| 123 if (entry) { | 123 if (entry) { |
| 124 return &entry->fBitmap; | 124 return &entry->fBitmap; |
| 125 } | 125 } |
| 126 return NULL; | 126 return NULL; |
| 127 } | 127 } |
| 128 | 128 |
| 129 /** | 129 /** |
| 130 * Retrieves the bitmap from the specified slot in the heap | 130 * Retrieves the bitmap from the specified slot in the heap |
| 131 * | 131 * |
| 132 * @return The bitmap located at that slot or NULL if external storage is b
eing used. | 132 * @return The bitmap located at that slot or NULL if external storage is b
eing used. |
| 133 */ | 133 */ |
| 134 void releaseRef(int32_t slot) SK_OVERRIDE { | 134 void releaseRef(int32_t slot) override { |
| 135 SkASSERT(fExternalStorage == NULL); | 135 SkASSERT(fExternalStorage == NULL); |
| 136 if (fOwnerCount != IGNORE_OWNERS) { | 136 if (fOwnerCount != IGNORE_OWNERS) { |
| 137 SkBitmapHeapEntry* entry = getEntry(slot); | 137 SkBitmapHeapEntry* entry = getEntry(slot); |
| 138 if (entry) { | 138 if (entry) { |
| 139 entry->releaseRef(); | 139 entry->releaseRef(); |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 | 143 |
| 144 /** | 144 /** |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 const int32_t fOwnerCount; | 289 const int32_t fOwnerCount; |
| 290 size_t fBytesAllocated; | 290 size_t fBytesAllocated; |
| 291 | 291 |
| 292 bool fDeferAddingOwners; | 292 bool fDeferAddingOwners; |
| 293 SkTDArray<int> fDeferredEntries; | 293 SkTDArray<int> fDeferredEntries; |
| 294 | 294 |
| 295 typedef SkBitmapHeapReader INHERITED; | 295 typedef SkBitmapHeapReader INHERITED; |
| 296 }; | 296 }; |
| 297 | 297 |
| 298 #endif // SkBitmapHeap_DEFINED | 298 #endif // SkBitmapHeap_DEFINED |
| OLD | NEW |