Fix SkSwizzler bug
Now, that we are subsetting, fX0 is not necessarily less than
fSrcWidth (since fSrcWidth is really the subset width).
Ex: We may want a 10 pixel subset starting twenty pixels from the
left edge. In that case, fX0=20 and fSrcWidth=10.
Let's rename the width as fSubsetWidth to avoid confusion
and remove the check.
BUG=skia:
Review URL: https://codereview.chromium.org/1407603003
diff --git a/src/codec/SkSwizzler.h b/src/codec/SkSwizzler.h
index 058044e..fd20588 100644
--- a/src/codec/SkSwizzler.h
+++ b/src/codec/SkSwizzler.h
@@ -178,7 +178,7 @@
// scanline decodes.
int fX0; // Start coordinate for the src, may be different than
// fSrcOffset if we are sampling.
- const int fSrcWidth; // Width of the source - i.e. before any sampling.
+ const int fSubsetWidth; // Width of the subset of the source before any sampling.
int fDstWidth; // Width of dst, which may differ with sampling.
int fSampleX; // step between X samples
const int fBPP; // if bitsPerPixel % 8 == 0
@@ -186,7 +186,7 @@
// else
// fBPP is bitsPerPixel
- SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int srcWidth, int bpp);
+ SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int subsetWidth, int bpp);
int onSetSampleX(int) override;