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
5ab99b16
Commit
5ab99b16
authored
Mar 20, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Merge surface_blt_to_drawable() into surface_load_drawable().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cbede20a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
25 deletions
+14
-25
surface.c
dlls/wined3d/surface.c
+14
-25
No files found.
dlls/wined3d/surface.c
View file @
5ab99b16
...
...
@@ -2098,29 +2098,6 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW
rect
->
bottom
=
drawable_height
-
rect
->
bottom
;
}
/* Context activation is done by the caller. */
static
void
surface_blt_to_drawable
(
struct
wined3d_device
*
device
,
struct
wined3d_context
*
context
,
enum
wined3d_texture_filter_type
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect_in
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect_in
)
{
unsigned
int
dst_sub_resource_idx
=
surface_get_sub_resource_idx
(
dst_surface
);
struct
wined3d_texture
*
dst_texture
=
dst_surface
->
container
;
struct
wined3d_surface
*
restore_rt
=
NULL
;
restore_rt
=
context_get_rt_surface
(
context
);
if
(
restore_rt
!=
dst_surface
)
context
=
context_acquire
(
device
,
dst_texture
,
dst_sub_resource_idx
);
else
restore_rt
=
NULL
;
device
->
blitter
->
blit_surface
(
device
,
WINED3D_BLIT_OP_COLOR_BLIT
,
context
,
src_surface
,
src_rect_in
,
dst_surface
,
dst_rect_in
,
NULL
,
filter
);
if
(
restore_rt
)
context_restore
(
context
,
restore_rt
);
}
HRESULT
surface_color_fill
(
struct
wined3d_surface
*
s
,
const
RECT
*
rect
,
const
struct
wined3d_color
*
color
)
{
struct
wined3d_resource
*
resource
=
&
s
->
container
->
resource
;
...
...
@@ -2337,6 +2314,8 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
{
unsigned
int
sub_resource_idx
=
surface_get_sub_resource_idx
(
surface
);
struct
wined3d_texture
*
texture
=
surface
->
container
;
struct
wined3d_surface
*
restore_rt
=
NULL
;
struct
wined3d_device
*
device
;
RECT
r
;
if
(
texture
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
...
...
@@ -2354,10 +2333,20 @@ static BOOL surface_load_drawable(struct wined3d_surface *surface,
return
FALSE
;
}
device
=
texture
->
resource
.
device
;
restore_rt
=
context_get_rt_surface
(
context
);
if
(
restore_rt
!=
surface
)
context
=
context_acquire
(
device
,
texture
,
sub_resource_idx
);
else
restore_rt
=
NULL
;
surface_get_rect
(
surface
,
NULL
,
&
r
);
wined3d_texture_load_location
(
texture
,
sub_resource_idx
,
context
,
WINED3D_LOCATION_TEXTURE_RGB
);
surface_blt_to_drawable
(
texture
->
resource
.
device
,
context
,
WINED3D_TEXF_POINT
,
surface
,
&
r
,
surface
,
&
r
);
device
->
blitter
->
blit_surface
(
device
,
WINED3D_BLIT_OP_COLOR_BLIT
,
context
,
surface
,
&
r
,
surface
,
&
r
,
NULL
,
WINED3D_TEXF_POINT
);
if
(
restore_rt
)
context_restore
(
context
,
restore_rt
);
return
TRUE
;
}
...
...
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