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
8ec3238b
Commit
8ec3238b
authored
Jan 31, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: COM cleanup for the IDirect3DSwapChain8 iface.
parent
05b6032f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
17 deletions
+26
-17
d3d8_private.h
dlls/d3d8/d3d8_private.h
+4
-4
device.c
dlls/d3d8/device.c
+1
-1
swapchain.c
dlls/d3d8/swapchain.c
+21
-12
No files found.
dlls/d3d8/d3d8_private.h
View file @
8ec3238b
...
...
@@ -230,14 +230,14 @@ HRESULT volume_init(IDirect3DVolume8Impl *volume, IDirect3DDevice8Impl *device,
struct
IDirect3DSwapChain8Impl
{
/* IUnknown fields */
const
IDirect3DSwapChain8Vtbl
*
lpVtbl
;
LONG
ref
;
IDirect3DSwapChain8
IDirect3DSwapChain8_iface
;
LONG
ref
;
/* IDirect3DSwapChain8 fields */
IWineD3DSwapChain
*
wineD3DSwapChain
;
IWineD3DSwapChain
*
wineD3DSwapChain
;
/* Parent reference */
LPDIRECT3DDEVICE8
parentDevice
;
IDirect3DDevice8
*
parentDevice
;
};
HRESULT
swapchain_init
(
IDirect3DSwapChain8Impl
*
swapchain
,
IDirect3DDevice8Impl
*
device
,
...
...
dlls/d3d8/device.c
View file @
8ec3238b
...
...
@@ -547,7 +547,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateAdditionalSwapChain(IDirect3DDe
}
TRACE
(
"Created swapchain %p.
\n
"
,
object
);
*
swapchain
=
(
IDirect3DSwapChain8
*
)
object
;
*
swapchain
=
&
object
->
IDirect3DSwapChain8_iface
;
return
D3D_OK
;
}
...
...
dlls/d3d8/swapchain.c
View file @
8ec3238b
...
...
@@ -23,10 +23,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d8
);
/* IDirect3DSwapChain IUnknown parts follow: */
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_QueryInterface
(
LPDIRECT3DSWAPCHAIN8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
inline
IDirect3DSwapChain8Impl
*
impl_from_IDirect3DSwapChain8
(
IDirect3DSwapChain8
*
iface
)
{
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
return
CONTAINING_RECORD
(
iface
,
IDirect3DSwapChain8Impl
,
IDirect3DSwapChain8_iface
);
}
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_QueryInterface
(
IDirect3DSwapChain8
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirect3DSwapChain8Impl
*
This
=
impl_from_IDirect3DSwapChain8
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
...
...
@@ -42,8 +47,9 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DSwapChain8Impl_AddRef
(
LPDIRECT3DSWAPCHAIN8
iface
)
{
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DSwapChain8Impl_AddRef
(
IDirect3DSwapChain8
*
iface
)
{
IDirect3DSwapChain8Impl
*
This
=
impl_from_IDirect3DSwapChain8
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
ref
);
...
...
@@ -51,8 +57,9 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_AddRef(LPDIRECT3DSWAPCHAIN8 iface) {
return
ref
;
}
static
ULONG
WINAPI
IDirect3DSwapChain8Impl_Release
(
LPDIRECT3DSWAPCHAIN8
iface
)
{
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DSwapChain8Impl_Release
(
IDirect3DSwapChain8
*
iface
)
{
IDirect3DSwapChain8Impl
*
This
=
impl_from_IDirect3DSwapChain8
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
ref
);
...
...
@@ -68,9 +75,11 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface)
return
ref
;
}
/* IDirect3DSwapChain8 parts follow: */
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_Present
(
LPDIRECT3DSWAPCHAIN8
iface
,
CONST
RECT
*
pSourceRect
,
CONST
RECT
*
pDestRect
,
HWND
hDestWindowOverride
,
CONST
RGNDATA
*
pDirtyRegion
)
{
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_Present
(
IDirect3DSwapChain8
*
iface
,
const
RECT
*
pSourceRect
,
const
RECT
*
pDestRect
,
HWND
hDestWindowOverride
,
const
RGNDATA
*
pDirtyRegion
)
{
IDirect3DSwapChain8Impl
*
This
=
impl_from_IDirect3DSwapChain8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p.
\n
"
,
...
...
@@ -86,7 +95,7 @@ static HRESULT WINAPI IDirect3DSwapChain8Impl_Present(LPDIRECT3DSWAPCHAIN8 iface
static
HRESULT
WINAPI
IDirect3DSwapChain8Impl_GetBackBuffer
(
IDirect3DSwapChain8
*
iface
,
UINT
iBackBuffer
,
D3DBACKBUFFER_TYPE
Type
,
IDirect3DSurface8
**
ppBackBuffer
)
{
IDirect3DSwapChain8Impl
*
This
=
(
IDirect3DSwapChain8Impl
*
)
iface
;
IDirect3DSwapChain8Impl
*
This
=
impl_from_IDirect3DSwapChain8
(
iface
)
;
IWineD3DSurface
*
mySurface
=
NULL
;
HRESULT
hr
;
...
...
@@ -123,7 +132,7 @@ HRESULT swapchain_init(IDirect3DSwapChain8Impl *swapchain, IDirect3DDevice8Impl
HRESULT
hr
;
swapchain
->
ref
=
1
;
swapchain
->
lpVtbl
=
&
Direct3DSwapChain8_Vtbl
;
swapchain
->
IDirect3DSwapChain8_iface
.
lpVtbl
=
&
Direct3DSwapChain8_Vtbl
;
wined3d_parameters
.
BackBufferWidth
=
present_parameters
->
BackBufferWidth
;
wined3d_parameters
.
BackBufferHeight
=
present_parameters
->
BackBufferHeight
;
...
...
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