Chromium Code Reviews| Index: src/codec/SkSwizzler.h |
| diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h |
| index b00ee14e0699189f9834ccc7624ef8ee8924c0f8..a0860a2fd6e4aecdba6b4bff68571ee4aea12e88 100644 |
| --- a/src/codec/SkSwizzler.h |
| +++ b/src/codec/SkSwizzler.h |
| @@ -115,19 +115,19 @@ public: |
| /** |
| * Create a new SkSwizzler. |
| * @param SrcConfig Description of the format of the source. |
| - * @param SkImageInfo dimensions() describe both the src and the dst. |
| - * Other fields describe the dst. |
| + * @param dstInfo dimensions() describe destination. |
|
scroggo
2015/07/31 13:35:33
The comment used to distinguish between the dimens
emmaleer
2015/07/31 18:41:56
Acknowledged.
|
| * @param dst Destination to write pixels. Must match info and dstRowBytes |
| * @param dstRowBytes rowBytes for dst. |
| * @param ZeroInitialized Whether dst is zero-initialized. The |
| implementation may choose to skip writing zeroes |
| * if set to kYes_ZeroInitialized. |
| + * @param srcWidth is the width of the source. Used to calculate the width samplesize. |
|
scroggo
2015/07/31 13:35:33
I think this could use a little bit more explanati
emmaleer
2015/07/31 18:41:56
Acknowledged.
|
| * @return A new SkSwizzler or NULL on failure. |
| */ |
| static SkSwizzler* CreateSwizzler(SrcConfig, const SkPMColor* ctable, |
| - const SkImageInfo&, void* dst, |
| + const SkImageInfo& dstInfo, void* dst, |
| size_t dstRowBytes, |
| - SkCodec::ZeroInitialized); |
| + SkCodec::ZeroInitialized, int srcWidth); |
| /** |
| * Fill the remainder of the destination with a single color |
| @@ -245,9 +245,11 @@ private: |
| void* fDstRow; |
| const size_t fDstRowBytes; |
| int fCurrY; |
| + const int fX0; // first X coord to sample |
| + const int fSampleX; // step between X samples |
| SkSwizzler(RowProc proc, const SkPMColor* ctable, int deltaSrc, |
| - const SkImageInfo& info, void* dst, size_t rowBytes); |
| + const SkImageInfo& info, void* dst, size_t rowBytes, int sampleX); |
| }; |
| #endif // SkSwizzler_DEFINED |