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
682c969e
Commit
682c969e
authored
Mar 25, 2010
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Mar 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a helper function for getting a valid rectangle.
parent
a7d3b616
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
30 deletions
+16
-30
surface.c
dlls/wined3d/surface.c
+16
-30
No files found.
dlls/wined3d/surface.c
View file @
682c969e
...
...
@@ -273,6 +273,19 @@ static void surface_get_blt_info(GLenum target, const RECT *rect_in, GLsizei w,
}
}
static
inline
void
surface_get_rect
(
IWineD3DSurfaceImpl
*
This
,
const
RECT
*
rect_in
,
RECT
*
rect_out
)
{
if
(
rect_in
)
*
rect_out
=
*
rect_in
;
else
{
rect_out
->
left
=
0
;
rect_out
->
top
=
0
;
rect_out
->
right
=
This
->
currentDesc
.
Width
;
rect_out
->
bottom
=
This
->
currentDesc
.
Height
;
}
}
/* GL locking and context activation is done by the caller */
static
void
draw_textured_quad
(
IWineD3DSurfaceImpl
*
src_surface
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
WINED3DTEXTUREFILTERTYPE
Filter
)
{
...
...
@@ -4027,17 +4040,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
TRACE
(
"Blt from surface %p to rendertarget %p
\n
"
,
Src
,
This
);
if
(
SrcRect
)
{
SourceRectangle
.
left
=
SrcRect
->
left
;
SourceRectangle
.
right
=
SrcRect
->
right
;
SourceRectangle
.
top
=
SrcRect
->
top
;
SourceRectangle
.
bottom
=
SrcRect
->
bottom
;
}
else
{
SourceRectangle
.
left
=
0
;
SourceRectangle
.
right
=
Src
->
currentDesc
.
Width
;
SourceRectangle
.
top
=
0
;
SourceRectangle
.
bottom
=
Src
->
currentDesc
.
Height
;
}
surface_get_rect
(
Src
,
SrcRect
,
&
SourceRectangle
);
/* When blitting from an offscreen surface to a rendertarget, the source
* surface is not required to have a palette. Our rendering / conversion
...
...
@@ -4324,17 +4327,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD
RECT
SrcRect
,
DstRect
;
DWORD
Flags
=
0
;
if
(
rsrc
)
{
SrcRect
.
left
=
rsrc
->
left
;
SrcRect
.
top
=
rsrc
->
top
;
SrcRect
.
bottom
=
rsrc
->
bottom
;
SrcRect
.
right
=
rsrc
->
right
;
}
else
{
SrcRect
.
left
=
0
;
SrcRect
.
top
=
0
;
SrcRect
.
right
=
srcImpl
->
currentDesc
.
Width
;
SrcRect
.
bottom
=
srcImpl
->
currentDesc
.
Height
;
}
surface_get_rect
(
srcImpl
,
rsrc
,
&
SrcRect
);
DstRect
.
left
=
dstx
;
DstRect
.
top
=
dsty
;
...
...
@@ -4755,14 +4748,7 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
struct
wined3d_context
*
context
;
RECT
src_rect
,
dst_rect
;
if
(
rect_in
)
{
src_rect
=
*
rect_in
;
}
else
{
src_rect
.
left
=
0
;
src_rect
.
top
=
0
;
src_rect
.
right
=
This
->
currentDesc
.
Width
;
src_rect
.
bottom
=
This
->
currentDesc
.
Height
;
}
surface_get_rect
(
This
,
rect_in
,
&
src_rect
);
context
=
context_acquire
(
device
,
(
IWineD3DSurface
*
)
This
,
CTXUSAGE_BLIT
);
if
(
context
->
render_offscreen
)
...
...
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