| 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 |
| 11 #include "SkCodec.h" | 11 #include "SkCodec.h" |
| 12 #include "SkImageInfo.h" | 12 #include "SkImageInfo.h" |
| 13 #include "SkJpegDecoderMgr.h" | 13 #include "SkSwizzler.h" |
| 14 #include "SkJpegUtility_codec.h" | |
| 15 #include "SkStream.h" | 14 #include "SkStream.h" |
| 16 #include "SkTemplates.h" | 15 #include "SkTemplates.h" |
| 17 | 16 |
| 18 extern "C" { | 17 class JpegDecoderMgr; |
| 19 #include "jpeglib.h" | |
| 20 } | |
| 21 | 18 |
| 22 /* | 19 /* |
| 23 * | 20 * |
| 24 * This class implements the decoding for jpeg images | 21 * This class implements the decoding for jpeg images |
| 25 * | 22 * |
| 26 */ | 23 */ |
| 27 class SkJpegCodec : public SkCodec { | 24 class SkJpegCodec : public SkCodec { |
| 28 public: | 25 public: |
| 29 static bool IsJpeg(const void*, size_t); | 26 static bool IsJpeg(const void*, size_t); |
| 30 | 27 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 114 |
| 118 // scanline decoding | 115 // scanline decoding |
| 119 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed | 116 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed |
| 120 uint8_t* fSrcRow; // Only used if sampling is needed | 117 uint8_t* fSrcRow; // Only used if sampling is needed |
| 121 SkAutoTDelete<SkSwizzler> fSwizzler; | 118 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 122 | 119 |
| 123 typedef SkCodec INHERITED; | 120 typedef SkCodec INHERITED; |
| 124 }; | 121 }; |
| 125 | 122 |
| 126 #endif | 123 #endif |
| OLD | NEW |