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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 * @param inputColorCount If the client requests kIndex8, sets | 101 * @param inputColorCount If the client requests kIndex8, sets |
102 * inputColorCount to 256. Since gifs always | 102 * inputColorCount to 256. Since gifs always |
103 * contain 8-bit indices, we need a 256 entry color | 103 * contain 8-bit indices, we need a 256 entry color |
104 * table to ensure that indexing is always in | 104 * table to ensure that indexing is always in |
105 * bounds. | 105 * bounds. |
106 */ | 106 */ |
107 void initializeColorTable(const SkImageInfo& dstInfo, SkPMColor* colorPtr, | 107 void initializeColorTable(const SkImageInfo& dstInfo, SkPMColor* colorPtr, |
108 int* inputColorCount); | 108 int* inputColorCount); |
109 | 109 |
110 /* | 110 /* |
111 * Checks for invalid inputs and calls rewindIfNeeded(), setFramDimensions(),
and | 111 * Checks for invalid inputs and calls setFrameDimensions(), and |
112 * initializeColorTable() in the proper sequence. | 112 * initializeColorTable() in the proper sequence. |
113 */ | 113 */ |
114 Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr, | 114 Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr, |
115 int* inputColorCount, const Options& opts); | 115 int* inputColorCount, const Options& opts); |
116 | 116 |
117 /* | 117 /* |
118 * Initializes the swizzler. | 118 * Initializes the swizzler. |
119 * | 119 * |
120 * @param dstInfo Output image information. Dimensions may have been | 120 * @param dstInfo Output image information. Dimensions may have been |
121 * adjusted if the image frame size does not match the size | 121 * adjusted if the image frame size does not match the size |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 168 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
169 SkIRect fFrameDims; | 169 SkIRect fFrameDims; |
170 const uint32_t fTransIndex; | 170 const uint32_t fTransIndex; |
171 uint32_t fFillIndex; | 171 uint32_t fFillIndex; |
172 bool fFrameIsSubset; | 172 bool fFrameIsSubset; |
173 SkAutoTDelete<SkSwizzler> fSwizzler; | 173 SkAutoTDelete<SkSwizzler> fSwizzler; |
174 SkAutoTUnref<SkColorTable> fColorTable; | 174 SkAutoTUnref<SkColorTable> fColorTable; |
175 | 175 |
176 typedef SkCodec INHERITED; | 176 typedef SkCodec INHERITED; |
177 }; | 177 }; |
OLD | NEW |