| 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 #include "SkCodec.h" | 8 #include "SkCodec.h" |
| 9 #include "SkColorTable.h" | 9 #include "SkColorTable.h" |
| 10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 SkPMColor*, int*, int*) override; | 63 SkPMColor*, int*, int*) override; |
| 64 | 64 |
| 65 SkEncodedFormat onGetEncodedFormat() const override { | 65 SkEncodedFormat onGetEncodedFormat() const override { |
| 66 return kGIF_SkEncodedFormat; | 66 return kGIF_SkEncodedFormat; |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool onRewind() override; | 69 bool onRewind() override; |
| 70 | 70 |
| 71 uint32_t onGetFillValue(SkColorType colorType, SkAlphaType alphaType) const
override; | 71 uint32_t onGetFillValue(SkColorType colorType, SkAlphaType alphaType) const
override; |
| 72 | 72 |
| 73 int onOutputScanline(int inputScanline) const; | 73 int onOutputScanline(int inputScanline) const override; |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 | 76 |
| 77 /* | 77 /* |
| 78 * A gif can contain multiple image frames. We will only decode the first | 78 * A gif can contain multiple image frames. We will only decode the first |
| 79 * frame. This function reads up to the first image frame, processing | 79 * frame. This function reads up to the first image frame, processing |
| 80 * transparency and/or animation information that comes before the image | 80 * transparency and/or animation information that comes before the image |
| 81 * data. | 81 * data. |
| 82 * | 82 * |
| 83 * @param gif Pointer to the library type that manages the gif decode | 83 * @param gif Pointer to the library type that manages the gif decode |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 182 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
| 183 const SkIRect fFrameRect; | 183 const SkIRect fFrameRect; |
| 184 const uint32_t fTransIndex; | 184 const uint32_t fTransIndex; |
| 185 uint32_t fFillIndex; | 185 uint32_t fFillIndex; |
| 186 const bool fFrameIsSubset; | 186 const bool fFrameIsSubset; |
| 187 SkAutoTDelete<SkSwizzler> fSwizzler; | 187 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 188 SkAutoTUnref<SkColorTable> fColorTable; | 188 SkAutoTUnref<SkColorTable> fColorTable; |
| 189 | 189 |
| 190 typedef SkCodec INHERITED; | 190 typedef SkCodec INHERITED; |
| 191 }; | 191 }; |
| OLD | NEW |