| 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 #ifndef SkMaskSwizzler_DEFINED | 7 #ifndef SkMaskSwizzler_DEFINED |
| 8 #define SkMaskSwizzler_DEFINED | 8 #define SkMaskSwizzler_DEFINED |
| 9 | 9 |
| 10 #include "SkMasks.h" | 10 #include "SkMasks.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 | 49 |
| 50 /* | 50 /* |
| 51 * Row procedure used for swizzle | 51 * Row procedure used for swizzle |
| 52 */ | 52 */ |
| 53 typedef SkSwizzler::ResultAlpha (*RowProc)(void* dstRow, const uint8_t* srcR
ow, int width, | 53 typedef SkSwizzler::ResultAlpha (*RowProc)(void* dstRow, const uint8_t* srcR
ow, int width, |
| 54 SkMasks* masks, uint32_t startX, uint32_t sampleX); | 54 SkMasks* masks, uint32_t startX, uint32_t sampleX); |
| 55 | 55 |
| 56 SkMaskSwizzler(SkMasks* masks, RowProc proc, int srcWidth, int srcOffset); | 56 SkMaskSwizzler(SkMasks* masks, RowProc proc, int subsetWidth, int srcOffset)
; |
| 57 | 57 |
| 58 int onSetSampleX(int) override; | 58 int onSetSampleX(int) override; |
| 59 | 59 |
| 60 SkMasks* fMasks; // unowned | 60 SkMasks* fMasks; // unowned |
| 61 const RowProc fRowProc; | 61 const RowProc fRowProc; |
| 62 | 62 |
| 63 // FIXME: Can this class share more with SkSwizzler? These variables are all
the same. | 63 // FIXME: Can this class share more with SkSwizzler? These variables are all
the same. |
| 64 const int fSrcWidth; // Width of the source - i.e. before any s
ampling. | 64 const int fSubsetWidth; // Width of the subset of source before an
y sampling. |
| 65 int fDstWidth; // Width of dst, which may differ with sam
pling. | 65 int fDstWidth; // Width of dst, which may differ with sam
pling. |
| 66 int fSampleX; | 66 int fSampleX; |
| 67 int fSrcOffset; | 67 int fSrcOffset; |
| 68 int fX0; | 68 int fX0; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif | 71 #endif |
| OLD | NEW |