OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkJpegCodec_DEFINED | 8 #ifndef SkJpegCodec_DEFINED |
9 #define SkJpegCodec_DEFINED | 9 #define SkJpegCodec_DEFINED |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 * Recommend a set of destination dimensions given a requested scale | 41 * Recommend a set of destination dimensions given a requested scale |
42 */ | 42 */ |
43 SkISize onGetScaledDimensions(float desiredScale) const override; | 43 SkISize onGetScaledDimensions(float desiredScale) const override; |
44 | 44 |
45 /* | 45 /* |
46 * Initiates the jpeg decode | 46 * Initiates the jpeg decode |
47 */ | 47 */ |
48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes
, const Options&, | 48 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes
, const Options&, |
49 SkPMColor*, int*, int*) override; | 49 SkPMColor*, int*, int*) override; |
50 | 50 |
| 51 bool onQueryYUV8(YUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const o
verride; |
| 52 |
| 53 Result onGetYUV8Planes(const YUVSizeInfo& sizeInfo, void* pixels[3]) overrid
e; |
| 54 |
51 SkEncodedFormat onGetEncodedFormat() const override { | 55 SkEncodedFormat onGetEncodedFormat() const override { |
52 return kJPEG_SkEncodedFormat; | 56 return kJPEG_SkEncodedFormat; |
53 } | 57 } |
54 | 58 |
55 bool onRewind() override; | 59 bool onRewind() override; |
56 | 60 |
57 bool onDimensionsSupported(const SkISize&) override; | 61 bool onDimensionsSupported(const SkISize&) override; |
58 | 62 |
59 private: | 63 private: |
60 | 64 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 117 |
114 // scanline decoding | 118 // scanline decoding |
115 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed | 119 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed |
116 uint8_t* fSrcRow; // Only used if sampling is needed | 120 uint8_t* fSrcRow; // Only used if sampling is needed |
117 SkAutoTDelete<SkSwizzler> fSwizzler; | 121 SkAutoTDelete<SkSwizzler> fSwizzler; |
118 | 122 |
119 typedef SkCodec INHERITED; | 123 typedef SkCodec INHERITED; |
120 }; | 124 }; |
121 | 125 |
122 #endif | 126 #endif |
OLD | NEW |