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
2f028f03
Commit
2f028f03
authored
Jul 23, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Avoid loading the destination surface in stretch_rect_fbo() if it will…
wined3d: Avoid loading the destination surface in stretch_rect_fbo() if it will be completely overwritten.
parent
0b630e14
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
device.c
dlls/wined3d/device.c
+14
-3
No files found.
dlls/wined3d/device.c
View file @
2f028f03
...
...
@@ -5743,6 +5743,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetDepthStencilSurface(IWineD3DDevice
}
}
static
BOOL
surface_is_full_rect
(
IWineD3DSurfaceImpl
*
surface
,
const
RECT
*
r
)
{
if
((
r
->
left
&&
r
->
right
)
||
abs
(
r
->
right
-
r
->
left
)
!=
surface
->
currentDesc
.
Width
)
return
FALSE
;
if
((
r
->
top
&&
r
->
bottom
)
||
abs
(
r
->
bottom
-
r
->
top
)
!=
surface
->
currentDesc
.
Height
)
return
FALSE
;
return
TRUE
;
}
void
stretch_rect_fbo
(
IWineD3DDeviceImpl
*
device
,
IWineD3DSurfaceImpl
*
src_surface
,
const
RECT
*
src_rect_in
,
IWineD3DSurfaceImpl
*
dst_surface
,
const
RECT
*
dst_rect_in
,
const
WINED3DTEXTUREFILTERTYPE
filter
)
{
...
...
@@ -5772,10 +5781,12 @@ void stretch_rect_fbo(IWineD3DDeviceImpl *device, IWineD3DSurfaceImpl *src_surfa
break
;
}
/* Make sure the drawables are up-to-date. Note that loading the
* destination surface isn't strictly required if we overwrite the
* entire surface. */
/* Make sure the drawables are up-to-date. Loading the destination
* surface isn't required if the entire surface is overwritten. (And is
* in fact harmful if we're being called by surface_load_location() with
* the purpose of loading the destination surface.) */
surface_load_location
(
src_surface
,
SFLAG_INDRAWABLE
,
NULL
);
if
(
!
surface_is_full_rect
(
dst_surface
,
&
dst_rect
))
surface_load_location
(
dst_surface
,
SFLAG_INDRAWABLE
,
NULL
);
if
(
!
surface_is_offscreen
(
src_surface
))
context
=
context_acquire
(
device
,
src_surface
);
...
...
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