Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
94fd6dc0
Commit
94fd6dc0
authored
Oct 30, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Implement CopyRects() on top of wined3d_surface_blt().
parent
a39761a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
device.c
dlls/d3d8/device.c
+19
-6
No files found.
dlls/d3d8/device.c
View file @
94fd6dc0
...
@@ -931,6 +931,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
...
@@ -931,6 +931,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
enum
wined3d_format_id
srcFormat
,
destFormat
;
enum
wined3d_format_id
srcFormat
,
destFormat
;
struct
wined3d_resource_desc
wined3d_desc
;
struct
wined3d_resource_desc
wined3d_desc
;
struct
wined3d_resource
*
wined3d_resource
;
struct
wined3d_resource
*
wined3d_resource
;
UINT
src_w
,
src_h
;
TRACE
(
"iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.
\n
"
,
TRACE
(
"iface %p, src_surface %p, src_rects %p, rect_count %u, dst_surface %p, dst_points %p.
\n
"
,
iface
,
pSourceSurface
,
pSourceRects
,
cRects
,
pDestinationSurface
,
pDestPoints
);
iface
,
pSourceSurface
,
pSourceRects
,
cRects
,
pDestinationSurface
,
pDestPoints
);
...
@@ -942,6 +943,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
...
@@ -942,6 +943,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
wined3d_resource
=
wined3d_surface_get_resource
(
Source
->
wined3d_surface
);
wined3d_resource
=
wined3d_surface_get_resource
(
Source
->
wined3d_surface
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
srcFormat
=
wined3d_desc
.
format
;
srcFormat
=
wined3d_desc
.
format
;
src_w
=
wined3d_desc
.
width
;
src_h
=
wined3d_desc
.
height
;
wined3d_resource
=
wined3d_surface_get_resource
(
Dest
->
wined3d_surface
);
wined3d_resource
=
wined3d_surface_get_resource
(
Dest
->
wined3d_surface
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
wined3d_resource_get_desc
(
wined3d_resource
,
&
wined3d_desc
);
...
@@ -964,8 +967,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
...
@@ -964,8 +967,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
/* Quick if complete copy ... */
/* Quick if complete copy ... */
if
(
!
cRects
&&
!
pSourceRects
&&
!
pDestPoints
)
if
(
!
cRects
&&
!
pSourceRects
&&
!
pDestPoints
)
{
{
wined3d_surface_bltfast
(
Dest
->
wined3d_surface
,
0
,
0
,
RECT
rect
=
{
0
,
0
,
src_w
,
src_h
};
Source
->
wined3d_surface
,
NULL
,
WINEDDBLTFAST_NOCOLORKEY
);
wined3d_surface_blt
(
Dest
->
wined3d_surface
,
&
rect
,
Source
->
wined3d_surface
,
&
rect
,
0
,
NULL
,
WINED3DTEXF_POINT
);
}
}
else
else
{
{
...
@@ -975,16 +979,25 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
...
@@ -975,16 +979,25 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(IDirect3DDevice8 *iface,
{
{
for
(
i
=
0
;
i
<
cRects
;
++
i
)
for
(
i
=
0
;
i
<
cRects
;
++
i
)
{
{
wined3d_surface_bltfast
(
Dest
->
wined3d_surface
,
pDestPoints
[
i
].
x
,
pDestPoints
[
i
].
y
,
UINT
w
=
pSourceRects
[
i
].
right
-
pSourceRects
[
i
].
left
;
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
WINEDDBLTFAST_NOCOLORKEY
);
UINT
h
=
pSourceRects
[
i
].
bottom
-
pSourceRects
[
i
].
top
;
RECT
dst_rect
=
{
pDestPoints
[
i
].
x
,
pDestPoints
[
i
].
y
,
pDestPoints
[
i
].
x
+
w
,
pDestPoints
[
i
].
y
+
h
};
wined3d_surface_blt
(
Dest
->
wined3d_surface
,
&
dst_rect
,
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
0
,
NULL
,
WINED3DTEXF_POINT
);
}
}
}
}
else
else
{
{
for
(
i
=
0
;
i
<
cRects
;
++
i
)
for
(
i
=
0
;
i
<
cRects
;
++
i
)
{
{
wined3d_surface_bltfast
(
Dest
->
wined3d_surface
,
0
,
0
,
UINT
w
=
pSourceRects
[
i
].
right
-
pSourceRects
[
i
].
left
;
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
WINEDDBLTFAST_NOCOLORKEY
);
UINT
h
=
pSourceRects
[
i
].
bottom
-
pSourceRects
[
i
].
top
;
RECT
dst_rect
=
{
0
,
0
,
w
,
h
};
wined3d_surface_blt
(
Dest
->
wined3d_surface
,
&
dst_rect
,
Source
->
wined3d_surface
,
&
pSourceRects
[
i
],
0
,
NULL
,
WINED3DTEXF_POINT
);
}
}
}
}
}
}
...
...
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