| 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 21 matching lines...) Expand all Loading... |
| 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 | 33 * installed into destination is destroyed, it will |
| 34 * delete the generator. Therefore, generator should be | 34 * delete the generator. Therefore, generator should be |
| 35 * allocated with new. | 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 SkDEPRECATED_InstallDiscardablePixelRef(SkImageGenerator*, SkBitmap*
destination); |
| 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. |
| 46 * Regardless of success or failure, the caller must still balance their owners
hip of encoded. | 46 * Regardless of success or failure, the caller must still balance their owners
hip of encoded. |
| 47 */ | 47 */ |
| 48 SK_API bool SkInstallDiscardablePixelRef(SkData* encoded, SkBitmap* destination)
; | 48 SK_API bool SkDEPRECATED_InstallDiscardablePixelRef(SkData* encoded, SkBitmap* d
estination); |
| 49 | 49 |
| 50 /** | 50 /** |
| 51 * An interface that allows a purgeable PixelRef (such as a | 51 * An interface that allows a purgeable PixelRef (such as a |
| 52 * SkDiscardablePixelRef) to decode and re-decode an image as needed. | 52 * SkDiscardablePixelRef) to decode and re-decode an image as needed. |
| 53 */ | 53 */ |
| 54 class SK_API SkImageGenerator : public SkNoncopyable { | 54 class SK_API SkImageGenerator : public SkNoncopyable { |
| 55 public: | 55 public: |
| 56 /** | 56 /** |
| 57 * The PixelRef which takes ownership of this SkImageGenerator | 57 * The PixelRef which takes ownership of this SkImageGenerator |
| 58 * will call the image generator's destructor. | 58 * will call the image generator's destructor. |
| (...skipping 145 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 |