From aa9c78170363699491c1abe3efa45b2100eb0803 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 28 May 2010 00:09:21 +0200 Subject: [PATCH] Revert "gdi32: Pre-multiply RGB values by alpha for subpixel font rendering." This reverts commit aff0eac21b7d66a0ba4869cade6368a988ab34ee. The RGB values are already alpha values, they don't need to be pre-multiplied. --- dlls/gdi32/freetype.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 53732c4626..ddb3d24c76 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -5025,22 +5025,19 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, { for ( x = 0; x < src_width / hmul; x++ ) { - unsigned int alpha = (src[hmul * x + rgb_interval * 0] + - src[hmul * x + rgb_interval * 1] + - src[hmul * x + rgb_interval * 2]) / 3; if ( rgb ) { - dst[x] = ((src[hmul * x + rgb_interval * 0] * alpha / 255) << 16) | - ((src[hmul * x + rgb_interval * 1] * alpha / 255) << 8) | - ((src[hmul * x + rgb_interval * 2] * alpha / 255) << 0) | - (alpha << 24); + dst[x] = ((unsigned int)src[hmul * x + rgb_interval * 0] << 16) | + ((unsigned int)src[hmul * x + rgb_interval * 1] << 8) | + ((unsigned int)src[hmul * x + rgb_interval * 2] << 0) | + ((unsigned int)src[hmul * x + rgb_interval * 1] << 24) ; } else { - dst[x] = ((src[hmul * x + rgb_interval * 2] * alpha / 255) << 16) | - ((src[hmul * x + rgb_interval * 1] * alpha / 255) << 8) | - ((src[hmul * x + rgb_interval * 0] * alpha / 255) << 0) | - (alpha << 24); + dst[x] = ((unsigned int)src[hmul * x + rgb_interval * 2] << 16) | + ((unsigned int)src[hmul * x + rgb_interval * 1] << 8) | + ((unsigned int)src[hmul * x + rgb_interval * 0] << 0) | + ((unsigned int)src[hmul * x + rgb_interval * 1] << 24) ; } } src += src_pitch * vmul;