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 18 matching lines...) Expand all Loading... |
29 * allocated with SkNEW() or SkNEW_ARGS(). | 29 * allocated with SkNEW() or SkNEW_ARGS(). |
30 * | 30 * |
31 * @param destination Upon success, this bitmap will be | 31 * @param destination Upon success, this bitmap will be |
32 * configured and have a pixelref installed. | 32 * configured and have a pixelref installed. |
33 * | 33 * |
34 * @return true iff successful. | 34 * @return true iff successful. |
35 */ | 35 */ |
36 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio
n); | 36 SK_API bool SkInstallDiscardablePixelRef(SkImageGenerator*, SkBitmap* destinatio
n); |
37 | 37 |
38 /** | 38 /** |
39 * On success, installs a discradable pixelref into destination, based on encod
ed data. | 39 * On success, installs a discardable pixelref into destination, based on encod
ed data. |
40 * Regardless of success or failure, the caller must still balance their owners
hip of encoded. | 40 * Regardless of success or failure, the caller must still balance their owners
hip of encoded. |
41 */ | 41 */ |
42 SK_API bool SkInstallDiscardablePixelRef(SkData* encoded, SkBitmap* destination)
; | 42 SK_API bool SkInstallDiscardablePixelRef(SkData* encoded, SkBitmap* destination)
; |
43 | 43 |
44 /** | 44 /** |
45 * An interface that allows a purgeable PixelRef (such as a | 45 * An interface that allows a purgeable PixelRef (such as a |
46 * SkDiscardablePixelRef) to decode and re-decode an image as needed. | 46 * SkDiscardablePixelRef) to decode and re-decode an image as needed. |
47 */ | 47 */ |
48 class SK_API SkImageGenerator { | 48 class SK_API SkImageGenerator { |
49 public: | 49 public: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 virtual bool onGetInfo(SkImageInfo* info); | 133 virtual bool onGetInfo(SkImageInfo* info); |
134 virtual bool onGetPixels(const SkImageInfo& info, | 134 virtual bool onGetPixels(const SkImageInfo& info, |
135 void* pixels, size_t rowBytes, | 135 void* pixels, size_t rowBytes, |
136 SkPMColor ctable[], int* ctableCount); | 136 SkPMColor ctable[], int* ctableCount); |
137 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy
tes[3]); | 137 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy
tes[3]); |
138 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy
tes[3], | 138 virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy
tes[3], |
139 SkYUVColorSpace* colorSpace); | 139 SkYUVColorSpace* colorSpace); |
140 }; | 140 }; |
141 | 141 |
142 #endif // SkImageGenerator_DEFINED | 142 #endif // SkImageGenerator_DEFINED |
OLD | NEW |