Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
a991b670
Commit
a991b670
authored
13 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3d9: COM cleanup for the IDirect3DStateBlock9 iface.
parent
78ea105b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/d3d9/d3d9_private.h
+2
-3
2 additions, 3 deletions
dlls/d3d9/d3d9_private.h
dlls/d3d9/device.c
+2
-2
2 additions, 2 deletions
dlls/d3d9/device.c
dlls/d3d9/stateblock.c
+25
-14
25 additions, 14 deletions
dlls/d3d9/stateblock.c
with
29 additions
and
19 deletions
dlls/d3d9/d3d9_private.h
+
2
−
3
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
,
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d9/device.c
+
2
−
2
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
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d9/stateblock.c
+
25
−
14
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
=
(
IDirect3DStateBlock9
Impl
*
)
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment