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:
parent
8abde0a15d
commit
260db92d49
@ -902,10 +902,10 @@ using namespace skia_freetype_support;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void copyFT2LCD16(const SkGlyph& glyph, const FT_Bitmap& bitmap) {
|
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);
|
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);
|
uint16_t* dst = reinterpret_cast<uint16_t*>(glyph.fImage);
|
||||||
size_t dstRB = glyph.rowBytes();
|
size_t dstRB = glyph.rowBytes();
|
||||||
int width = glyph.fWidth;
|
int width = glyph.fWidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user