Module: wine Branch: master Commit: d6d345fa8aee8f394e20ea2f9bbcd3645b999992 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6d345fa8aee8f394e20ea2f9b...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Sep 28 12:00:21 2010 +0200
wined3d: Remove IWineD3DStateBlock::InitStartupStateBlock() from the public wined3d interface.
---
dlls/wined3d/device.c | 7 ++----- dlls/wined3d/stateblock.c | 8 ++------ dlls/wined3d/wined3d_private.h | 1 + include/wine/wined3d.idl | 2 -- 4 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 89ddb85..0967bd8 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1888,7 +1888,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, /* Set up some starting GL setup */
/* Setup all the devices defaults */ - IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *)This->stateBlock); + stateblock_init_default_state(This->stateBlock);
context = context_acquire(This, swapchain->front_buffer);
@@ -6469,10 +6469,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice *iface, This->updateStateBlock = This->stateBlock; IWineD3DStateBlock_AddRef((IWineD3DStateBlock *)This->updateStateBlock);
- hr = IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *) This->stateBlock); - if(FAILED(hr)) { - ERR("Resetting the stateblock failed with error 0x%08x\n", hr); - } + stateblock_init_default_state(This->stateBlock);
if(wined3d_settings.offscreen_rendering_mode == ORM_FBO) { diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index f8eb931..5b58de9 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1078,9 +1078,8 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface) return WINED3D_OK; }
-static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStateBlock *iface) +void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) { - IWineD3DStateBlockImpl *stateblock = (IWineD3DStateBlockImpl *)iface; IWineD3DDeviceImpl *device = stateblock->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct wined3d_state *state = &stateblock->state; @@ -1097,7 +1096,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DState IWineD3DSurface *backbuffer; HRESULT hr;
- TRACE("iface %p.\n", iface); + TRACE("stateblock %p.\n", stateblock);
stateblock->blockType = WINED3DSBT_INIT;
@@ -1328,8 +1327,6 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DState }
TRACE("Done.\n"); - - return WINED3D_OK; }
/********************************************************** @@ -1345,7 +1342,6 @@ static const IWineD3DStateBlockVtbl IWineD3DStateBlock_Vtbl = /* IWineD3DStateBlock */ IWineD3DStateBlockImpl_Capture, IWineD3DStateBlockImpl_Apply, - IWineD3DStateBlockImpl_InitStartupStateBlock };
HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 61cd60d..663a9d4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2429,6 +2429,7 @@ struct IWineD3DStateBlockImpl HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *device, WINED3DSTATEBLOCKTYPE type) DECLSPEC_HIDDEN; void stateblock_init_contained_states(IWineD3DStateBlockImpl *object) DECLSPEC_HIDDEN; +void stateblock_init_default_state(IWineD3DStateBlockImpl *stateblock) DECLSPEC_HIDDEN;
static inline void stateblock_apply_state(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context) diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index fcc6a89..548a08a 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -2647,8 +2647,6 @@ interface IWineD3DStateBlock : IUnknown ); HRESULT Apply( ); - HRESULT InitStartupStateBlock( - ); }
[