| 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, |
| 51 void* pixels[SkYUVSizeInfo::kPlaneCount]) override; |
| 51 | 52 |
| 52 SkEncodedFormat onGetEncodedFormat() const override { | 53 SkEncodedFormat onGetEncodedFormat() const override { |
| 53 return kJPEG_SkEncodedFormat; | 54 return kJPEG_SkEncodedFormat; |
| 54 } | 55 } |
| 55 | 56 |
| 56 bool onRewind() override; | 57 bool onRewind() override; |
| 57 | 58 |
| 58 bool onDimensionsSupported(const SkISize&) override; | 59 bool onDimensionsSupported(const SkISize&) override; |
| 59 | 60 |
| 60 private: | 61 private: |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 115 |
| 115 // scanline decoding | 116 // scanline decoding |
| 116 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed | 117 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed |
| 117 uint8_t* fSrcRow; // Only used if sampling is needed | 118 uint8_t* fSrcRow; // Only used if sampling is needed |
| 118 SkAutoTDelete<SkSwizzler> fSwizzler; | 119 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 119 | 120 |
| 120 typedef SkCodec INHERITED; | 121 typedef SkCodec INHERITED; |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 #endif | 124 #endif |
| OLD | NEW |