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
663483e1
Commit
663483e1
authored
Jul 08, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: COM cleanup for the IDirect3DExecuteBuffer iface.
parent
9ab233ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
24 deletions
+22
-24
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-4
device.c
dlls/ddraw/device.c
+1
-1
executebuffer.c
dlls/ddraw/executebuffer.c
+19
-19
No files found.
dlls/ddraw/ddraw_private.h
View file @
663483e1
...
...
@@ -486,10 +486,8 @@ void d3d_viewport_init(IDirect3DViewportImpl *viewport, IDirectDrawImpl *ddraw)
*****************************************************************************/
struct
IDirect3DExecuteBufferImpl
{
/* IUnknown */
const
IDirect3DExecuteBufferVtbl
*
lpVtbl
;
LONG
ref
;
IDirect3DExecuteBuffer
IDirect3DExecuteBuffer_iface
;
LONG
ref
;
/* IDirect3DExecuteBuffer fields */
IDirectDrawImpl
*
ddraw
;
IDirect3DDeviceImpl
*
d3ddev
;
...
...
dlls/ddraw/device.c
View file @
663483e1
...
...
@@ -685,7 +685,7 @@ IDirect3DDeviceImpl_1_CreateExecuteBuffer(IDirect3DDevice *iface,
return
hr
;
}
*
ExecuteBuffer
=
(
IDirect3DExecuteBuffer
*
)
object
;
*
ExecuteBuffer
=
&
object
->
IDirect3DExecuteBuffer_iface
;
TRACE
(
" Returning IDirect3DExecuteBuffer at %p, implementation is at %p
\n
"
,
*
ExecuteBuffer
,
object
);
...
...
dlls/ddraw/executebuffer.c
View file @
663483e1
...
...
@@ -547,6 +547,11 @@ end_of_buffer:
return
D3D_OK
;
}
static
inline
IDirect3DExecuteBufferImpl
*
impl_from_IDirect3DExecuteBuffer
(
IDirect3DExecuteBuffer
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DExecuteBufferImpl
,
IDirect3DExecuteBuffer_iface
);
}
/*****************************************************************************
* IDirect3DExecuteBuffer::QueryInterface
*
...
...
@@ -598,10 +603,9 @@ IDirect3DExecuteBufferImpl_QueryInterface(IDirect3DExecuteBuffer *iface,
* The new refcount
*
*****************************************************************************/
static
ULONG
WINAPI
IDirect3DExecuteBufferImpl_AddRef
(
IDirect3DExecuteBuffer
*
iface
)
static
ULONG
WINAPI
IDirect3DExecuteBufferImpl_AddRef
(
IDirect3DExecuteBuffer
*
iface
)
{
IDirect3DExecuteBufferImpl
*
This
=
(
IDirect3DExecuteBufferImpl
*
)
iface
;
IDirect3DExecuteBufferImpl
*
This
=
impl_from_IDirect3DExecuteBuffer
(
iface
)
;
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -618,10 +622,9 @@ IDirect3DExecuteBufferImpl_AddRef(IDirect3DExecuteBuffer *iface)
* The new refcount
*
*****************************************************************************/
static
ULONG
WINAPI
IDirect3DExecuteBufferImpl_Release
(
IDirect3DExecuteBuffer
*
iface
)
static
ULONG
WINAPI
IDirect3DExecuteBufferImpl_Release
(
IDirect3DExecuteBuffer
*
iface
)
{
IDirect3DExecuteBufferImpl
*
This
=
(
IDirect3DExecuteBufferImpl
*
)
iface
;
IDirect3DExecuteBufferImpl
*
This
=
impl_from_IDirect3DExecuteBuffer
(
iface
)
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
This
,
ref
);
...
...
@@ -669,11 +672,10 @@ static HRESULT WINAPI IDirect3DExecuteBufferImpl_Initialize(IDirect3DExecuteBuff
* This implementation always returns D3D_OK
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DExecuteBufferImpl_Lock
(
IDirect3DExecuteBuffer
*
iface
,
D3DEXECUTEBUFFERDESC
*
lpDesc
)
static
HRESULT
WINAPI
IDirect3DExecuteBufferImpl_Lock
(
IDirect3DExecuteBuffer
*
iface
,
D3DEXECUTEBUFFERDESC
*
lpDesc
)
{
IDirect3DExecuteBufferImpl
*
This
=
(
IDirect3DExecuteBufferImpl
*
)
iface
;
IDirect3DExecuteBufferImpl
*
This
=
impl_from_IDirect3DExecuteBuffer
(
iface
)
;
DWORD
dwSize
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
lpDesc
);
...
...
@@ -719,11 +721,10 @@ static HRESULT WINAPI IDirect3DExecuteBufferImpl_Unlock(IDirect3DExecuteBuffer *
* DDERR_OUTOFMEMORY if the vertex buffer allocation failed
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DExecuteBufferImpl_SetExecuteData
(
IDirect3DExecuteBuffer
*
iface
,
D3DEXECUTEDATA
*
lpData
)
static
HRESULT
WINAPI
IDirect3DExecuteBufferImpl_SetExecuteData
(
IDirect3DExecuteBuffer
*
iface
,
D3DEXECUTEDATA
*
lpData
)
{
IDirect3DExecuteBufferImpl
*
This
=
(
IDirect3DExecuteBufferImpl
*
)
iface
;
IDirect3DExecuteBufferImpl
*
This
=
impl_from_IDirect3DExecuteBuffer
(
iface
)
;
DWORD
nbvert
;
TRACE
(
"iface %p, data %p.
\n
"
,
iface
,
lpData
);
...
...
@@ -755,11 +756,10 @@ IDirect3DExecuteBufferImpl_SetExecuteData(IDirect3DExecuteBuffer *iface,
* D3D_OK on success
*
*****************************************************************************/
static
HRESULT
WINAPI
IDirect3DExecuteBufferImpl_GetExecuteData
(
IDirect3DExecuteBuffer
*
iface
,
D3DEXECUTEDATA
*
lpData
)
static
HRESULT
WINAPI
IDirect3DExecuteBufferImpl_GetExecuteData
(
IDirect3DExecuteBuffer
*
iface
,
D3DEXECUTEDATA
*
lpData
)
{
IDirect3DExecuteBufferImpl
*
This
=
(
IDirect3DExecuteBufferImpl
*
)
iface
;
IDirect3DExecuteBufferImpl
*
This
=
impl_from_IDirect3DExecuteBuffer
(
iface
)
;
DWORD
dwSize
;
TRACE
(
"iface %p, data %p.
\n
"
,
iface
,
lpData
);
...
...
@@ -839,7 +839,7 @@ static const struct IDirect3DExecuteBufferVtbl d3d_execute_buffer_vtbl =
HRESULT
d3d_execute_buffer_init
(
IDirect3DExecuteBufferImpl
*
execute_buffer
,
IDirect3DDeviceImpl
*
device
,
D3DEXECUTEBUFFERDESC
*
desc
)
{
execute_buffer
->
lpVtbl
=
&
d3d_execute_buffer_vtbl
;
execute_buffer
->
IDirect3DExecuteBuffer_iface
.
lpVtbl
=
&
d3d_execute_buffer_vtbl
;
execute_buffer
->
ref
=
1
;
execute_buffer
->
d3ddev
=
device
;
...
...
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