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
f96aab3f
Commit
f96aab3f
authored
Apr 13, 2016
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use SetRect instead of open coding it.
Signed-off-by:
Michael Stefaniuc
<
mstefani@redhat.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a41694b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
31 deletions
+13
-31
videorenderer.c
dlls/quartz/videorenderer.c
+3
-11
vmr9.c
dlls/quartz/vmr9.c
+10
-20
No files found.
dlls/quartz/videorenderer.c
View file @
f96aab3f
...
...
@@ -430,9 +430,7 @@ static RECT WINAPI VideoRenderer_GetDefaultRect(BaseWindow *iface)
VideoRendererImpl
*
This
=
impl_from_BaseWindow
(
iface
);
static
RECT
defRect
;
defRect
.
left
=
defRect
.
top
=
0
;
defRect
.
right
=
This
->
VideoWidth
;
defRect
.
bottom
=
This
->
VideoHeight
;
SetRect
(
&
defRect
,
0
,
0
,
This
->
VideoWidth
,
This
->
VideoHeight
);
return
defRect
;
}
...
...
@@ -596,10 +594,7 @@ static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(BaseControlVideo* iface
{
VideoRendererImpl
*
This
=
impl_from_BaseControlVideo
(
iface
);
This
->
SourceRect
.
left
=
0
;
This
->
SourceRect
.
top
=
0
;
This
->
SourceRect
.
right
=
This
->
VideoWidth
;
This
->
SourceRect
.
bottom
=
This
->
VideoHeight
;
SetRect
(
&
This
->
SourceRect
,
0
,
0
,
This
->
VideoWidth
,
This
->
VideoHeight
);
return
S_OK
;
}
...
...
@@ -612,10 +607,7 @@ static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface
if
(
!
GetClientRect
(
This
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
rect
))
return
E_FAIL
;
This
->
DestRect
.
left
=
0
;
This
->
DestRect
.
top
=
0
;
This
->
DestRect
.
right
=
rect
.
right
;
This
->
DestRect
.
bottom
=
rect
.
bottom
;
SetRect
(
&
This
->
DestRect
,
0
,
0
,
rect
.
right
,
rect
.
bottom
);
return
S_OK
;
}
...
...
dlls/quartz/vmr9.c
View file @
f96aab3f
...
...
@@ -353,9 +353,9 @@ static HRESULT WINAPI VMR9_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TY
This
->
bmiheader
=
format
->
bmiHeader
;
TRACE
(
"Resolution: %dx%d
\n
"
,
format
->
bmiHeader
.
biWidth
,
format
->
bmiHeader
.
biHeight
);
This
->
source_rect
.
right
=
This
->
VideoWidth
=
format
->
bmiHeader
.
biWidth
;
This
->
source_rect
.
bottom
=
This
->
VideoHeight
=
format
->
bmiHeader
.
biHeight
;
This
->
source_rect
.
top
=
This
->
source_rect
.
left
=
0
;
This
->
VideoWidth
=
format
->
bmiHeader
.
biWidth
;
This
->
VideoHeight
=
format
->
bmiHeader
.
biHeight
;
SetRect
(
&
This
->
source_rect
,
0
,
0
,
This
->
VideoWidth
,
This
->
VideoHeight
)
;
}
else
if
(
IsEqualIID
(
&
pmt
->
formattype
,
&
FORMAT_VideoInfo2
))
{
...
...
@@ -364,9 +364,9 @@ static HRESULT WINAPI VMR9_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TY
This
->
bmiheader
=
format
->
bmiHeader
;
TRACE
(
"Resolution: %dx%d
\n
"
,
format
->
bmiHeader
.
biWidth
,
format
->
bmiHeader
.
biHeight
);
This
->
source_rect
.
right
=
This
->
VideoWidth
=
format
->
bmiHeader
.
biWidth
;
This
->
source_rect
.
bottom
=
This
->
VideoHeight
=
format
->
bmiHeader
.
biHeight
;
This
->
source_rect
.
top
=
This
->
source_rect
.
left
=
0
;
This
->
VideoWidth
=
format
->
bmiHeader
.
biWidth
;
This
->
VideoHeight
=
format
->
bmiHeader
.
biHeight
;
SetRect
(
&
This
->
source_rect
,
0
,
0
,
This
->
VideoWidth
,
This
->
VideoHeight
)
;
}
else
{
...
...
@@ -426,9 +426,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
hr
=
IVMRSurfaceAllocatorEx9_InitializeDevice
(
This
->
allocator
,
This
->
cookie
,
&
info
,
&
buffers
);
if
(
SUCCEEDED
(
hr
))
{
This
->
source_rect
.
left
=
This
->
source_rect
.
top
=
0
;
This
->
source_rect
.
right
=
This
->
bmiheader
.
biWidth
;
This
->
source_rect
.
bottom
=
This
->
bmiheader
.
biHeight
;
SetRect
(
&
This
->
source_rect
,
0
,
0
,
This
->
bmiheader
.
biWidth
,
This
->
bmiheader
.
biHeight
);
This
->
num_surfaces
=
buffers
;
}
...
...
@@ -544,9 +542,7 @@ static RECT WINAPI VMR9_GetDefaultRect(BaseWindow *This)
struct
quartz_vmr
*
pVMR9
=
impl_from_BaseWindow
(
This
);
static
RECT
defRect
;
defRect
.
left
=
defRect
.
top
=
0
;
defRect
.
right
=
pVMR9
->
VideoWidth
;
defRect
.
bottom
=
pVMR9
->
VideoHeight
;
SetRect
(
&
defRect
,
0
,
0
,
pVMR9
->
VideoWidth
,
pVMR9
->
VideoHeight
);
return
defRect
;
}
...
...
@@ -688,10 +684,7 @@ static HRESULT WINAPI VMR9_SetDefaultSourceRect(BaseControlVideo* This)
{
struct
quartz_vmr
*
pVMR9
=
impl_from_BaseControlVideo
(
This
);
pVMR9
->
source_rect
.
left
=
0
;
pVMR9
->
source_rect
.
top
=
0
;
pVMR9
->
source_rect
.
right
=
pVMR9
->
VideoWidth
;
pVMR9
->
source_rect
.
bottom
=
pVMR9
->
VideoHeight
;
SetRect
(
&
pVMR9
->
source_rect
,
0
,
0
,
pVMR9
->
VideoWidth
,
pVMR9
->
VideoHeight
);
return
S_OK
;
}
...
...
@@ -704,10 +697,7 @@ static HRESULT WINAPI VMR9_SetDefaultTargetRect(BaseControlVideo* This)
if
(
!
GetClientRect
(
pVMR9
->
baseControlWindow
.
baseWindow
.
hWnd
,
&
rect
))
return
E_FAIL
;
pVMR9
->
target_rect
.
left
=
0
;
pVMR9
->
target_rect
.
top
=
0
;
pVMR9
->
target_rect
.
right
=
rect
.
right
;
pVMR9
->
target_rect
.
bottom
=
rect
.
bottom
;
SetRect
(
&
pVMR9
->
target_rect
,
0
,
0
,
rect
.
right
,
rect
.
bottom
);
return
S_OK
;
}
...
...
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