dwrite: Bitmap buffer is zeroed on allocation, no need to do it again.

oldstable
Nikolay Sivov 2015-08-27 08:39:25 +03:00 committed by Alexandre Julliard
parent 2c4ba8a008
commit 3f4a284f58
1 changed files with 0 additions and 5 deletions

View File

@ -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, &copy) == 0) {
pFT_Outline_Copy(src, &copy);
pFT_Outline_Translate(&copy, -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)