mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:56:26 +00:00
[Win32k]
- Fix Alpha Blending while using layered windows in lower bit modes. See CORE-10167. svn path=/trunk/; revision=69202
This commit is contained in:
parent
28b957e970
commit
5547abd08e
1 changed files with 15 additions and 4 deletions
|
@ -154,7 +154,8 @@ IntUpdateLayeredWindowI( PWND pWnd,
|
||||||
RECT Rect;
|
RECT Rect;
|
||||||
BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, 0 };
|
BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, 0 };
|
||||||
COLORREF color_key = (info->dwFlags & ULW_COLORKEY) ? info->crKey : CLR_INVALID;
|
COLORREF color_key = (info->dwFlags & ULW_COLORKEY) ? info->crKey : CLR_INVALID;
|
||||||
HBITMAP hBitmapBuffer, hOldBitmap;
|
HBITMAP hOldBitmap, hOldBitmap1, hbmSrc, hbmDst;
|
||||||
|
DIBSECTION dibs;
|
||||||
|
|
||||||
Rect = Window;
|
Rect = Window;
|
||||||
|
|
||||||
|
@ -165,9 +166,17 @@ IntUpdateLayeredWindowI( PWND pWnd,
|
||||||
if (!info->hdcDst) hdc = UserGetDCEx(pWnd, NULL, DCX_USESTYLE);
|
if (!info->hdcDst) hdc = UserGetDCEx(pWnd, NULL, DCX_USESTYLE);
|
||||||
else hdc = info->hdcDst;
|
else hdc = info->hdcDst;
|
||||||
|
|
||||||
|
hbmSrc = NtGdiCreateCompatibleBitmap(info->hdcSrc, Rect.right - Rect.left, Rect.bottom - Rect.top);
|
||||||
|
hbmDst = NtGdiCreateCompatibleBitmap(info->hdcSrc, Rect.right - Rect.left, Rect.bottom - Rect.top);
|
||||||
|
|
||||||
|
GreGetObject(hbmSrc, sizeof(DIBSECTION), &dibs);
|
||||||
|
|
||||||
|
TRACE("Source Bitmap bc %d\n",dibs.dsBmih.biBitCount);
|
||||||
|
|
||||||
hdcBuffer = NtGdiCreateCompatibleDC(hdc);
|
hdcBuffer = NtGdiCreateCompatibleDC(hdc);
|
||||||
hBitmapBuffer = NtGdiCreateCompatibleBitmap(hdc, Rect.right - Rect.left, Rect.bottom - Rect.top);
|
|
||||||
hOldBitmap = (HBITMAP)NtGdiSelectBitmap(hdcBuffer, hBitmapBuffer);
|
hOldBitmap = (HBITMAP)NtGdiSelectBitmap(hdcBuffer, hbmSrc);
|
||||||
|
hOldBitmap1 = (HBITMAP)NtGdiSelectBitmap(hdc, hbmDst);
|
||||||
|
|
||||||
NtGdiStretchBlt( hdcBuffer,
|
NtGdiStretchBlt( hdcBuffer,
|
||||||
Rect.left,
|
Rect.left,
|
||||||
|
@ -209,8 +218,10 @@ IntUpdateLayeredWindowI( PWND pWnd,
|
||||||
blend,
|
blend,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
NtGdiSelectBitmap(hdc, hOldBitmap1);
|
||||||
NtGdiSelectBitmap(hdcBuffer, hOldBitmap);
|
NtGdiSelectBitmap(hdcBuffer, hOldBitmap);
|
||||||
if (hBitmapBuffer) GreDeleteObject(hBitmapBuffer);
|
if (hbmSrc) GreDeleteObject(hbmSrc);
|
||||||
|
if (hbmDst) GreDeleteObject(hbmDst);
|
||||||
if (hdcBuffer) IntGdiDeleteDC(hdcBuffer, FALSE);
|
if (hdcBuffer) IntGdiDeleteDC(hdcBuffer, FALSE);
|
||||||
if (!info->hdcDst) UserReleaseDC(pWnd, hdc, FALSE);
|
if (!info->hdcDst) UserReleaseDC(pWnd, hdc, FALSE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue