mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
AlphaBlend:
- Return immediately if any bitmap size is smaller than zero - Also check calculated input bitmap size against source size - Remove outdated FIXME - Fixes three gdi32 bitmap winetests svn path=/trunk/; revision=41800
This commit is contained in:
parent
e80cf32fd5
commit
453d1d9077
2 changed files with 9 additions and 6 deletions
|
@ -54,7 +54,6 @@ EngAlphaBlend(IN SURFOBJ *psoDest,
|
|||
BlendObj->BlendFunction.BlendFlags, BlendObj->BlendFunction.SourceConstantAlpha,
|
||||
BlendObj->BlendFunction.AlphaFormat);
|
||||
|
||||
|
||||
/* Validate output */
|
||||
OutputRect = *DestRect;
|
||||
if (OutputRect.right < OutputRect.left)
|
||||
|
@ -68,14 +67,12 @@ EngAlphaBlend(IN SURFOBJ *psoDest,
|
|||
OutputRect.right = DestRect->left;
|
||||
}
|
||||
|
||||
|
||||
/* Validate input */
|
||||
|
||||
/* FIXME when WindowOrg.x or .y are negitve this check are not vaild,
|
||||
* we need convert the inputRect to the windows org and do it right */
|
||||
InputRect = *SourceRect;
|
||||
if ( (InputRect.top < 0) || (InputRect.bottom < 0) ||
|
||||
(InputRect.left < 0) || (InputRect.right < 0) )
|
||||
(InputRect.left < 0) || (InputRect.right < 0) ||
|
||||
InputRect.right > psoSource->sizlBitmap.cx ||
|
||||
InputRect.bottom > psoSource->sizlBitmap.cy )
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
|
|
|
@ -49,6 +49,12 @@ NtGdiAlphaBlend(
|
|||
BLENDOBJ BlendObj;
|
||||
BlendObj.BlendFunction = BlendFunc;
|
||||
|
||||
if (WidthDest < 0 || HeightDest < 0 || WidthSrc < 0 || HeightSrc < 0)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DCDest = DC_LockDc(hDCDest);
|
||||
if (NULL == DCDest)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue