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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 * | 107 * |
108 */ | 108 */ |
109 static bool ReadHeader(SkStream*, bool isIco, SkCodec** codecOut); | 109 static bool ReadHeader(SkStream*, bool isIco, SkCodec** codecOut); |
110 | 110 |
111 /* | 111 /* |
112 * | 112 * |
113 * Performs the bitmap decoding for bit masks input format | 113 * Performs the bitmap decoding for bit masks input format |
114 * | 114 * |
115 */ | 115 */ |
116 Result decodeMask(const SkImageInfo& dstInfo, void* dst, | 116 Result decodeMask(const SkImageInfo& dstInfo, void* dst, |
117 size_t dstRowBytes); | 117 size_t dstRowBytes, const Options& opts); |
118 | 118 |
119 /* | 119 /* |
120 * | 120 * |
121 * Set an RLE pixel using the color table | 121 * Set an RLE pixel using the color table |
122 * | 122 * |
123 */ | 123 */ |
124 void setRLEPixel(void* dst, size_t dstRowBytes, | 124 void setRLEPixel(void* dst, size_t dstRowBytes, |
125 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, | 125 const SkImageInfo& dstInfo, uint32_t x, uint32_t y, |
126 uint8_t index); | 126 uint8_t index); |
127 /* | 127 /* |
(...skipping 11 matching lines...) Expand all Loading... |
139 * | 139 * |
140 */ | 140 */ |
141 Result decodeRLE(const SkImageInfo& dstInfo, void* dst, | 141 Result decodeRLE(const SkImageInfo& dstInfo, void* dst, |
142 size_t dstRowBytes, const Options& opts); | 142 size_t dstRowBytes, const Options& opts); |
143 | 143 |
144 /* | 144 /* |
145 * | 145 * |
146 * Performs the bitmap decoding for standard input format | 146 * Performs the bitmap decoding for standard input format |
147 * | 147 * |
148 */ | 148 */ |
149 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes); | 149 Result decode(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, con
st Options& opts); |
150 | 150 |
151 /* | 151 /* |
152 * | 152 * |
153 * Creates an instance of the decoder | 153 * Creates an instance of the decoder |
154 * Called only by NewFromStream | 154 * Called only by NewFromStream |
155 * | 155 * |
156 * @param srcInfo contains the source width and height | 156 * @param srcInfo contains the source width and height |
157 * @param stream the stream of image data | 157 * @param stream the stream of image data |
158 * @param bitsPerPixel the number of bits used to store each pixel | 158 * @param bitsPerPixel the number of bits used to store each pixel |
159 * @param format the format of the bmp file | 159 * @param format the format of the bmp file |
(...skipping 24 matching lines...) Expand all Loading... |
184 SkAutoTUnref<SkColorTable> fColorTable; // owned | 184 SkAutoTUnref<SkColorTable> fColorTable; // owned |
185 uint32_t fNumColors; | 185 uint32_t fNumColors; |
186 const uint32_t fBytesPerColor; | 186 const uint32_t fBytesPerColor; |
187 const uint32_t fOffset; | 187 const uint32_t fOffset; |
188 const RowOrder fRowOrder; | 188 const RowOrder fRowOrder; |
189 const size_t fRLEBytes; | 189 const size_t fRLEBytes; |
190 const bool fIsIco; | 190 const bool fIsIco; |
191 | 191 |
192 typedef SkCodec INHERITED; | 192 typedef SkCodec INHERITED; |
193 }; | 193 }; |
OLD | NEW |