diff options
author | krajcevski <krajcevski@google.com> | 2014-08-08 08:12:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-08 08:12:32 -0700 |
commit | ab4c71101489e62f22df6926dd3afcb699f5a164 (patch) | |
tree | c2caf44b02eeedced0894bf5fcb32b26114422d9 /src/utils | |
parent | 62c447d3a556e3042cdf5d23b3e2a618eaa3c100 (diff) |
Fix bug in blitAntiH
R=robertphillips@google.com
Author: krajcevski@google.com
Review URL: https://codereview.chromium.org/449223002
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/SkTextureCompressor_Blitter.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/utils/SkTextureCompressor_Blitter.h b/src/utils/SkTextureCompressor_Blitter.h index e44a5deade..fe465be0a0 100644 --- a/src/utils/SkTextureCompressor_Blitter.h +++ b/src/utils/SkTextureCompressor_Blitter.h @@ -406,7 +406,18 @@ private: } // If we didn't land on a block boundary, output the block... - if ((curX % BlockDim) > 1) { + if ((curX % BlockDim) > 0) { +#ifdef SK_DEBUG + for (int i = 0; i < BlockDim; ++i) { + SkASSERT(nextX[i] == kLongestRun || nextX[i] == curX); + } +#endif + const int col = curX % BlockDim; + const int colsLeft = BlockDim - col; + + memset(curAlphaColumn, 0, sizeof(curAlphaColumn)); + this->updateBlockColumns(block, col, colsLeft, curAlphaColumn); + CompressorType::CompressA8Vertical(outPtr, reinterpret_cast<uint8_t*>(block)); } |