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
a991b670
Commit
a991b670
authored
Apr 12, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Apr 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: COM cleanup for the IDirect3DStateBlock9 iface.
parent
78ea105b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
19 deletions
+29
-19
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-3
device.c
dlls/d3d9/device.c
+2
-2
stateblock.c
dlls/d3d9/stateblock.c
+25
-14
No files found.
dlls/d3d9/d3d9_private.h
View file @
a991b670
...
...
@@ -377,15 +377,14 @@ HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice
* IDirect3DStateBlock9 implementation structure
*/
typedef
struct
IDirect3DStateBlock9Impl
{
/* IUnknown fields */
const
IDirect3DStateBlock9Vtbl
*
lpVtbl
;
IDirect3DStateBlock9
IDirect3DStateBlock9_iface
;
LONG
ref
;
/* IDirect3DStateBlock9 fields */
struct
wined3d_stateblock
*
wined3d_stateblock
;
/* Parent reference */
LPDIRECT3DDEVICE9EX
parentDevice
;
IDirect3DDevice9Ex
*
parentDevice
;
}
IDirect3DStateBlock9Impl
;
HRESULT
stateblock_init
(
IDirect3DStateBlock9Impl
*
stateblock
,
IDirect3DDevice9Impl
*
device
,
...
...
dlls/d3d9/device.c
View file @
a991b670
...
...
@@ -1509,7 +1509,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(IDirect3DDevice9Ex *
}
TRACE
(
"Created stateblock %p.
\n
"
,
object
);
*
stateblock
=
(
IDirect3DStateBlock9
*
)
object
;
*
stateblock
=
&
object
->
IDirect3DStateBlock9_iface
;
return
D3D_OK
;
}
...
...
@@ -1568,7 +1568,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(IDirect3DDevice9Ex *ifa
}
TRACE
(
"Created stateblock %p.
\n
"
,
object
);
*
stateblock
=
(
IDirect3DStateBlock9
*
)
object
;
*
stateblock
=
&
object
->
IDirect3DStateBlock9_iface
;
return
D3D_OK
;
}
...
...
dlls/d3d9/stateblock.c
View file @
a991b670
...
...
@@ -25,9 +25,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d9
);
/* IDirect3DStateBlock9 IUnknown parts follow: */
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_QueryInterface
(
LPDIRECT3DSTATEBLOCK9
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirect3DStateBlock9Impl
*
This
=
(
IDirect3DStateBlock9Impl
*
)
iface
;
static
inline
IDirect3DStateBlock9Impl
*
impl_from_IDirect3DStateBlock9
(
IDirect3DStateBlock9
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DStateBlock9Impl
,
IDirect3DStateBlock9_iface
);
}
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_QueryInterface
(
IDirect3DStateBlock9
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirect3DStateBlock9Impl
*
This
=
impl_from_IDirect3DStateBlock9
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
...
...
@@ -43,8 +49,9 @@ static HRESULT WINAPI IDirect3DStateBlock9Impl_QueryInterface(LPDIRECT3DSTATEBLO
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DStateBlock9Impl_AddRef
(
LPDIRECT3DSTATEBLOCK9
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
(
IDirect3DStateBlock9Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DStateBlock9Impl_AddRef
(
IDirect3DStateBlock9
*
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
impl_from_IDirect3DStateBlock9
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
ref
);
...
...
@@ -52,8 +59,9 @@ static ULONG WINAPI IDirect3DStateBlock9Impl_AddRef(LPDIRECT3DSTATEBLOCK9 iface)
return
ref
;
}
static
ULONG
WINAPI
IDirect3DStateBlock9Impl_Release
(
LPDIRECT3DSTATEBLOCK9
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
(
IDirect3DStateBlock9Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DStateBlock9Impl_Release
(
IDirect3DStateBlock9
*
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
impl_from_IDirect3DStateBlock9
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
ref
);
...
...
@@ -70,9 +78,10 @@ static ULONG WINAPI IDirect3DStateBlock9Impl_Release(LPDIRECT3DSTATEBLOCK9 iface
}
/* IDirect3DStateBlock9 Interface follow: */
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_GetDevice
(
IDirect3DStateBlock9
*
iface
,
IDirect3DDevice9
**
device
)
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_GetDevice
(
IDirect3DStateBlock9
*
iface
,
IDirect3DDevice9
**
device
)
{
IDirect3DStateBlock9Impl
*
This
=
(
IDirect3DStateBlock9Impl
*
)
iface
;
IDirect3DStateBlock9Impl
*
This
=
impl_from_IDirect3DStateBlock9
(
iface
)
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
...
...
@@ -84,8 +93,9 @@ static HRESULT WINAPI IDirect3DStateBlock9Impl_GetDevice(IDirect3DStateBlock9 *i
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_Capture
(
LPDIRECT3DSTATEBLOCK9
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
(
IDirect3DStateBlock9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_Capture
(
IDirect3DStateBlock9
*
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
impl_from_IDirect3DStateBlock9
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -97,8 +107,9 @@ static HRESULT WINAPI IDirect3DStateBlock9Impl_Capture(LPDIRECT3DSTATEBLOCK9 ifa
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_Apply
(
LPDIRECT3DSTATEBLOCK9
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
(
IDirect3DStateBlock9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DStateBlock9Impl_Apply
(
IDirect3DStateBlock9
*
iface
)
{
IDirect3DStateBlock9Impl
*
This
=
impl_from_IDirect3DStateBlock9
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -128,7 +139,7 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Im
{
HRESULT
hr
;
stateblock
->
lpVtbl
=
&
Direct3DStateBlock9_Vtbl
;
stateblock
->
IDirect3DStateBlock9_iface
.
lpVtbl
=
&
Direct3DStateBlock9_Vtbl
;
stateblock
->
ref
=
1
;
if
(
wined3d_stateblock
)
...
...
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