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

wined3d: The stateblock doesn't really need a parent.

parent ff92e6eb
......@@ -605,7 +605,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice *iface,
return E_OUTOFMEMORY;
}
hr = stateblock_init(object, This, type, parent);
hr = stateblock_init(object, This, type);
if (FAILED(hr))
{
WARN("Failed to initialize stateblock, hr %#x.\n", hr);
......
......@@ -535,13 +535,6 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
/**********************************************************
* IWineD3DStateBlockImpl parts follows
**********************************************************/
static HRESULT WINAPI IWineD3DStateBlockImpl_GetParent(IWineD3DStateBlock *iface, IUnknown **pParent) {
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
IUnknown_AddRef(This->parent);
*pParent = This->parent;
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DStateBlockImpl_GetDevice(IWineD3DStateBlock *iface, IWineD3DDevice** ppDevice){
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
......@@ -1328,22 +1321,19 @@ static const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl =
IWineD3DStateBlockImpl_AddRef,
IWineD3DStateBlockImpl_Release,
/* IWineD3DStateBlock */
IWineD3DStateBlockImpl_GetParent,
IWineD3DStateBlockImpl_GetDevice,
IWineD3DStateBlockImpl_Capture,
IWineD3DStateBlockImpl_Apply,
IWineD3DStateBlockImpl_InitStartupStateBlock
};
HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device,
WINED3DSTATEBLOCKTYPE type, IUnknown *parent)
HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type)
{
unsigned int i;
HRESULT hr;
stateblock->lpVtbl = &IWineD3DStateBlock_Vtbl;
stateblock->ref = 1;
stateblock->parent = parent;
stateblock->wineD3DDevice = device;
stateblock->blockType = type;
......
......@@ -2194,7 +2194,6 @@ struct IWineD3DStateBlockImpl
LONG ref; /* Note: Ref counting not required */
/* IWineD3DStateBlock information */
IUnknown *parent;
IWineD3DDeviceImpl *wineD3DDevice;
WINED3DSTATEBLOCKTYPE blockType;
......@@ -2293,8 +2292,8 @@ struct IWineD3DStateBlockImpl
unsigned int num_contained_sampler_states;
};
HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device,
WINED3DSTATEBLOCKTYPE type, IUnknown *parent) DECLSPEC_HIDDEN;
HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock,
IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) DECLSPEC_HIDDEN;
void stateblock_init_contained_states(IWineD3DStateBlockImpl *object) DECLSPEC_HIDDEN;
/* Direct3D terminology with little modifications. We do not have an issued state
......
......@@ -2724,7 +2724,7 @@ interface IWineD3DVertexDeclaration : IWineD3DBase
local,
uuid(83b073ce-6f30-11d9-c687-00046142c14f)
]
interface IWineD3DStateBlock : IWineD3DBase
interface IWineD3DStateBlock : IUnknown
{
HRESULT GetDevice(
[out] IWineD3DDevice **device
......
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