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
78ea105b
Commit
78ea105b
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 IDirect3DQuery9 iface.
parent
0f10e1b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
24 deletions
+36
-24
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-3
device.c
dlls/d3d9/device.c
+2
-2
query.c
dlls/d3d9/query.c
+32
-19
No files found.
dlls/d3d9/d3d9_private.h
View file @
78ea105b
...
...
@@ -465,15 +465,14 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader,
* IDirect3DPixelShader implementation structure
*/
typedef
struct
IDirect3DQuery9Impl
{
/* IUnknown fields */
const
IDirect3DQuery9Vtbl
*
lpVtbl
;
IDirect3DQuery9
IDirect3DQuery9_iface
;
LONG
ref
;
/* IDirect3DQuery9 fields */
struct
wined3d_query
*
wineD3DQuery
;
/* Parent reference */
LPDIRECT3DDEVICE9EX
parentDevice
;
IDirect3DDevice9Ex
*
parentDevice
;
}
IDirect3DQuery9Impl
;
HRESULT
query_init
(
IDirect3DQuery9Impl
*
query
,
IDirect3DDevice9Impl
*
device
,
...
...
dlls/d3d9/device.c
View file @
78ea105b
...
...
@@ -2706,8 +2706,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(IDirect3DDevice9Ex *iface
}
TRACE
(
"Created query %p.
\n
"
,
object
);
if
(
query
)
*
query
=
(
IDirect3DQuery9
*
)
object
;
else
IDirect3DQuery9_Release
(
(
IDirect3DQuery9
*
)
object
);
if
(
query
)
*
query
=
&
object
->
IDirect3DQuery9_iface
;
else
IDirect3DQuery9_Release
(
&
object
->
IDirect3DQuery9_iface
);
return
D3D_OK
;
}
...
...
dlls/d3d9/query.c
View file @
78ea105b
...
...
@@ -25,9 +25,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d9
);
/* IDirect3DQuery9 IUnknown parts follow: */
static
HRESULT
WINAPI
IDirect3DQuery9Impl_QueryInterface
(
LPDIRECT3DQUERY9
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
inline
IDirect3DQuery9Impl
*
impl_from_IDirect3DQuery9
(
IDirect3DQuery9
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DQuery9Impl
,
IDirect3DQuery9_iface
);
}
static
HRESULT
WINAPI
IDirect3DQuery9Impl_QueryInterface
(
IDirect3DQuery9
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
...
...
@@ -43,8 +49,9 @@ static HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(LPDIRECT3DQUERY9 iface,
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirect3DQuery9Impl_AddRef
(
LPDIRECT3DQUERY9
iface
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DQuery9Impl_AddRef
(
IDirect3DQuery9
*
iface
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
ref
);
...
...
@@ -52,8 +59,9 @@ static ULONG WINAPI IDirect3DQuery9Impl_AddRef(LPDIRECT3DQUERY9 iface) {
return
ref
;
}
static
ULONG
WINAPI
IDirect3DQuery9Impl_Release
(
LPDIRECT3DQUERY9
iface
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
ULONG
WINAPI
IDirect3DQuery9Impl_Release
(
IDirect3DQuery9
*
iface
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
ref
);
...
...
@@ -69,10 +77,10 @@ static ULONG WINAPI IDirect3DQuery9Impl_Release(LPDIRECT3DQUERY9 iface) {
return
ref
;
}
/* IDirect3DQuery9 Interface follow: */
static
HRESULT
WINAPI
IDirect3DQuery9Impl_GetDevice
(
IDirect3DQuery9
*
iface
,
IDirect3DDevice9
**
device
)
static
HRESULT
WINAPI
IDirect3DQuery9Impl_GetDevice
(
IDirect3DQuery9
*
iface
,
IDirect3DDevice9
**
device
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
)
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
...
...
@@ -84,8 +92,9 @@ static HRESULT WINAPI IDirect3DQuery9Impl_GetDevice(IDirect3DQuery9 *iface, IDir
return
D3D_OK
;
}
static
D3DQUERYTYPE
WINAPI
IDirect3DQuery9Impl_GetType
(
LPDIRECT3DQUERY9
iface
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
D3DQUERYTYPE
WINAPI
IDirect3DQuery9Impl_GetType
(
IDirect3DQuery9
*
iface
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -97,8 +106,9 @@ static D3DQUERYTYPE WINAPI IDirect3DQuery9Impl_GetType(LPDIRECT3DQUERY9 iface) {
return
hr
;
}
static
DWORD
WINAPI
IDirect3DQuery9Impl_GetDataSize
(
LPDIRECT3DQUERY9
iface
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
DWORD
WINAPI
IDirect3DQuery9Impl_GetDataSize
(
IDirect3DQuery9
*
iface
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
DWORD
ret
;
TRACE
(
"iface %p.
\n
"
,
iface
);
...
...
@@ -110,8 +120,9 @@ static DWORD WINAPI IDirect3DQuery9Impl_GetDataSize(LPDIRECT3DQUERY9 iface) {
return
ret
;
}
static
HRESULT
WINAPI
IDirect3DQuery9Impl_Issue
(
LPDIRECT3DQUERY9
iface
,
DWORD
dwIssueFlags
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DQuery9Impl_Issue
(
IDirect3DQuery9
*
iface
,
DWORD
dwIssueFlags
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, flags %#x.
\n
"
,
iface
,
dwIssueFlags
);
...
...
@@ -123,8 +134,10 @@ static HRESULT WINAPI IDirect3DQuery9Impl_Issue(LPDIRECT3DQUERY9 iface, DWORD dw
return
hr
;
}
static
HRESULT
WINAPI
IDirect3DQuery9Impl_GetData
(
LPDIRECT3DQUERY9
iface
,
void
*
pData
,
DWORD
dwSize
,
DWORD
dwGetDataFlags
)
{
IDirect3DQuery9Impl
*
This
=
(
IDirect3DQuery9Impl
*
)
iface
;
static
HRESULT
WINAPI
IDirect3DQuery9Impl_GetData
(
IDirect3DQuery9
*
iface
,
void
*
pData
,
DWORD
dwSize
,
DWORD
dwGetDataFlags
)
{
IDirect3DQuery9Impl
*
This
=
impl_from_IDirect3DQuery9
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, data %p, size %u, flags %#x.
\n
"
,
...
...
@@ -154,7 +167,7 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D
{
HRESULT
hr
;
query
->
lpVtbl
=
&
Direct3DQuery9_Vtbl
;
query
->
IDirect3DQuery9_iface
.
lpVtbl
=
&
Direct3DQuery9_Vtbl
;
query
->
ref
=
1
;
wined3d_mutex_lock
();
...
...
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