Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: src/core/SkBitmapHeap.h

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/core/SkBitmapFilter.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 virtual SkBitmap* getBitmap(int32_t slot) const SK_OVERRIDE { 120 SkBitmap* getBitmap(int32_t slot) const SK_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 virtual void releaseRef(int32_t slot) SK_OVERRIDE { 134 void releaseRef(int32_t slot) SK_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
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
OLDNEW
« no previous file with comments | « src/core/SkBitmapFilter.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698