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
1a812eb6
Commit
1a812eb6
authored
Jan 29, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Use wined3d_texture_blt() in ddraw_surface_blt_clipped().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45b33347
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
surface.c
dlls/ddraw/surface.c
+11
-5
No files found.
dlls/ddraw/surface.c
View file @
1a812eb6
...
@@ -1389,7 +1389,8 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
...
@@ -1389,7 +1389,8 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
struct
ddraw_surface
*
src_surface
,
const
RECT
*
src_rect_in
,
DWORD
flags
,
struct
ddraw_surface
*
src_surface
,
const
RECT
*
src_rect_in
,
DWORD
flags
,
const
WINEDDBLTFX
*
fx
,
enum
wined3d_texture_filter_type
filter
)
const
WINEDDBLTFX
*
fx
,
enum
wined3d_texture_filter_type
filter
)
{
{
struct
wined3d_surface
*
wined3d_src_surface
=
src_surface
?
src_surface
->
wined3d_surface
:
NULL
;
struct
wined3d_texture
*
wined3d_src_texture
;
unsigned
int
src_sub_resource_idx
;
RECT
src_rect
,
dst_rect
;
RECT
src_rect
,
dst_rect
;
float
scale_x
,
scale_y
;
float
scale_x
,
scale_y
;
const
RECT
*
clip_rect
;
const
RECT
*
clip_rect
;
...
@@ -1429,10 +1430,15 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
...
@@ -1429,10 +1430,15 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
if
(
IsRectEmpty
(
&
src_rect
))
if
(
IsRectEmpty
(
&
src_rect
))
return
DDERR_INVALIDRECT
;
return
DDERR_INVALIDRECT
;
wined3d_src_texture
=
src_surface
->
wined3d_texture
;
src_sub_resource_idx
=
src_surface
->
sub_resource_idx
;
}
}
else
else
{
{
SetRect
(
&
src_rect
,
0
,
0
,
0
,
0
);
SetRect
(
&
src_rect
,
0
,
0
,
0
,
0
);
wined3d_src_texture
=
NULL
;
src_sub_resource_idx
=
0
;
}
}
if
(
!
dst_surface
->
clipper
)
if
(
!
dst_surface
->
clipper
)
...
@@ -1440,8 +1446,8 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
...
@@ -1440,8 +1446,8 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
if
(
src_surface
&&
src_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
if
(
src_surface
&&
src_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
hr
=
ddraw_surface_update_frontbuffer
(
src_surface
,
&
src_rect
,
TRUE
);
hr
=
ddraw_surface_update_frontbuffer
(
src_surface
,
&
src_rect
,
TRUE
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
hr
=
wined3d_
surface_blt
(
dst_surface
->
wined3d_surface
,
&
dst_rect
,
hr
=
wined3d_
texture_blt
(
dst_surface
->
wined3d_texture
,
dst_surface
->
sub_resource_idx
,
&
dst_rect
,
wined3d_src_
surface
,
&
src_rect
,
flags
,
fx
,
filter
);
wined3d_src_
texture
,
src_sub_resource_idx
,
&
src_rect
,
flags
,
fx
,
filter
);
if
(
SUCCEEDED
(
hr
)
&&
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
))
if
(
SUCCEEDED
(
hr
)
&&
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
))
hr
=
ddraw_surface_update_frontbuffer
(
dst_surface
,
&
dst_rect
,
FALSE
);
hr
=
ddraw_surface_update_frontbuffer
(
dst_surface
,
&
dst_rect
,
FALSE
);
...
@@ -1491,8 +1497,8 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
...
@@ -1491,8 +1497,8 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons
}
}
}
}
if
(
FAILED
(
hr
=
wined3d_
surface_blt
(
dst_surface
->
wined3d_surface
,
&
clip_rect
[
i
]
,
if
(
FAILED
(
hr
=
wined3d_
texture_blt
(
dst_surface
->
wined3d_texture
,
dst_surface
->
sub_resource_idx
,
wined3d_src_surface
,
&
src_rect_clipped
,
flags
,
fx
,
filter
)))
&
clip_rect
[
i
],
wined3d_src_texture
,
src_sub_resource_idx
,
&
src_rect_clipped
,
flags
,
fx
,
filter
)))
break
;
break
;
if
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
if
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
...
...
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