Commit b6ef17f2 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove unused GetDevice() implementations.

parent c2cf1935
......@@ -657,11 +657,6 @@ static HRESULT STDMETHODCALLTYPE buffer_GetParent(IWineD3DBuffer *iface, IUnknow
/* IWineD3DResource methods */
static HRESULT STDMETHODCALLTYPE buffer_GetDevice(IWineD3DBuffer *iface, IWineD3DDevice **device)
{
return resource_get_device((IWineD3DResource *)iface, device);
}
static HRESULT STDMETHODCALLTYPE buffer_SetPrivateData(IWineD3DBuffer *iface,
REFGUID guid, const void *data, DWORD data_size, DWORD flags)
{
......@@ -1064,7 +1059,6 @@ static const struct IWineD3DBufferVtbl wined3d_buffer_vtbl =
/* IWineD3DBase methods */
buffer_GetParent,
/* IWineD3DResource methods */
buffer_GetDevice,
buffer_SetPrivateData,
buffer_GetPrivateData,
buffer_FreePrivateData,
......
......@@ -183,10 +183,6 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface)
/* ****************************************************
IWineD3DCubeTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetDevice(IWineD3DCubeTexture *iface, IWineD3DDevice** ppDevice) {
return resource_get_device((IWineD3DResource *)iface, ppDevice);
}
static HRESULT WINAPI IWineD3DCubeTextureImpl_SetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
}
......@@ -404,7 +400,6 @@ static const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
IWineD3DCubeTextureImpl_Release,
/* IWineD3DResource */
IWineD3DCubeTextureImpl_GetParent,
IWineD3DCubeTextureImpl_GetDevice,
IWineD3DCubeTextureImpl_SetPrivateData,
IWineD3DCubeTextureImpl_GetPrivateData,
IWineD3DCubeTextureImpl_FreePrivateData,
......
......@@ -90,15 +90,6 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_GetParent(IWineD3DPixelShader *if
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DPixelShaderImpl_GetDevice(IWineD3DPixelShader* iface, IWineD3DDevice **pDevice){
IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)iface;
IWineD3DDevice_AddRef(This->baseShader.device);
*pDevice = This->baseShader.device;
TRACE("(%p) returning %p\n", This, *pDevice);
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader* impl, VOID* pData, UINT* pSizeOfData) {
IWineD3DPixelShaderImpl *This = (IWineD3DPixelShaderImpl *)impl;
TRACE("(%p) : pData(%p), pSizeOfData(%p)\n", This, pData, pSizeOfData);
......@@ -353,7 +344,6 @@ static const IWineD3DPixelShaderVtbl IWineD3DPixelShader_Vtbl =
/*** IWineD3DBase methods ***/
IWineD3DPixelShaderImpl_GetParent,
/*** IWineD3DBaseShader methods ***/
IWineD3DPixelShaderImpl_GetDevice,
IWineD3DPixelShaderImpl_GetFunction
/*** IWineD3DPixelShader methods ***/
};
......
......@@ -98,15 +98,6 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetParent(IWineD3DQuery *iface, IUnknow
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DQueryImpl_GetDevice(IWineD3DQuery* iface, IWineD3DDevice **pDevice){
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
IWineD3DDevice_AddRef((IWineD3DDevice *)This->wineD3DDevice);
*pDevice = (IWineD3DDevice *)This->wineD3DDevice;
TRACE("(%p) returning %p\n", This, *pDevice);
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags){
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
HRESULT res = S_OK;
......@@ -640,7 +631,6 @@ const IWineD3DQueryVtbl IWineD3DQuery_Vtbl =
IWineD3DQueryImpl_Release,
/*** IWineD3Dquery methods ***/
IWineD3DQueryImpl_GetParent,
IWineD3DQueryImpl_GetDevice,
IWineD3DQueryImpl_GetData,
IWineD3DQueryImpl_GetDataSize,
IWineD3DQueryImpl_GetType,
......@@ -655,7 +645,6 @@ const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl =
IWineD3DQueryImpl_Release,
/*** IWineD3Dquery methods ***/
IWineD3DQueryImpl_GetParent,
IWineD3DQueryImpl_GetDevice,
IWineD3DEventQueryImpl_GetData,
IWineD3DEventQueryImpl_GetDataSize,
IWineD3DQueryImpl_GetType,
......@@ -670,7 +659,6 @@ const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl =
IWineD3DQueryImpl_Release,
/*** IWineD3Dquery methods ***/
IWineD3DQueryImpl_GetParent,
IWineD3DQueryImpl_GetDevice,
IWineD3DOcclusionQueryImpl_GetData,
IWineD3DOcclusionQueryImpl_GetDataSize,
IWineD3DQueryImpl_GetType,
......
......@@ -105,15 +105,6 @@ void resource_cleanup(IWineD3DResource *iface)
if (This->resource.wineD3DDevice) device_resource_released(This->resource.wineD3DDevice, iface);
}
HRESULT resource_get_device(IWineD3DResource *iface, IWineD3DDevice** ppDevice)
{
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
TRACE("(%p) : returning %p\n", This, This->resource.wineD3DDevice);
*ppDevice = (IWineD3DDevice *) This->resource.wineD3DDevice;
IWineD3DDevice_AddRef(*ppDevice);
return WINED3D_OK;
}
static PrivateData* resource_find_private_data(IWineD3DResourceImpl *This, REFGUID tag)
{
PrivateData *data;
......
......@@ -535,16 +535,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
/**********************************************************
* IWineD3DStateBlockImpl parts follows
**********************************************************/
static HRESULT WINAPI IWineD3DStateBlockImpl_GetDevice(IWineD3DStateBlock *iface, IWineD3DDevice** ppDevice){
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
*ppDevice = (IWineD3DDevice*)This->wineD3DDevice;
IWineD3DDevice_AddRef(*ppDevice);
return WINED3D_OK;
}
static void record_lights(IWineD3DStateBlockImpl *This, const IWineD3DStateBlockImpl *targetStateBlock)
{
UINT i;
......@@ -1321,7 +1311,6 @@ static const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl =
IWineD3DStateBlockImpl_AddRef,
IWineD3DStateBlockImpl_Release,
/* IWineD3DStateBlock */
IWineD3DStateBlockImpl_GetDevice,
IWineD3DStateBlockImpl_Capture,
IWineD3DStateBlockImpl_Apply,
IWineD3DStateBlockImpl_InitStartupStateBlock
......
......@@ -5154,7 +5154,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DSurfaceImpl_Release,
/* IWineD3DResource */
IWineD3DBaseSurfaceImpl_GetParent,
IWineD3DBaseSurfaceImpl_GetDevice,
IWineD3DBaseSurfaceImpl_SetPrivateData,
IWineD3DBaseSurfaceImpl_GetPrivateData,
IWineD3DBaseSurfaceImpl_FreePrivateData,
......
......@@ -117,10 +117,6 @@ ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) {
/* ****************************************************
IWineD3DSurface IWineD3DResource parts follow
**************************************************** */
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDevice(IWineD3DSurface *iface, IWineD3DDevice** ppDevice) {
return resource_get_device((IWineD3DResource *)iface, ppDevice);
}
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
}
......
......@@ -646,7 +646,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineGDISurfaceImpl_Release,
/* IWineD3DResource */
IWineD3DBaseSurfaceImpl_GetParent,
IWineD3DBaseSurfaceImpl_GetDevice,
IWineD3DBaseSurfaceImpl_SetPrivateData,
IWineD3DBaseSurfaceImpl_GetPrivateData,
IWineD3DBaseSurfaceImpl_FreePrivateData,
......
......@@ -171,10 +171,6 @@ static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DTexture *iface) {
/* ****************************************************
IWineD3DTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DTextureImpl_GetDevice(IWineD3DTexture *iface, IWineD3DDevice** ppDevice) {
return resource_get_device((IWineD3DResource *)iface, ppDevice);
}
static HRESULT WINAPI IWineD3DTextureImpl_SetPrivateData(IWineD3DTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
}
......@@ -405,7 +401,6 @@ static const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
IWineD3DTextureImpl_Release,
/* IWineD3DResource */
IWineD3DTextureImpl_GetParent,
IWineD3DTextureImpl_GetDevice,
IWineD3DTextureImpl_SetPrivateData,
IWineD3DTextureImpl_GetPrivateData,
IWineD3DTextureImpl_FreePrivateData,
......
......@@ -88,16 +88,6 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetParent(IWineD3DVertexDecl
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DVertexDeclarationImpl_GetDevice(IWineD3DVertexDeclaration *iface, IWineD3DDevice** ppDevice) {
IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
TRACE("(%p) : returning %p\n", This, This->wineD3DDevice);
*ppDevice = (IWineD3DDevice *) This->wineD3DDevice;
IWineD3DDevice_AddRef(*ppDevice);
return WINED3D_OK;
}
static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element)
{
switch(element->usage)
......@@ -194,7 +184,6 @@ static const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl =
IWineD3DVertexDeclarationImpl_Release,
/* IWineD3DVertexDeclaration */
IWineD3DVertexDeclarationImpl_GetParent,
IWineD3DVertexDeclarationImpl_GetDevice,
};
HRESULT vertexdeclaration_init(IWineD3DVertexDeclarationImpl *declaration, IWineD3DDeviceImpl *device,
......
......@@ -194,14 +194,6 @@ static HRESULT WINAPI IWineD3DVertexShaderImpl_GetParent(IWineD3DVertexShader *i
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DVertexShaderImpl_GetDevice(IWineD3DVertexShader* iface, IWineD3DDevice **pDevice){
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
IWineD3DDevice_AddRef(This->baseShader.device);
*pDevice = This->baseShader.device;
TRACE("(%p) returning %p\n", This, *pDevice);
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DVertexShaderImpl_GetFunction(IWineD3DVertexShader* impl, VOID* pData, UINT* pSizeOfData) {
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)impl;
TRACE("(%p) : pData(%p), pSizeOfData(%p)\n", This, pData, pSizeOfData);
......@@ -348,7 +340,6 @@ static const IWineD3DVertexShaderVtbl IWineD3DVertexShader_Vtbl =
/*** IWineD3DBase methods ***/
IWineD3DVertexShaderImpl_GetParent,
/*** IWineD3DBaseShader methods ***/
IWineD3DVertexShaderImpl_GetDevice,
IWineD3DVertexShaderImpl_GetFunction,
/*** IWineD3DVertexShader methods ***/
IWIneD3DVertexShaderImpl_SetLocalConstantsF
......
......@@ -138,10 +138,6 @@ static HRESULT WINAPI IWineD3DVolumeImpl_GetParent(IWineD3DVolume *iface, IUnkno
return resource_get_parent((IWineD3DResource *)iface, pParent);
}
static HRESULT WINAPI IWineD3DVolumeImpl_GetDevice(IWineD3DVolume *iface, IWineD3DDevice** ppDevice) {
return resource_get_device((IWineD3DResource *)iface, ppDevice);
}
static HRESULT WINAPI IWineD3DVolumeImpl_SetPrivateData(IWineD3DVolume *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
}
......@@ -361,7 +357,6 @@ static const IWineD3DVolumeVtbl IWineD3DVolume_Vtbl =
IWineD3DVolumeImpl_Release,
/* IWineD3DResource */
IWineD3DVolumeImpl_GetParent,
IWineD3DVolumeImpl_GetDevice,
IWineD3DVolumeImpl_SetPrivateData,
IWineD3DVolumeImpl_GetPrivateData,
IWineD3DVolumeImpl_FreePrivateData,
......
......@@ -139,10 +139,6 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *ifa
/* ****************************************************
IWineD3DVolumeTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetDevice(IWineD3DVolumeTexture *iface, IWineD3DDevice** ppDevice) {
return resource_get_device((IWineD3DResource *)iface, ppDevice);
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
}
......@@ -322,7 +318,6 @@ static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
IWineD3DVolumeTextureImpl_Release,
/* resource */
IWineD3DVolumeTextureImpl_GetParent,
IWineD3DVolumeTextureImpl_GetDevice,
IWineD3DVolumeTextureImpl_SetPrivateData,
IWineD3DVolumeTextureImpl_GetPrivateData,
IWineD3DVolumeTextureImpl_FreePrivateData,
......
......@@ -1653,7 +1653,6 @@ typedef struct IWineD3DResourceImpl
void resource_cleanup(IWineD3DResource *iface) DECLSPEC_HIDDEN;
HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid) DECLSPEC_HIDDEN;
HRESULT resource_get_device(IWineD3DResource *iface, IWineD3DDevice **device) DECLSPEC_HIDDEN;
HRESULT resource_get_parent(IWineD3DResource *iface, IUnknown **parent) DECLSPEC_HIDDEN;
DWORD resource_get_priority(IWineD3DResource *iface) DECLSPEC_HIDDEN;
HRESULT resource_get_private_data(IWineD3DResource *iface, REFGUID guid,
......@@ -1974,7 +1973,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface,
REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN;
ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface, IUnknown **pParent) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDevice(IWineD3DSurface *iface, IWineD3DDevice** ppDevice) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface,
REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface,
......
......@@ -2327,9 +2327,6 @@ interface IWineD3D : IWineD3DBase
]
interface IWineD3DResource : IWineD3DBase
{
HRESULT GetDevice(
[out] IWineD3DDevice **device
);
HRESULT SetPrivateData(
[in] REFGUID guid,
[in] const void *data,
......@@ -2715,9 +2712,6 @@ interface IWineD3DVolumeTexture : IWineD3DBaseTexture
]
interface IWineD3DVertexDeclaration : IWineD3DBase
{
HRESULT GetDevice(
[out] IWineD3DDevice **device
);
}
[
......@@ -2727,9 +2721,6 @@ interface IWineD3DVertexDeclaration : IWineD3DBase
]
interface IWineD3DStateBlock : IUnknown
{
HRESULT GetDevice(
[out] IWineD3DDevice **device
);
HRESULT Capture(
);
HRESULT Apply(
......@@ -2745,9 +2736,6 @@ interface IWineD3DStateBlock : IUnknown
]
interface IWineD3DQuery : IWineD3DBase
{
HRESULT GetDevice(
[out] IWineD3DDevice **device
);
HRESULT GetData(
[out] void *data,
[in] DWORD data_size,
......@@ -2837,9 +2825,6 @@ interface IWineD3DBuffer : IWineD3DResource
]
interface IWineD3DBaseShader : IWineD3DBase
{
HRESULT GetDevice(
[out] IWineD3DDevice **device
);
HRESULT GetFunction(
[out] void *data,
[in, out] UINT *data_size
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment