OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 | 9 |
10 #include "SkBitmapHeap.h" | 10 #include "SkBitmapHeap.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bm = fBitmaps[index]; | 155 bm = fBitmaps[index]; |
156 } | 156 } |
157 fReader->readBitmap(bm); | 157 fReader->readBitmap(bm); |
158 } | 158 } |
159 | 159 |
160 /** | 160 /** |
161 * Override of SkBitmapHeapReader, so that SkReadBuffer can use | 161 * Override of SkBitmapHeapReader, so that SkReadBuffer can use |
162 * these SkBitmaps for bitmap shaders. Used only in cross process mode | 162 * these SkBitmaps for bitmap shaders. Used only in cross process mode |
163 * without a shared heap. | 163 * without a shared heap. |
164 */ | 164 */ |
165 SkBitmap* getBitmap(int32_t index) const SK_OVERRIDE { | 165 SkBitmap* getBitmap(int32_t index) const override { |
166 SkASSERT(shouldFlattenBitmaps(fFlags)); | 166 SkASSERT(shouldFlattenBitmaps(fFlags)); |
167 return fBitmaps[index]; | 167 return fBitmaps[index]; |
168 } | 168 } |
169 | 169 |
170 /** | 170 /** |
171 * Needed to be a non-abstract subclass of SkBitmapHeapReader. | 171 * Needed to be a non-abstract subclass of SkBitmapHeapReader. |
172 */ | 172 */ |
173 void releaseRef(int32_t) SK_OVERRIDE {} | 173 void releaseRef(int32_t) override {} |
174 | 174 |
175 void setSharedHeap(SkBitmapHeap* heap) { | 175 void setSharedHeap(SkBitmapHeap* heap) { |
176 SkASSERT(!shouldFlattenBitmaps(fFlags) || NULL == heap); | 176 SkASSERT(!shouldFlattenBitmaps(fFlags) || NULL == heap); |
177 SkRefCnt_SafeAssign(fSharedHeap, heap); | 177 SkRefCnt_SafeAssign(fSharedHeap, heap); |
178 this->updateReader(); | 178 this->updateReader(); |
179 } | 179 } |
180 | 180 |
181 /** | 181 /** |
182 * Access the shared heap. Only used in the case when bitmaps are not | 182 * Access the shared heap. Only used in the case when bitmaps are not |
183 * flattened. | 183 * flattened. |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 status = kReadAtom_Status; | 919 status = kReadAtom_Status; |
920 break; | 920 break; |
921 } | 921 } |
922 } | 922 } |
923 | 923 |
924 if (bytesRead) { | 924 if (bytesRead) { |
925 *bytesRead = reader.offset(); | 925 *bytesRead = reader.offset(); |
926 } | 926 } |
927 return status; | 927 return status; |
928 } | 928 } |
OLD | NEW |