Revert "gdi32: Pre-multiply RGB values by alpha for subpixel font rendering."

This reverts commit aff0eac21b. The RGB
values are already alpha values, they don't need to be pre-multiplied.
This commit is contained in:
Alexandre Julliard 2010-05-28 00:09:21 +02:00
parent a72f3f3075
commit aa9c781703

View File

@ -5025,22 +5025,19 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
{ {
for ( x = 0; x < src_width / hmul; x++ ) 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 ) if ( rgb )
{ {
dst[x] = ((src[hmul * x + rgb_interval * 0] * alpha / 255) << 16) | dst[x] = ((unsigned int)src[hmul * x + rgb_interval * 0] << 16) |
((src[hmul * x + rgb_interval * 1] * alpha / 255) << 8) | ((unsigned int)src[hmul * x + rgb_interval * 1] << 8) |
((src[hmul * x + rgb_interval * 2] * alpha / 255) << 0) | ((unsigned int)src[hmul * x + rgb_interval * 2] << 0) |
(alpha << 24); ((unsigned int)src[hmul * x + rgb_interval * 1] << 24) ;
} }
else else
{ {
dst[x] = ((src[hmul * x + rgb_interval * 2] * alpha / 255) << 16) | dst[x] = ((unsigned int)src[hmul * x + rgb_interval * 2] << 16) |
((src[hmul * x + rgb_interval * 1] * alpha / 255) << 8) | ((unsigned int)src[hmul * x + rgb_interval * 1] << 8) |
((src[hmul * x + rgb_interval * 0] * alpha / 255) << 0) | ((unsigned int)src[hmul * x + rgb_interval * 0] << 0) |
(alpha << 24); ((unsigned int)src[hmul * x + rgb_interval * 1] << 24) ;
} }
} }
src += src_pitch * vmul; src += src_pitch * vmul;