Chromium Code Reviews| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 * For pixelrefs that don't have access to their raw pixels, they may be | 250 * For pixelrefs that don't have access to their raw pixels, they may be |
| 251 * able to make a copy of them (e.g. if the pixels are on the GPU). | 251 * able to make a copy of them (e.g. if the pixels are on the GPU). |
| 252 * | 252 * |
| 253 * The base class implementation returns false; | 253 * The base class implementation returns false; |
| 254 */ | 254 */ |
| 255 virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subsetOrNull); | 255 virtual bool onReadPixels(SkBitmap* dst, const SkIRect* subsetOrNull); |
| 256 | 256 |
| 257 // default impl returns NULL. | 257 // default impl returns NULL. |
| 258 virtual SkData* onRefEncodedData(); | 258 virtual SkData* onRefEncodedData(); |
| 259 | 259 |
| 260 // default impl returns 0. | |
|
reed1
2013/12/03 19:02:50
Lets change the dox to document what this does/ret
sugoi
2013/12/03 19:07:22
I'll add the dox. It should return the allocated s
sugoi
2013/12/03 19:18:06
Done.
| |
| 261 virtual size_t getSize() const; | |
| 262 | |
| 260 /** Return the mutex associated with this pixelref. This value is assigned | 263 /** Return the mutex associated with this pixelref. This value is assigned |
| 261 in the constructor, and cannot change during the lifetime of the object. | 264 in the constructor, and cannot change during the lifetime of the object. |
| 262 */ | 265 */ |
| 263 SkBaseMutex* mutex() const { return fMutex; } | 266 SkBaseMutex* mutex() const { return fMutex; } |
| 264 | 267 |
| 265 // serialization | 268 // serialization |
| 266 SkPixelRef(SkFlattenableReadBuffer&, SkBaseMutex*); | 269 SkPixelRef(SkFlattenableReadBuffer&, SkBaseMutex*); |
| 267 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; | 270 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; |
| 268 | 271 |
| 269 // only call from constructor. Flags this to always be locked, removing | 272 // only call from constructor. Flags this to always be locked, removing |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 296 | 299 |
| 297 // When copying a bitmap to another with the same shape and config, we can s afely | 300 // When copying a bitmap to another with the same shape and config, we can s afely |
| 298 // clone the pixelref generation ID too, which makes them equivalent under c aching. | 301 // clone the pixelref generation ID too, which makes them equivalent under c aching. |
| 299 friend class SkBitmap; // only for cloneGenID | 302 friend class SkBitmap; // only for cloneGenID |
| 300 void cloneGenID(const SkPixelRef&); | 303 void cloneGenID(const SkPixelRef&); |
| 301 | 304 |
| 302 typedef SkFlattenable INHERITED; | 305 typedef SkFlattenable INHERITED; |
| 303 }; | 306 }; |
| 304 | 307 |
| 305 #endif | 308 #endif |
| OLD | NEW |