| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 * store the rows in order. This also improves usability for scaled and | 49 * store the rows in order. This also improves usability for scaled and |
| 50 * subset decodes. | 50 * subset decodes. |
| 51 * @param dst Where we write the output. | 51 * @param dst Where we write the output. |
| 52 * @param src The next row of the source data. | 52 * @param src The next row of the source data. |
| 53 */ | 53 */ |
| 54 void swizzle(void* dst, const uint8_t* SK_RESTRICT src); | 54 void swizzle(void* dst, const uint8_t* SK_RESTRICT src); |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * Implement fill using a custom width. | 57 * Implement fill using a custom width. |
| 58 */ | 58 */ |
| 59 void fill(const SkImageInfo& info, void* dst, size_t rowBytes, uint32_t colo
rOrIndex, | 59 void fill(const SkImageInfo& info, void* dst, size_t rowBytes, uint64_t colo
rOrIndex, |
| 60 SkCodec::ZeroInitialized zeroInit) override { | 60 SkCodec::ZeroInitialized zeroInit) override { |
| 61 const SkImageInfo fillInfo = info.makeWH(fAllocatedWidth, info.height())
; | 61 const SkImageInfo fillInfo = info.makeWH(fAllocatedWidth, info.height())
; |
| 62 SkSampler::Fill(fillInfo, dst, rowBytes, colorOrIndex, zeroInit); | 62 SkSampler::Fill(fillInfo, dst, rowBytes, colorOrIndex, zeroInit); |
| 63 } | 63 } |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * If fSampleX > 1, the swizzler is sampling every fSampleX'th pixel and | 66 * If fSampleX > 1, the swizzler is sampling every fSampleX'th pixel and |
| 67 * discarding the rest. | 67 * discarding the rest. |
| 68 * | 68 * |
| 69 * This getter is currently used by SkBmpStandardCodec for Bmp-in-Ico decod
es. | 69 * This getter is currently used by SkBmpStandardCodec for Bmp-in-Ico decod
es. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 // fBPP is bitsPerPixel | 201 // fBPP is bitsPerPixel |
| 202 const int fDstBPP; // Bytes per pixel for the destination
color type | 202 const int fDstBPP; // Bytes per pixel for the destination
color type |
| 203 | 203 |
| 204 SkSwizzler(RowProc fastProc, RowProc proc, const SkPMColor* ctable, int srcO
ffset, | 204 SkSwizzler(RowProc fastProc, RowProc proc, const SkPMColor* ctable, int srcO
ffset, |
| 205 int srcWidth, int dstOffset, int dstWidth, int srcBPP, int dstBPP); | 205 int srcWidth, int dstOffset, int dstWidth, int srcBPP, int dstBPP); |
| 206 | 206 |
| 207 int onSetSampleX(int) override; | 207 int onSetSampleX(int) override; |
| 208 | 208 |
| 209 }; | 209 }; |
| 210 #endif // SkSwizzler_DEFINED | 210 #endif // SkSwizzler_DEFINED |
| OLD | NEW |