wined3d: Remove src_rect and dst_rect NULL checks from surface_cpu_blt().
This commit is contained in:
parent
e74d1358ac
commit
b166cb29f8
|
@ -6461,8 +6461,6 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
|||
|
||||
/* First check for the validity of source / destination rectangles.
|
||||
* This was verified using a test application and by MSDN. */
|
||||
if (src_rect)
|
||||
{
|
||||
if (src_surface)
|
||||
{
|
||||
if (src_rect->right < src_rect->left || src_rect->bottom < src_rect->top
|
||||
|
@ -6485,23 +6483,9 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
|||
}
|
||||
|
||||
xsrc = *src_rect;
|
||||
}
|
||||
else if (src_surface)
|
||||
{
|
||||
xsrc.left = 0;
|
||||
xsrc.top = 0;
|
||||
xsrc.right = src_surface->resource.width;
|
||||
xsrc.bottom = src_surface->resource.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(&xsrc, 0, sizeof(xsrc));
|
||||
}
|
||||
|
||||
if (dst_rect)
|
||||
{
|
||||
/* For the Destination rect, it can be out of bounds on the condition
|
||||
* that a clipper is set for the given surface. */
|
||||
/* The destination rect can be out of bounds on the condition that a
|
||||
* clipper is set for the surface. */
|
||||
if (!dst_surface->clipper && (dst_rect->right < dst_rect->left || dst_rect->bottom < dst_rect->top
|
||||
|| dst_rect->left > dst_surface->resource.width || dst_rect->left < 0
|
||||
|| dst_rect->top > dst_surface->resource.height || dst_rect->top < 0
|
||||
|
@ -6590,14 +6574,6 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
xdst.left = 0;
|
||||
xdst.top = 0;
|
||||
xdst.right = dst_surface->resource.width;
|
||||
xdst.bottom = dst_surface->resource.height;
|
||||
}
|
||||
|
||||
if (src_surface == dst_surface)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue