| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
| 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 #ifndef SkPixelRef_DEFINED | 10 #ifndef SkPixelRef_DEFINED |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 virtual void globalRef(void* data=NULL); | 200 virtual void globalRef(void* data=NULL); |
| 201 | 201 |
| 202 /** | 202 /** |
| 203 * Release a "global" ref on this object. | 203 * Release a "global" ref on this object. |
| 204 * The default implementation just calls unref(), but subclasses can overri
de | 204 * The default implementation just calls unref(), but subclasses can overri
de |
| 205 * this method to implement additional behavior. | 205 * this method to implement additional behavior. |
| 206 */ | 206 */ |
| 207 virtual void globalUnref(); | 207 virtual void globalUnref(); |
| 208 #endif | 208 #endif |
| 209 | 209 |
| 210 SK_DEFINE_FLATTENABLE_TYPE(SkPixelRef) |
| 211 |
| 210 protected: | 212 protected: |
| 211 /** Called when the lockCount goes from 0 to 1. The caller will have already | 213 /** Called when the lockCount goes from 0 to 1. The caller will have already |
| 212 acquire a mutex for thread safety, so this method need not do that. | 214 acquire a mutex for thread safety, so this method need not do that. |
| 213 */ | 215 */ |
| 214 virtual void* onLockPixels(SkColorTable**) = 0; | 216 virtual void* onLockPixels(SkColorTable**) = 0; |
| 215 /** Called when the lock count goes from 1 to 0. The caller will have | 217 /** Called when the lock count goes from 1 to 0. The caller will have |
| 216 already acquire a mutex for thread safety, so this method need not do | 218 already acquire a mutex for thread safety, so this method need not do |
| 217 that. | 219 that. |
| 218 */ | 220 */ |
| 219 virtual void onUnlockPixels() = 0; | 221 virtual void onUnlockPixels() = 0; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 bool fIsImmutable; | 272 bool fIsImmutable; |
| 271 // only ever set in constructor, const after that | 273 // only ever set in constructor, const after that |
| 272 bool fPreLocked; | 274 bool fPreLocked; |
| 273 | 275 |
| 274 void setMutex(SkBaseMutex* mutex); | 276 void setMutex(SkBaseMutex* mutex); |
| 275 | 277 |
| 276 typedef SkFlattenable INHERITED; | 278 typedef SkFlattenable INHERITED; |
| 277 }; | 279 }; |
| 278 | 280 |
| 279 #endif | 281 #endif |
| OLD | NEW |