Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
3884bb3b
Commit
3884bb3b
authored
May 20, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
May 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Merge source rectangle operations into a single block in IWineD3DBaseSurfaceImpl_Blt().
parent
c48ff6c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
38 deletions
+38
-38
surface_base.c
dlls/wined3d/surface_base.c
+38
-38
No files found.
dlls/wined3d/surface_base.c
View file @
3884bb3b
...
...
@@ -993,19 +993,46 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D
FIXME
(
"Filters not supported in software blit
\n
"
);
}
/* First check for the validity of source / destination rectangles. This was
* verified using a test application + by MSDN.
*/
if
((
Src
!=
NULL
)
&&
(
SrcRect
!=
NULL
)
&&
((
SrcRect
->
bottom
>
Src
->
currentDesc
.
Height
)
||
(
SrcRect
->
bottom
<
0
)
||
(
SrcRect
->
top
>
Src
->
currentDesc
.
Height
)
||
(
SrcRect
->
top
<
0
)
||
(
SrcRect
->
left
>
Src
->
currentDesc
.
Width
)
||
(
SrcRect
->
left
<
0
)
||
(
SrcRect
->
right
>
Src
->
currentDesc
.
Width
)
||
(
SrcRect
->
right
<
0
)
||
(
SrcRect
->
right
<
SrcRect
->
left
)
||
(
SrcRect
->
bottom
<
SrcRect
->
top
)))
/* First check for the validity of source / destination rectangles.
* This was verified using a test application + by MSDN. */
if
(
SrcRect
)
{
WARN
(
"Application gave us bad source rectangle for Blt.
\n
"
);
return
WINEDDERR_INVALIDRECT
;
if
(
Src
)
{
if
(
SrcRect
->
right
<
SrcRect
->
left
||
SrcRect
->
bottom
<
SrcRect
->
top
||
SrcRect
->
left
>
Src
->
currentDesc
.
Width
||
SrcRect
->
left
<
0
||
SrcRect
->
top
>
Src
->
currentDesc
.
Height
||
SrcRect
->
top
<
0
||
SrcRect
->
right
>
Src
->
currentDesc
.
Width
||
SrcRect
->
right
<
0
||
SrcRect
->
bottom
>
Src
->
currentDesc
.
Height
||
SrcRect
->
bottom
<
0
)
{
WARN
(
"Application gave us bad source rectangle for Blt.
\n
"
);
return
WINEDDERR_INVALIDRECT
;
}
if
(
!
SrcRect
->
right
||
!
SrcRect
->
bottom
||
SrcRect
->
left
==
(
int
)
Src
->
currentDesc
.
Width
||
SrcRect
->
top
==
(
int
)
Src
->
currentDesc
.
Height
)
{
TRACE
(
"Nothing to be done.
\n
"
);
return
WINED3D_OK
;
}
}
xsrc
=
*
SrcRect
;
}
else
if
(
Src
)
{
xsrc
.
left
=
0
;
xsrc
.
top
=
0
;
xsrc
.
right
=
Src
->
currentDesc
.
Width
;
xsrc
.
bottom
=
Src
->
currentDesc
.
Height
;
}
else
{
memset
(
&
xsrc
,
0
,
sizeof
(
xsrc
));
}
/* For the Destination rect, it can be out of bounds on the condition that a clipper
* is set for the given surface.
*/
...
...
@@ -1032,14 +1059,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D
return
WINED3D_OK
;
}
if
(
Src
&&
SrcRect
&&
(
SrcRect
->
bottom
<=
0
||
SrcRect
->
right
<=
0
||
SrcRect
->
top
>=
(
int
)
Src
->
currentDesc
.
Height
||
SrcRect
->
left
>=
(
int
)
Src
->
currentDesc
.
Width
))
{
TRACE
(
"Nothing to be done.
\n
"
);
return
WINED3D_OK
;
}
if
(
DestRect
)
{
xdst
=
*
DestRect
;
...
...
@@ -1052,25 +1071,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *D
xdst
.
right
=
This
->
currentDesc
.
Width
;
}
if
(
SrcRect
)
{
xsrc
=
*
SrcRect
;
}
else
{
if
(
Src
)
{
xsrc
.
top
=
0
;
xsrc
.
bottom
=
Src
->
currentDesc
.
Height
;
xsrc
.
left
=
0
;
xsrc
.
right
=
Src
->
currentDesc
.
Width
;
}
else
{
memset
(
&
xsrc
,
0
,
sizeof
(
xsrc
));
}
}
/* The easy case : the source-less blits.... */
if
(
Src
==
NULL
&&
DestRect
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment