From b6ef17f23d6d24691e439f5bb8b1b1342b3bbcc7 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 9 Dec 2009 11:51:18 +0100 Subject: [PATCH] wined3d: Remove unused GetDevice() implementations. --- dlls/wined3d/buffer.c | 6 ------ dlls/wined3d/cubetexture.c | 5 ----- dlls/wined3d/pixelshader.c | 10 ---------- dlls/wined3d/query.c | 12 ------------ dlls/wined3d/resource.c | 9 --------- dlls/wined3d/stateblock.c | 11 ----------- dlls/wined3d/surface.c | 1 - dlls/wined3d/surface_base.c | 4 ---- dlls/wined3d/surface_gdi.c | 1 - dlls/wined3d/texture.c | 5 ----- dlls/wined3d/vertexdeclaration.c | 11 ----------- dlls/wined3d/vertexshader.c | 9 --------- dlls/wined3d/volume.c | 5 ----- dlls/wined3d/volumetexture.c | 5 ----- dlls/wined3d/wined3d_private.h | 2 -- include/wine/wined3d.idl | 15 --------------- 16 files changed, 111 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 24b58a5a2bd..fa79340e69b 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -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, diff --git a/dlls/wined3d/cubetexture.c b/dlls/wined3d/cubetexture.c index f22845bb47c..8d257aaab65 100644 --- a/dlls/wined3d/cubetexture.c +++ b/dlls/wined3d/cubetexture.c @@ -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, diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index d15649812b4..a531f093bb6 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -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 ***/ }; diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 76f519dd04f..ff4021d39c8 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -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, diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index ea61c597103..629d59e3d45 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -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; diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index b3cae5454c6..8abe70ecd72 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -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 diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index ed4e9aa3409..141eaafbb07 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -5154,7 +5154,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = IWineD3DSurfaceImpl_Release, /* IWineD3DResource */ IWineD3DBaseSurfaceImpl_GetParent, - IWineD3DBaseSurfaceImpl_GetDevice, IWineD3DBaseSurfaceImpl_SetPrivateData, IWineD3DBaseSurfaceImpl_GetPrivateData, IWineD3DBaseSurfaceImpl_FreePrivateData, diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index ca715f50eab..98fe3720f7e 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -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); } diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 7867008d6c1..350be43313c 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -646,7 +646,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = IWineGDISurfaceImpl_Release, /* IWineD3DResource */ IWineD3DBaseSurfaceImpl_GetParent, - IWineD3DBaseSurfaceImpl_GetDevice, IWineD3DBaseSurfaceImpl_SetPrivateData, IWineD3DBaseSurfaceImpl_GetPrivateData, IWineD3DBaseSurfaceImpl_FreePrivateData, diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index b568005e842..ffc27e2fdfe 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -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, diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index 88b3f273eec..58df345398e 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -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, diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index 63d8c9b9790..f08fd06f86f 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -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 diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 5a80cb6fd52..bb6c67678c1 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -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, diff --git a/dlls/wined3d/volumetexture.c b/dlls/wined3d/volumetexture.c index 4cea3a01638..26aacad39f9 100644 --- a/dlls/wined3d/volumetexture.c +++ b/dlls/wined3d/volumetexture.c @@ -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, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 34f9f33a8ba..b5e61b66df2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -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, diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index 8bcc2a82738..27267c2913d 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -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