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
0352a7fb
Commit
0352a7fb
authored
May 21, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
May 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Add offscreen presentation to VMR9.
parent
38c31973
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
vmr9.c
dlls/quartz/vmr9.c
+31
-1
No files found.
dlls/quartz/vmr9.c
View file @
0352a7fb
...
...
@@ -1416,6 +1416,36 @@ static HRESULT VMR9_ImagePresenter_PresentTexture(VMR9DefaultAllocatorPresenterI
return
S_OK
;
}
static
HRESULT
VMR9_ImagePresenter_PresentOffscreenSurface
(
VMR9DefaultAllocatorPresenterImpl
*
This
,
IDirect3DSurface9
*
surface
)
{
HRESULT
hr
;
IDirect3DSurface9
*
target
=
NULL
;
RECT
target_rect
;
hr
=
IDirect3DDevice9_GetBackBuffer
(
This
->
d3d9_dev
,
0
,
0
,
D3DBACKBUFFER_TYPE_MONO
,
&
target
);
if
(
FAILED
(
hr
))
{
ERR
(
"IDirect3DDevice9_GetBackBuffer -- %08x
\n
"
,
hr
);
return
hr
;
}
target_rect
=
This
->
pVMR9
->
target_rect
;
target_rect
.
right
-=
target_rect
.
left
;
target_rect
.
bottom
-=
target_rect
.
top
;
target_rect
.
left
=
target_rect
.
top
=
0
;
/* Flip */
target_rect
.
top
=
target_rect
.
bottom
;
target_rect
.
bottom
=
0
;
hr
=
IDirect3DDevice9_StretchRect
(
This
->
d3d9_dev
,
surface
,
&
This
->
pVMR9
->
source_rect
,
target
,
&
target_rect
,
D3DTEXF_LINEAR
);
if
(
FAILED
(
hr
))
ERR
(
"IDirect3DDevice9_StretchRect -- %08x
\n
"
,
hr
);
IDirect3DSurface9_Release
(
target
);
return
hr
;
}
static
HRESULT
WINAPI
VMR9_ImagePresenter_PresentImage
(
IVMRImagePresenter9
*
iface
,
DWORD_PTR
id
,
VMR9PresentationInfo
*
info
)
{
VMR9DefaultAllocatorPresenterImpl
*
This
=
impl_from_IVMRImagePresenter9
(
iface
);
...
...
@@ -1441,7 +1471,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *ifac
if
(
This
->
d3d9_vertex
)
hr
=
VMR9_ImagePresenter_PresentTexture
(
This
,
info
->
lpSurf
);
else
hr
=
E_NOTIMPL
;
hr
=
VMR9_ImagePresenter_PresentOffscreenSurface
(
This
,
info
->
lpSurf
)
;
render
=
SUCCEEDED
(
hr
);
}
else
...
...
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