dwrite: Bitmap buffer is zeroed on allocation, no need to do it again.
This commit is contained in:
parent
2c4ba8a008
commit
3f4a284f58
|
@ -539,7 +539,6 @@ void freetype_get_glyph_bitmap(struct dwrite_glyphbitmap *bitmap)
|
|||
ft_bitmap.buffer = bitmap->buf;
|
||||
|
||||
/* Note: FreeType will only set 'black' bits for us. */
|
||||
memset(bitmap->buf, 0, height * bitmap->pitch);
|
||||
if (pFT_Outline_New(library, src->n_points, src->n_contours, ©) == 0) {
|
||||
pFT_Outline_Copy(src, ©);
|
||||
pFT_Outline_Translate(©, -bbox->left << 6, bbox->bottom << 6);
|
||||
|
@ -553,8 +552,6 @@ void freetype_get_glyph_bitmap(struct dwrite_glyphbitmap *bitmap)
|
|||
int w = min(bitmap->pitch, (ft_bitmap->width + 7) >> 3);
|
||||
int h = min(height, ft_bitmap->rows);
|
||||
|
||||
memset(bitmap->buf, 0, height * bitmap->pitch);
|
||||
|
||||
while (h--) {
|
||||
memcpy(dst, src, w);
|
||||
src += ft_bitmap->pitch;
|
||||
|
@ -680,8 +677,6 @@ void freetype_get_glyph_bbox(struct dwrite_glyphbitmap *bitmap)
|
|||
|
||||
void freetype_get_glyph_bitmap(struct dwrite_glyphbitmap *bitmap)
|
||||
{
|
||||
UINT32 size = (bitmap->bbox.right - bitmap->bbox.left)*(bitmap->bbox.bottom - bitmap->bbox.top);
|
||||
memset(bitmap->buf, 0, size);
|
||||
}
|
||||
|
||||
INT freetype_get_charmap_index(IDWriteFontFace2 *fontface, BOOL *is_symbol)
|
||||
|
|
Loading…
Reference in New Issue