mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
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:
parent
a72f3f3075
commit
aa9c781703
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user