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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 */ | 64 */ |
65 Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, | 65 Result onGetPixels(const SkImageInfo&, void*, size_t, const Options&, |
66 SkPMColor*, int32_t*) override; | 66 SkPMColor*, int32_t*) override; |
67 | 67 |
68 SkEncodedFormat onGetEncodedFormat() const override { | 68 SkEncodedFormat onGetEncodedFormat() const override { |
69 return kGIF_SkEncodedFormat; | 69 return kGIF_SkEncodedFormat; |
70 } | 70 } |
71 | 71 |
72 bool onRewind() override; | 72 bool onRewind() override; |
73 | 73 |
| 74 uint32_t onGetFillValue(const SkImageInfo& dstInfo) const override; |
| 75 |
74 private: | 76 private: |
75 | 77 |
76 /* | 78 /* |
77 * A gif can contain multiple image frames. We will only decode the first | 79 * A gif can contain multiple image frames. We will only decode the first |
78 * frame. This function reads up to the first image frame, processing | 80 * frame. This function reads up to the first image frame, processing |
79 * transparency and/or animation information that comes before the image | 81 * transparency and/or animation information that comes before the image |
80 * data. | 82 * data. |
81 * | 83 * |
82 * @param gif Pointer to the library type that manages the gif decode | 84 * @param gif Pointer to the library type that manages the gif decode |
83 * @param transIndex This call will set the transparent index based on the | 85 * @param transIndex This call will set the transparent index based on the |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 const uint32_t fTransIndex; | 167 const uint32_t fTransIndex; |
166 uint32_t fFillIndex; | 168 uint32_t fFillIndex; |
167 bool fFrameIsSubset; | 169 bool fFrameIsSubset; |
168 SkAutoTDelete<SkSwizzler> fSwizzler; | 170 SkAutoTDelete<SkSwizzler> fSwizzler; |
169 SkAutoTUnref<SkColorTable> fColorTable; | 171 SkAutoTUnref<SkColorTable> fColorTable; |
170 | 172 |
171 friend class SkGifScanlineDecoder; | 173 friend class SkGifScanlineDecoder; |
172 | 174 |
173 typedef SkCodec INHERITED; | 175 typedef SkCodec INHERITED; |
174 }; | 176 }; |
OLD | NEW |