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
61f51eb4
Commit
61f51eb4
authored
Jun 06, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jun 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: COM cleanup in the IDXGISwapChain iface.
parent
125b9495
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
swapchain.c
dlls/dxgi/swapchain.c
+10
-5
No files found.
dlls/dxgi/dxgi_private.h
View file @
61f51eb4
...
...
@@ -124,7 +124,7 @@ HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, IWineDXGIFactory *parent
/* IDXGISwapChain */
struct
dxgi_swapchain
{
const
struct
IDXGISwapChainVtbl
*
vtbl
;
IDXGISwapChain
IDXGISwapChain_iface
;
LONG
refcount
;
struct
wined3d_swapchain
*
wined3d_swapchain
;
};
...
...
dlls/dxgi/swapchain.c
View file @
61f51eb4
...
...
@@ -24,6 +24,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dxgi
);
static
inline
struct
dxgi_swapchain
*
impl_from_IDXGISwapChain
(
IDXGISwapChain
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dxgi_swapchain
,
IDXGISwapChain_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
dxgi_swapchain_QueryInterface
(
IDXGISwapChain
*
iface
,
REFIID
riid
,
void
**
object
)
...
...
@@ -48,7 +53,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_QueryInterface(IDXGISwapChain *i
static
ULONG
STDMETHODCALLTYPE
dxgi_swapchain_AddRef
(
IDXGISwapChain
*
iface
)
{
struct
dxgi_swapchain
*
This
=
(
struct
dxgi_swapchain
*
)
iface
;
struct
dxgi_swapchain
*
This
=
impl_from_IDXGISwapChain
(
iface
)
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -61,7 +66,7 @@ static ULONG STDMETHODCALLTYPE dxgi_swapchain_AddRef(IDXGISwapChain *iface)
static
ULONG
STDMETHODCALLTYPE
dxgi_swapchain_Release
(
IDXGISwapChain
*
iface
)
{
struct
dxgi_swapchain
*
This
=
(
struct
dxgi_swapchain
*
)
iface
;
struct
dxgi_swapchain
*
This
=
impl_from_IDXGISwapChain
(
iface
)
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -130,7 +135,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDevice(IDXGISwapChain *iface,
static
HRESULT
STDMETHODCALLTYPE
dxgi_swapchain_Present
(
IDXGISwapChain
*
iface
,
UINT
sync_interval
,
UINT
flags
)
{
struct
dxgi_swapchain
*
This
=
(
struct
dxgi_swapchain
*
)
iface
;
struct
dxgi_swapchain
*
This
=
impl_from_IDXGISwapChain
(
iface
)
;
TRACE
(
"iface %p, sync_interval %u, flags %#x
\n
"
,
iface
,
sync_interval
,
flags
);
...
...
@@ -143,7 +148,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain *iface, U
static
HRESULT
STDMETHODCALLTYPE
dxgi_swapchain_GetBuffer
(
IDXGISwapChain
*
iface
,
UINT
buffer_idx
,
REFIID
riid
,
void
**
surface
)
{
struct
dxgi_swapchain
*
This
=
(
struct
dxgi_swapchain
*
)
iface
;
struct
dxgi_swapchain
*
This
=
impl_from_IDXGISwapChain
(
iface
)
;
struct
wined3d_surface
*
backbuffer
;
IUnknown
*
parent
;
HRESULT
hr
;
...
...
@@ -271,7 +276,7 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
{
HRESULT
hr
;
swapchain
->
v
tbl
=
&
dxgi_swapchain_vtbl
;
swapchain
->
IDXGISwapChain_iface
.
lpV
tbl
=
&
dxgi_swapchain_vtbl
;
swapchain
->
refcount
=
1
;
hr
=
wined3d_swapchain_create
(
device
->
wined3d_device
,
present_parameters
,
...
...
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