| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkImageGenerator_DEFINED | 8 #ifndef SkImageGenerator_DEFINED |
| 9 #define SkImageGenerator_DEFINED | 9 #define SkImageGenerator_DEFINED |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Takes ownership of SkImageGenerator. If this method fails for | 25 * Takes ownership of SkImageGenerator. If this method fails for |
| 26 * whatever reason, it will return false and immediatetely delete | 26 * whatever reason, it will return false and immediatetely delete |
| 27 * the generator. If it succeeds, it will modify destination | 27 * the generator. If it succeeds, it will modify destination |
| 28 * bitmap. | 28 * bitmap. |
| 29 * | 29 * |
| 30 * If generator is NULL, will safely return false. | 30 * If generator is NULL, will safely return false. |
| 31 * | 31 * |
| 32 * If this fails or when the SkDiscardablePixelRef that is | 32 * If this fails or when the SkDiscardablePixelRef that is |
| 33 * installed into destination is destroyed, it will call | 33 * installed into destination is destroyed, it will |
| 34 * SkDELETE() on the generator. Therefore, generator should be | 34 * delete the generator. Therefore, generator should be |
| 35 * allocated with SkNEW() or SkNEW_ARGS(). | 35 * allocated with new. |
| 36 * | 36 * |
| 37 * @param destination Upon success, this bitmap will be | 37 * @param destination Upon success, this bitmap will be |
| 38 * configured and have a pixelref installed. | 38 * configured and have a pixelref installed. |
| 39 * | 39 * |
| 40 * @return true iff successful. | 40 * @return true iff successful. |
| 41 */ | 41 */ |
| 42 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio
n); | 42 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio
n); |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * On success, installs a discardable pixelref into destination, based on encod
ed data. | 45 * On success, installs a discardable pixelref into destination, based on encod
ed data. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 const SkImageInfo fInfo; | 204 const SkImageInfo fInfo; |
| 205 const uint32_t fUniqueID; | 205 const uint32_t fUniqueID; |
| 206 | 206 |
| 207 // This is our default impl, which may be different on different platforms. | 207 // This is our default impl, which may be different on different platforms. |
| 208 // It is called from NewFromEncoded() after it has checked for any runtime f
actory. | 208 // It is called from NewFromEncoded() after it has checked for any runtime f
actory. |
| 209 // The SkData will never be NULL, as that will have been checked by NewFromE
ncoded. | 209 // The SkData will never be NULL, as that will have been checked by NewFromE
ncoded. |
| 210 static SkImageGenerator* NewFromEncodedImpl(SkData*); | 210 static SkImageGenerator* NewFromEncodedImpl(SkData*); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 #endif // SkImageGenerator_DEFINED | 213 #endif // SkImageGenerator_DEFINED |
| OLD | NEW |