From: Zhiyi Zhang <zzhang@codeweavers.com> --- dlls/gdi32/tests/bitmap.c | 1 - dlls/win32u/bitblt.c | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/tests/bitmap.c b/dlls/gdi32/tests/bitmap.c index 0d381541443..d4d04b26927 100644 --- a/dlls/gdi32/tests/bitmap.c +++ b/dlls/gdi32/tests/bitmap.c @@ -6374,7 +6374,6 @@ static void test_GdiTransparentBlt(void) src_buffer[0] = 0xffffffff; ret = GdiTransparentBlt( hdc_dst, 0, 0, 1, 1, hdc_src, 0, 0, 1, 1, RGB(0xff, 0xff, 0xff) ); ok( ret, "GdiTransparentBlt failed, error %lu.\n", GetLastError() ); - todo_wine ok( dst_buffer[0] == 0x123456, "Got unexpected color %#x.\n", dst_buffer[0] ); SelectObject( hdc_src, old_src ); diff --git a/dlls/win32u/bitblt.c b/dlls/win32u/bitblt.c index 7721d3b4b73..c6021dde98f 100644 --- a/dlls/win32u/bitblt.c +++ b/dlls/win32u/bitblt.c @@ -855,7 +855,6 @@ BOOL WINAPI NtGdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDes COLORREF oldBackground; COLORREF oldForeground; int oldStretchMode; - DIBSECTION dib; DC *dc_src; DC *dc_work; @@ -874,12 +873,9 @@ BOOL WINAPI NtGdiTransparentBlt( HDC hdcDest, int xDest, int yDest, int widthDes if (oldStretchMode == BLACKONWHITE || oldStretchMode == WHITEONBLACK) dc_src->attr->stretch_blt_mode = COLORONCOLOR; hdcWork = NtGdiCreateCompatibleDC( hdcDest ); - if ((get_gdi_object_type( hdcDest ) != NTGDI_OBJ_MEMDC || - NtGdiExtGetObjectW( NtGdiGetDCObject( hdcDest, NTGDI_OBJ_SURF ), - sizeof(dib), &dib ) == sizeof(BITMAP)) && - NtGdiGetDeviceCaps( hdcDest, BITSPIXEL ) == 32) + if (NtGdiGetDeviceCaps( hdcDest, BITSPIXEL ) == 32) { - /* screen DCs or DDBs are not supposed to have an alpha channel, so use a 24-bpp bitmap as copy */ + /* the alpha channel should be ignored. use a 24-bpp bitmap as copy */ BITMAPINFO info; info.bmiHeader.biSize = sizeof(info.bmiHeader); info.bmiHeader.biWidth = widthDest; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10094