Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3cedef2f
Commit
3cedef2f
authored
Dec 04, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Simplify GetDevice().
We already store "parentDevice", so we might as well use it.
parent
1f6d2456
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
78 deletions
+48
-78
cubetexture.c
dlls/d3d8/cubetexture.c
+8
-13
indexbuffer.c
dlls/d3d8/indexbuffer.c
+8
-13
surface.c
dlls/d3d8/surface.c
+8
-13
texture.c
dlls/d3d8/texture.c
+8
-13
vertexbuffer.c
dlls/d3d8/vertexbuffer.c
+8
-13
volumetexture.c
dlls/d3d8/volumetexture.c
+8
-13
No files found.
dlls/d3d8/cubetexture.c
View file @
3cedef2f
...
...
@@ -82,23 +82,18 @@ static ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 ifa
}
/* IDirect3DCubeTexture8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DCubeTexture8Impl_GetDevice
(
LPDIRECT3DCUBETEXTURE8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
static
HRESULT
WINAPI
IDirect3DCubeTexture8Impl_GetDevice
(
IDirect3DCubeTexture8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DCubeTexture8Impl
*
This
=
(
IDirect3DCubeTexture8Impl
*
)
iface
;
IWineD3DDevice
*
wined3d_device
;
HRESULT
hr
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
ppD
evice
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
d
evice
);
wined3d_mutex_lock
();
hr
=
IWineD3DCubeTexture_GetDevice
(
This
->
wineD3DCubeTexture
,
&
wined3d_device
);
if
(
SUCCEEDED
(
hr
))
{
IWineD3DDevice_GetParent
(
wined3d_device
,
(
IUnknown
**
)
ppDevice
);
IWineD3DDevice_Release
(
wined3d_device
);
}
wined3d_mutex_unlock
();
*
device
=
(
IDirect3DDevice8
*
)
This
->
parentDevice
;
IDirect3DDevice8_AddRef
(
*
device
);
return
hr
;
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DCubeTexture8Impl_SetPrivateData
(
LPDIRECT3DCUBETEXTURE8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
...
...
dlls/d3d8/indexbuffer.c
View file @
3cedef2f
...
...
@@ -79,23 +79,18 @@ static ULONG WINAPI IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 ifa
}
/* IDirect3DIndexBuffer8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_GetDevice
(
LPDIRECT3DINDEXBUFFER8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_GetDevice
(
IDirect3DIndexBuffer8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DIndexBuffer8Impl
*
This
=
(
IDirect3DIndexBuffer8Impl
*
)
iface
;
IWineD3DDevice
*
wined3d_device
;
HRESULT
hr
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
ppD
evice
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
d
evice
);
wined3d_mutex_lock
();
hr
=
IWineD3DBuffer_GetDevice
(
This
->
wineD3DIndexBuffer
,
&
wined3d_device
);
if
(
SUCCEEDED
(
hr
))
{
IWineD3DDevice_GetParent
(
wined3d_device
,
(
IUnknown
**
)
ppDevice
);
IWineD3DDevice_Release
(
wined3d_device
);
}
wined3d_mutex_unlock
();
*
device
=
(
IDirect3DDevice8
*
)
This
->
parentDevice
;
IDirect3DDevice8_AddRef
(
*
device
);
return
hr
;
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DIndexBuffer8Impl_SetPrivateData
(
LPDIRECT3DINDEXBUFFER8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
...
...
dlls/d3d8/surface.c
View file @
3cedef2f
...
...
@@ -100,23 +100,18 @@ static ULONG WINAPI IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface) {
}
/* IDirect3DSurface8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDevice
(
LPDIRECT3DSURFACE8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDevice
(
IDirect3DSurface8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
IWineD3DDevice
*
wined3d_device
;
HRESULT
hr
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
ppD
evice
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
d
evice
);
wined3d_mutex_lock
();
hr
=
IWineD3DSurface_GetDevice
(
This
->
wineD3DSurface
,
&
wined3d_device
);
if
(
SUCCEEDED
(
hr
))
{
IWineD3DDevice_GetParent
(
wined3d_device
,
(
IUnknown
**
)
ppDevice
);
IWineD3DDevice_Release
(
wined3d_device
);
}
wined3d_mutex_unlock
();
*
device
=
(
IDirect3DDevice8
*
)
This
->
parentDevice
;
IDirect3DDevice8_AddRef
(
*
device
);
return
hr
;
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DSurface8Impl_SetPrivateData
(
LPDIRECT3DSURFACE8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
...
...
dlls/d3d8/texture.c
View file @
3cedef2f
...
...
@@ -80,23 +80,18 @@ static ULONG WINAPI IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface) {
}
/* IDirect3DTexture8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DTexture8Impl_GetDevice
(
LPDIRECT3DTEXTURE8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
static
HRESULT
WINAPI
IDirect3DTexture8Impl_GetDevice
(
IDirect3DTexture8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DTexture8Impl
*
This
=
(
IDirect3DTexture8Impl
*
)
iface
;
IWineD3DDevice
*
wined3d_device
;
HRESULT
hr
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
ppD
evice
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
d
evice
);
wined3d_mutex_lock
();
hr
=
IWineD3DTexture_GetDevice
(
This
->
wineD3DTexture
,
&
wined3d_device
);
if
(
SUCCEEDED
(
hr
))
{
IWineD3DDevice_GetParent
(
wined3d_device
,
(
IUnknown
**
)
ppDevice
);
IWineD3DDevice_Release
(
wined3d_device
);
}
wined3d_mutex_unlock
();
*
device
=
(
IDirect3DDevice8
*
)
This
->
parentDevice
;
IDirect3DDevice8_AddRef
(
*
device
);
return
hr
;
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DTexture8Impl_SetPrivateData
(
LPDIRECT3DTEXTURE8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
...
...
dlls/d3d8/vertexbuffer.c
View file @
3cedef2f
...
...
@@ -81,23 +81,18 @@ static ULONG WINAPI IDirect3DVertexBuffer8Impl_Release(LPDIRECT3DVERTEXBUFFER8 i
}
/* IDirect3DVertexBuffer8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DVertexBuffer8Impl_GetDevice
(
LPDIRECT3DVERTEXBUFFER8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
static
HRESULT
WINAPI
IDirect3DVertexBuffer8Impl_GetDevice
(
IDirect3DVertexBuffer8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DVertexBuffer8Impl
*
This
=
(
IDirect3DVertexBuffer8Impl
*
)
iface
;
IWineD3DDevice
*
wined3d_device
;
HRESULT
hr
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
ppD
evice
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
d
evice
);
wined3d_mutex_lock
();
hr
=
IWineD3DBuffer_GetDevice
(
This
->
wineD3DVertexBuffer
,
&
wined3d_device
);
if
(
SUCCEEDED
(
hr
))
{
IWineD3DDevice_GetParent
(
wined3d_device
,
(
IUnknown
**
)
ppDevice
);
IWineD3DDevice_Release
(
wined3d_device
);
}
wined3d_mutex_unlock
();
*
device
=
(
IDirect3DDevice8
*
)
This
->
parentDevice
;
IDirect3DDevice8_AddRef
(
*
device
);
return
hr
;
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DVertexBuffer8Impl_SetPrivateData
(
LPDIRECT3DVERTEXBUFFER8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
...
...
dlls/d3d8/volumetexture.c
View file @
3cedef2f
...
...
@@ -80,23 +80,18 @@ static ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8
}
/* IDirect3DVolumeTexture8 IDirect3DResource8 Interface follow: */
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_GetDevice
(
LPDIRECT3DVOLUMETEXTURE8
iface
,
IDirect3DDevice8
**
ppDevice
)
{
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_GetDevice
(
IDirect3DVolumeTexture8
*
iface
,
IDirect3DDevice8
**
device
)
{
IDirect3DVolumeTexture8Impl
*
This
=
(
IDirect3DVolumeTexture8Impl
*
)
iface
;
IWineD3DDevice
*
wined3d_device
;
HRESULT
hr
;
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
ppD
evice
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
d
evice
);
wined3d_mutex_lock
();
hr
=
IWineD3DVolumeTexture_GetDevice
(
This
->
wineD3DVolumeTexture
,
&
wined3d_device
);
if
(
SUCCEEDED
(
hr
))
{
IWineD3DDevice_GetParent
(
wined3d_device
,
(
IUnknown
**
)
ppDevice
);
IWineD3DDevice_Release
(
wined3d_device
);
}
wined3d_mutex_unlock
();
*
device
=
(
IDirect3DDevice8
*
)
This
->
parentDevice
;
IDirect3DDevice8_AddRef
(
*
device
);
return
hr
;
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DVolumeTexture8Impl_SetPrivateData
(
LPDIRECT3DVOLUMETEXTURE8
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
)
{
...
...
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