diff options
author | msarett <msarett@google.com> | 2015-10-16 10:54:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-16 10:54:12 -0700 |
commit | 80803ff615e4293e8af2dc5d094a1f4fa81ec396 (patch) | |
tree | 55fd5de502dc7ac897ee6438dd77134115a10048 /src/codec/SkMaskSwizzler.h | |
parent | 2e2ea38bb77d42bab292919de5d80286cc354782 (diff) |
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
Diffstat (limited to 'src/codec/SkMaskSwizzler.h')
-rw-r--r-- | src/codec/SkMaskSwizzler.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codec/SkMaskSwizzler.h b/src/codec/SkMaskSwizzler.h index 9aea5d8d70..e5da723ca5 100644 --- a/src/codec/SkMaskSwizzler.h +++ b/src/codec/SkMaskSwizzler.h @@ -53,7 +53,7 @@ private: typedef SkSwizzler::ResultAlpha (*RowProc)(void* dstRow, const uint8_t* srcRow, int width, SkMasks* masks, uint32_t startX, uint32_t sampleX); - SkMaskSwizzler(SkMasks* masks, RowProc proc, int srcWidth, int srcOffset); + SkMaskSwizzler(SkMasks* masks, RowProc proc, int subsetWidth, int srcOffset); int onSetSampleX(int) override; @@ -61,7 +61,7 @@ private: const RowProc fRowProc; // FIXME: Can this class share more with SkSwizzler? These variables are all the same. - const int fSrcWidth; // Width of the source - i.e. before any sampling. + const int fSubsetWidth; // Width of the subset of source before any sampling. int fDstWidth; // Width of dst, which may differ with sampling. int fSampleX; int fSrcOffset; |