Another small fix to GrFontScaler

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1261433006
This commit is contained in:
joshualitt 2015-07-31 11:55:29 -07:00 committed by Commit bot
parent 383ff1047f
commit d1ebe0689d

View File

@ -140,7 +140,7 @@ bool GrFontScaler::getPackedGlyphImage(const SkGlyph& glyph, int width, int heig
if (SkMask::kBW_Format == glyph.fMaskFormat) {
// expand bits to our mask type
const uint8_t* bits = reinterpret_cast<const uint8_t*>(src);
switch (this->getMaskFormat()) {
switch (expectedMaskFormat) {
case kA8_GrMaskFormat:{
uint8_t* bytes = reinterpret_cast<uint8_t*>(dst);
expand_bits(bytes, bits, width, height, dstRB, srcRB);
@ -157,7 +157,7 @@ bool GrFontScaler::getPackedGlyphImage(const SkGlyph& glyph, int width, int heig
} else if (srcRB == dstRB) {
memcpy(dst, src, dstRB * height);
} else {
const int bbp = GrMaskFormatBytesPerPixel(this->getMaskFormat());
const int bbp = GrMaskFormatBytesPerPixel(expectedMaskFormat);
for (int y = 0; y < height; y++) {
memcpy(dst, src, width * bbp);
src = (const char*)src + srcRB;