| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 // Takes ownership of listener. | 239 // Takes ownership of listener. |
| 240 void addGenIDChangeListener(GenIDChangeListener* listener); | 240 void addGenIDChangeListener(GenIDChangeListener* listener); |
| 241 | 241 |
| 242 protected: | 242 protected: |
| 243 /** Called when the lockCount goes from 0 to 1. The caller will have already | 243 /** Called when the lockCount goes from 0 to 1. The caller will have already |
| 244 acquire a mutex for thread safety, so this method need not do that. | 244 acquire a mutex for thread safety, so this method need not do that. |
| 245 */ | 245 */ |
| 246 virtual void* onLockPixels(SkColorTable**) = 0; | 246 virtual void* onLockPixels(SkColorTable**) = 0; |
| 247 | 247 /** Called when the lock count goes from 1 to 0. The caller will have |
| 248 /** | 248 already acquire a mutex for thread safety, so this method need not do |
| 249 * Called when the lock count goes from 1 to 0. The caller will have | 249 that. |
| 250 * already acquire a mutex for thread safety, so this method need not do | 250 */ |
| 251 * that. | |
| 252 * | |
| 253 * If the previous call to onLockPixels failed (i.e. returned NULL), then | |
| 254 * the onUnlockPixels will NOT be called. | |
| 255 */ | |
| 256 virtual void onUnlockPixels() = 0; | 251 virtual void onUnlockPixels() = 0; |
| 257 | 252 |
| 258 /** Default impl returns true */ | 253 /** Default impl returns true */ |
| 259 virtual bool onLockPixelsAreWritable() const; | 254 virtual bool onLockPixelsAreWritable() const; |
| 260 | 255 |
| 261 // returns false; | 256 // returns false; |
| 262 virtual bool onImplementsDecodeInto(); | 257 virtual bool onImplementsDecodeInto(); |
| 263 // returns false; | 258 // returns false; |
| 264 virtual bool onDecodeInto(int pow2, SkBitmap* bitmap); | 259 virtual bool onDecodeInto(int pow2, SkBitmap* bitmap); |
| 265 | 260 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 320 |
| 326 // When copying a bitmap to another with the same shape and config, we can s
afely | 321 // When copying a bitmap to another with the same shape and config, we can s
afely |
| 327 // clone the pixelref generation ID too, which makes them equivalent under c
aching. | 322 // clone the pixelref generation ID too, which makes them equivalent under c
aching. |
| 328 friend class SkBitmap; // only for cloneGenID | 323 friend class SkBitmap; // only for cloneGenID |
| 329 void cloneGenID(const SkPixelRef&); | 324 void cloneGenID(const SkPixelRef&); |
| 330 | 325 |
| 331 typedef SkFlattenable INHERITED; | 326 typedef SkFlattenable INHERITED; |
| 332 }; | 327 }; |
| 333 | 328 |
| 334 #endif | 329 #endif |
| OLD | NEW |