trim 3-byte column at start and end of freetype bitmap

git-svn-id: http://skia.googlecode.com/svn/trunk@935 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-03-14 18:09:32 +00:00
parent 8abde0a15d
commit 260db92d49

View File

@ -902,10 +902,10 @@ using namespace skia_freetype_support;
#endif
static void copyFT2LCD16(const SkGlyph& glyph, const FT_Bitmap& bitmap) {
SkASSERT(glyph.fWidth * 3 == bitmap.width);
SkASSERT(glyph.fWidth * 3 == bitmap.width - 6);
SkASSERT(glyph.fHeight == bitmap.rows);
const uint8_t* src = bitmap.buffer;
const uint8_t* src = bitmap.buffer + 3;
uint16_t* dst = reinterpret_cast<uint16_t*>(glyph.fImage);
size_t dstRB = glyph.rowBytes();
int width = glyph.fWidth;