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 SkSwizzler_DEFINED | 8 #ifndef SkSwizzler_DEFINED |
9 #define SkSwizzler_DEFINED | 9 #define SkSwizzler_DEFINED |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 | 156 |
157 /** | 157 /** |
158 * Implement fill using a custom width. | 158 * Implement fill using a custom width. |
159 */ | 159 */ |
160 void fill(const SkImageInfo& info, void* dst, size_t rowBytes, uint32_t colo rOrIndex, | 160 void fill(const SkImageInfo& info, void* dst, size_t rowBytes, uint32_t colo rOrIndex, |
161 SkCodec::ZeroInitialized zeroInit) override { | 161 SkCodec::ZeroInitialized zeroInit) override { |
162 const SkImageInfo fillInfo = info.makeWH(fAllocatedWidth, info.height()) ; | 162 const SkImageInfo fillInfo = info.makeWH(fAllocatedWidth, info.height()) ; |
163 SkSampler::Fill(fillInfo, dst, rowBytes, colorOrIndex, zeroInit); | 163 SkSampler::Fill(fillInfo, dst, rowBytes, colorOrIndex, zeroInit); |
164 } | 164 } |
165 | 165 |
166 int sampleX() const { return fSampleX; } | |
scroggo
2015/12/02 16:27:03
Add a comment describing what this means?
msarett
2015/12/03 19:19:16
Done.
| |
167 | |
166 private: | 168 private: |
167 | 169 |
168 /** | 170 /** |
169 * Method for converting raw data to Skia pixels. | 171 * Method for converting raw data to Skia pixels. |
170 * @param dstRow Row in which to write the resulting pixels. | 172 * @param dstRow Row in which to write the resulting pixels. |
171 * @param src Row of src data, in format specified by SrcConfig | 173 * @param src Row of src data, in format specified by SrcConfig |
172 * @param dstWidth Width in pixels of the destination | 174 * @param dstWidth Width in pixels of the destination |
173 * @param bpp if bitsPerPixel % 8 == 0, deltaSrc is bytesPerPixel | 175 * @param bpp if bitsPerPixel % 8 == 0, deltaSrc is bytesPerPixel |
174 * else, deltaSrc is bitsPerPixel | 176 * else, deltaSrc is bitsPerPixel |
175 * @param deltaSrc bpp * sampleX | 177 * @param deltaSrc bpp * sampleX |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 // fBPP is bitsPerPixel | 271 // fBPP is bitsPerPixel |
270 const int fDstBPP; // Bytes per pixel for the destination color type | 272 const int fDstBPP; // Bytes per pixel for the destination color type |
271 | 273 |
272 SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int srcWidt h, int dstOffset, | 274 SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int srcWidt h, int dstOffset, |
273 int dstWidth, int srcBPP, int dstBPP); | 275 int dstWidth, int srcBPP, int dstBPP); |
274 | 276 |
275 int onSetSampleX(int) override; | 277 int onSetSampleX(int) override; |
276 | 278 |
277 }; | 279 }; |
278 #endif // SkSwizzler_DEFINED | 280 #endif // SkSwizzler_DEFINED |
OLD | NEW |