Nikolay Sivov : dwrite: Bitmap buffer is zeroed on allocation, no need to do it again.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 27 08:25:34 CDT 2015
Module: wine
Branch: master
Commit: 3f4a284f58036cc9e4dbc6765900ac9ca3a37e38
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f4a284f58036cc9e4dbc6765900ac9ca3a37e38
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Aug 27 08:39:25 2015 +0300
dwrite: Bitmap buffer is zeroed on allocation, no need to do it again.
---
dlls/dwrite/freetype.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c
index dc6d701..1f7e6a9 100644
--- a/dlls/dwrite/freetype.c
+++ b/dlls/dwrite/freetype.c
@@ -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)
More information about the wine-cvs
mailing list