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 27 matching lines...) Expand all Loading... |
38 * Recommend a set of destination dimensions given a requested scale | 38 * Recommend a set of destination dimensions given a requested scale |
39 */ | 39 */ |
40 SkISize onGetScaledDimensions(float desiredScale) const override; | 40 SkISize onGetScaledDimensions(float desiredScale) const override; |
41 | 41 |
42 /* | 42 /* |
43 * Initiates the jpeg decode | 43 * Initiates the jpeg decode |
44 */ | 44 */ |
45 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes
, const Options&, | 45 Result onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes
, const Options&, |
46 SkPMColor*, int*, int*) override; | 46 SkPMColor*, int*, int*) override; |
47 | 47 |
48 bool onQueryYUV8(YUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const o
verride; | 48 bool onQueryYUV8(SkYUVSizeInfo* sizeInfo, SkYUVColorSpace* colorSpace) const
override; |
49 | 49 |
50 Result onGetYUV8Planes(const YUVSizeInfo& sizeInfo, void* pixels[3]) overrid
e; | 50 Result onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3]) overr
ide; |
51 | 51 |
52 SkEncodedFormat onGetEncodedFormat() const override { | 52 SkEncodedFormat onGetEncodedFormat() const override { |
53 return kJPEG_SkEncodedFormat; | 53 return kJPEG_SkEncodedFormat; |
54 } | 54 } |
55 | 55 |
56 bool onRewind() override; | 56 bool onRewind() override; |
57 | 57 |
58 bool onDimensionsSupported(const SkISize&) override; | 58 bool onDimensionsSupported(const SkISize&) override; |
59 | 59 |
60 private: | 60 private: |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo | 118 // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo |
119 // cannot take the exact the subset that we need, we will use the swizzler | 119 // cannot take the exact the subset that we need, we will use the swizzler |
120 // to further subset the output from libjpeg-turbo. | 120 // to further subset the output from libjpeg-turbo. |
121 SkIRect fSwizzlerSubset; | 121 SkIRect fSwizzlerSubset; |
122 SkAutoTDelete<SkSwizzler> fSwizzler; | 122 SkAutoTDelete<SkSwizzler> fSwizzler; |
123 | 123 |
124 typedef SkCodec INHERITED; | 124 typedef SkCodec INHERITED; |
125 }; | 125 }; |
126 | 126 |
127 #endif | 127 #endif |
OLD | NEW |