diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-27 14:47:30 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-27 14:47:30 +0000 |
commit | 43c465f2bdc449d9c090bf9e4d6e4080a74b6622 (patch) | |
tree | 3304b8f22de8162617194cf7e200f8386f41f6be /src | |
parent | d36f7657fabf49ccbbefabfd44522ef4bc13151f (diff) |
fix 8->1 bugs shown by removal of A1 config
BUG=
Review URL: https://codereview.chromium.org/91563003
git-svn-id: http://skia.googlecode.com/svn/trunk@12415 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkScalerContext.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index f4f23911b0..d4f23ae3d2 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -531,8 +531,8 @@ static inline int convert_8_to_1(unsigned byte) { static uint8_t pack_8_to_1(const uint8_t alpha[8]) { unsigned bits = 0; for (int i = 0; i < 8; ++i) { - bits |= convert_8_to_1(alpha[i]); bits <<= 1; + bits |= convert_8_to_1(alpha[i]); } return SkToU8(bits); } @@ -544,7 +544,7 @@ static void packA8ToA1(const SkMask& mask, const uint8_t* src, size_t srcRB) { const int leftOverBits = width & 7; uint8_t* dst = mask.fImage; - const int dstPad = mask.fRowBytes - SkAlign8(width); + const int dstPad = mask.fRowBytes - SkAlign8(width)/8; SkASSERT(dstPad >= 0); const int srcPad = srcRB - width; |