winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
809 discussions
Start a n
N
ew thread
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10BlendState iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: a4a4a420f8fd66b96b2447e1d3203c224174f323 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4a4a420f8fd66b96b2447e1d…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 11:02:35 2011 +0200 d3d10core: COM cleanup for the ID3D10BlendState iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/state.c | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 12af282..d3be62b 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -209,7 +209,7 @@ void shader_free_signature(struct wined3d_shader_signature *s) DECLSPEC_HIDDEN; /* ID3D10BlendState */ struct d3d10_blend_state { - const struct ID3D10BlendStateVtbl *vtbl; + ID3D10BlendState ID3D10BlendState_iface; LONG refcount; }; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 59a3b60..bec59ce 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -968,7 +968,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device *ifa } TRACE("Created blend state %p.\n", object); - *blend_state = (ID3D10BlendState *)object; + *blend_state = &object->ID3D10BlendState_iface; return S_OK; } diff --git a/dlls/d3d10core/state.c b/dlls/d3d10core/state.c index 2eaa652..5051f11 100644 --- a/dlls/d3d10core/state.c +++ b/dlls/d3d10core/state.c @@ -24,6 +24,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10core); +static inline struct d3d10_blend_state *impl_from_ID3D10BlendState(ID3D10BlendState *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_blend_state, ID3D10BlendState_iface); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface(ID3D10BlendState *iface, @@ -48,7 +53,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface(ID3D10BlendSta static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState *iface) { - struct d3d10_blend_state *This = (struct d3d10_blend_state *)iface; + struct d3d10_blend_state *This = impl_from_ID3D10BlendState(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u.\n", This, refcount); @@ -58,7 +63,7 @@ static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState *iface) static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release(ID3D10BlendState *iface) { - struct d3d10_blend_state *This = (struct d3d10_blend_state *)iface; + struct d3d10_blend_state *This = impl_from_ID3D10BlendState(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u.\n", This, refcount); @@ -129,7 +134,7 @@ static const struct ID3D10BlendStateVtbl d3d10_blend_state_vtbl = HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state) { - state->vtbl = &d3d10_blend_state_vtbl; + state->ID3D10BlendState_iface.lpVtbl = &d3d10_blend_state_vtbl; state->refcount = 1; return S_OK;
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10GeometryShader iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: 2b1001907f25b1462368803106e3b03d15588862 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b1001907f25b146236880310…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 10:59:33 2011 +0200 d3d10core: COM cleanup for the ID3D10GeometryShader iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/shader.c | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 0640556..12af282 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -180,7 +180,7 @@ HRESULT d3d10_vertex_shader_init(struct d3d10_vertex_shader *shader, struct d3d1 /* ID3D10GeometryShader */ struct d3d10_geometry_shader { - const struct ID3D10GeometryShaderVtbl *vtbl; + ID3D10GeometryShader ID3D10GeometryShader_iface; LONG refcount; struct wined3d_shader *wined3d_shader; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index bc8d31f..59a3b60 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -896,7 +896,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShader(ID3D10Device } TRACE("Created geometry shader %p.\n", object); - *shader = (ID3D10GeometryShader *)object; + *shader = &object->ID3D10GeometryShader_iface; return S_OK; } diff --git a/dlls/d3d10core/shader.c b/dlls/d3d10core/shader.c index eec420c..a7a40d5 100644 --- a/dlls/d3d10core/shader.c +++ b/dlls/d3d10core/shader.c @@ -267,6 +267,11 @@ HRESULT d3d10_vertex_shader_init(struct d3d10_vertex_shader *shader, struct d3d1 return S_OK; } +static inline struct d3d10_geometry_shader *impl_from_ID3D10GeometryShader(ID3D10GeometryShader *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_geometry_shader, ID3D10GeometryShader_iface); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_QueryInterface(ID3D10GeometryShader *iface, @@ -291,7 +296,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_QueryInterface(ID3D10Geom static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_AddRef(ID3D10GeometryShader *iface) { - struct d3d10_geometry_shader *This = (struct d3d10_geometry_shader *)iface; + struct d3d10_geometry_shader *This = impl_from_ID3D10GeometryShader(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u\n", This, refcount); @@ -301,7 +306,7 @@ static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_AddRef(ID3D10GeometryShader static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_Release(ID3D10GeometryShader *iface) { - struct d3d10_geometry_shader *This = (struct d3d10_geometry_shader *)iface; + struct d3d10_geometry_shader *This = impl_from_ID3D10GeometryShader(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u\n", This, refcount); @@ -376,7 +381,7 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct struct d3d10_shader_info shader_info; HRESULT hr; - shader->vtbl = &d3d10_geometry_shader_vtbl; + shader->ID3D10GeometryShader_iface.lpVtbl = &d3d10_geometry_shader_vtbl; shader->refcount = 1; shader_info.output_signature = &shader->output_signature;
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10ShaderResourceView iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: 36de21b3a1ed854bc2d9929c4b9eebaffb2bf0ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=36de21b3a1ed854bc2d9929c4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 10:46:00 2011 +0200 d3d10core: COM cleanup for the ID3D10ShaderResourceView iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/view.c | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index ba6103e..0640556 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -145,7 +145,7 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, /* ID3D10ShaderResourceView */ struct d3d10_shader_resource_view { - const struct ID3D10ShaderResourceViewVtbl *vtbl; + ID3D10ShaderResourceView ID3D10ShaderResourceView_iface; LONG refcount; }; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 42dcfd3..bc8d31f 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -742,7 +742,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Dev } TRACE("Created shader resource view %p.\n", object); - *view = (ID3D10ShaderResourceView *)object; + *view = &object->ID3D10ShaderResourceView_iface; return S_OK; } diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index 282bc24..fb289a6 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -468,6 +468,11 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view, return S_OK; } +static inline struct d3d10_shader_resource_view *impl_from_ID3D10ShaderResourceView(ID3D10ShaderResourceView *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_shader_resource_view, ID3D10ShaderResourceView_iface); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_QueryInterface(ID3D10ShaderResourceView *iface, @@ -493,7 +498,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_QueryInterface(ID3D1 static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_AddRef(ID3D10ShaderResourceView *iface) { - struct d3d10_shader_resource_view *This = (struct d3d10_shader_resource_view *)iface; + struct d3d10_shader_resource_view *This = impl_from_ID3D10ShaderResourceView(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u.\n", This, refcount); @@ -503,7 +508,7 @@ static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_AddRef(ID3D10ShaderRes static ULONG STDMETHODCALLTYPE d3d10_shader_resource_view_Release(ID3D10ShaderResourceView *iface) { - struct d3d10_shader_resource_view *This = (struct d3d10_shader_resource_view *)iface; + struct d3d10_shader_resource_view *This = impl_from_ID3D10ShaderResourceView(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u.\n", This, refcount); @@ -585,7 +590,7 @@ static const struct ID3D10ShaderResourceViewVtbl d3d10_shader_resource_view_vtbl HRESULT d3d10_shader_resource_view_init(struct d3d10_shader_resource_view *view) { - view->vtbl = &d3d10_shader_resource_view_vtbl; + view->ID3D10ShaderResourceView_iface.lpVtbl = &d3d10_shader_resource_view_vtbl; view->refcount = 1; return S_OK;
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10DepthStencilView iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: 7aff686ea11945bfde7ff67963cd95949bef0030 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7aff686ea11945bfde7ff6796…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 10:37:49 2011 +0200 d3d10core: COM cleanup for the ID3D10DepthStencilView iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/view.c | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index c6f13b1..ba6103e 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -123,7 +123,7 @@ HRESULT d3d10_buffer_init(struct d3d10_buffer *buffer, struct d3d10_device *devi /* ID3D10DepthStencilView */ struct d3d10_depthstencil_view { - const struct ID3D10DepthStencilViewVtbl *vtbl; + ID3D10DepthStencilView ID3D10DepthStencilView_iface; LONG refcount; }; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index f1ba7de..42dcfd3 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -800,7 +800,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Devic } TRACE("Created depthstencil view %p.\n", object); - *view = (ID3D10DepthStencilView *)object; + *view = &object->ID3D10DepthStencilView_iface; return S_OK; } diff --git a/dlls/d3d10core/view.c b/dlls/d3d10core/view.c index d469ae5..282bc24 100644 --- a/dlls/d3d10core/view.c +++ b/dlls/d3d10core/view.c @@ -164,6 +164,11 @@ static HRESULT set_rtdesc_from_resource(D3D10_RENDER_TARGET_VIEW_DESC *desc, ID3 } } +static inline struct d3d10_depthstencil_view *impl_from_ID3D10DepthStencilView(ID3D10DepthStencilView *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_depthstencil_view, ID3D10DepthStencilView_iface); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_QueryInterface(ID3D10DepthStencilView *iface, @@ -189,7 +194,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_QueryInterface(ID3D10De static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_AddRef(ID3D10DepthStencilView *iface) { - struct d3d10_depthstencil_view *This = (struct d3d10_depthstencil_view *)iface; + struct d3d10_depthstencil_view *This = impl_from_ID3D10DepthStencilView(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u.\n", This, refcount); @@ -199,7 +204,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_AddRef(ID3D10DepthStencil static ULONG STDMETHODCALLTYPE d3d10_depthstencil_view_Release(ID3D10DepthStencilView *iface) { - struct d3d10_depthstencil_view *This = (struct d3d10_depthstencil_view *)iface; + struct d3d10_depthstencil_view *This = impl_from_ID3D10DepthStencilView(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u.\n", This, refcount); @@ -280,7 +285,7 @@ static const struct ID3D10DepthStencilViewVtbl d3d10_depthstencil_view_vtbl = HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) { - view->vtbl = &d3d10_depthstencil_view_vtbl; + view->ID3D10DepthStencilView_iface.lpVtbl = &d3d10_depthstencil_view_vtbl; view->refcount = 1; return S_OK;
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10Texture3D iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: a8712d5522676116b16a1908974ec1a36b9ce6fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8712d5522676116b16a19089…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 10:16:55 2011 +0200 d3d10core: COM cleanup for the ID3D10Texture3D iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 2 +- dlls/d3d10core/texture.c | 17 +++++++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 0ddf7f3..c6f13b1 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -98,7 +98,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic /* ID3D10Texture3D */ struct d3d10_texture3d { - const struct ID3D10Texture3DVtbl *vtbl; + ID3D10Texture3D ID3D10Texture3D_iface; LONG refcount; struct wined3d_texture *wined3d_texture; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 9ac8638..f1ba7de 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -713,7 +713,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device *ifac } TRACE("Created 3D texture %p.\n", object); - *texture = (ID3D10Texture3D *)object; + *texture = &object->ID3D10Texture3D_iface; return S_OK; } diff --git a/dlls/d3d10core/texture.c b/dlls/d3d10core/texture.c index 0f8d750..16de150 100644 --- a/dlls/d3d10core/texture.c +++ b/dlls/d3d10core/texture.c @@ -251,6 +251,11 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic return S_OK; } +static inline struct d3d10_texture3d *impl_from_ID3D10Texture3D(ID3D10Texture3D *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_texture3d, ID3D10Texture3D_iface); +} + static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D *iface, REFIID riid, void **object) { TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); @@ -273,7 +278,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D static ULONG STDMETHODCALLTYPE d3d10_texture3d_AddRef(ID3D10Texture3D *iface) { - struct d3d10_texture3d *texture = (struct d3d10_texture3d *)iface; + struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); ULONG refcount = InterlockedIncrement(&texture->refcount); TRACE("%p increasing refcount to %u.\n", texture, refcount); @@ -291,7 +296,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_wined3d_object_released(void *pare static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface) { - struct d3d10_texture3d *texture = (struct d3d10_texture3d *)iface; + struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); ULONG refcount = InterlockedDecrement(&texture->refcount); TRACE("%p decreasing refcount to %u.\n", texture, refcount); @@ -356,7 +361,7 @@ static UINT STDMETHODCALLTYPE d3d10_texture3d_GetEvictionPriority(ID3D10Texture3 static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UINT sub_resource_idx, D3D10_MAP map_type, UINT map_flags, D3D10_MAPPED_TEXTURE3D *mapped_texture) { - struct d3d10_texture3d *texture = (struct d3d10_texture3d *)iface; + struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); struct wined3d_resource *sub_resource; WINED3DLOCKED_BOX wined3d_map_desc; HRESULT hr; @@ -384,7 +389,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT sub_resource_idx) { - struct d3d10_texture3d *texture = (struct d3d10_texture3d *)iface; + struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); struct wined3d_resource *sub_resource; TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx); @@ -397,7 +402,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT static void STDMETHODCALLTYPE d3d10_texture3d_GetDesc(ID3D10Texture3D *iface, D3D10_TEXTURE3D_DESC *desc) { - struct d3d10_texture3d *texture = (struct d3d10_texture3d *)iface; + struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); TRACE("iface %p, desc %p.\n", iface, desc); @@ -435,7 +440,7 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d10_devic { HRESULT hr; - texture->vtbl = &d3d10_texture3d_vtbl; + texture->ID3D10Texture3D_iface.lpVtbl = &d3d10_texture3d_vtbl; texture->refcount = 1; texture->desc = *desc;
1
0
0
0
Michael Stefaniuc : d3d10core: COM cleanup for the ID3D10Texture2D iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: 7d295ddfa463a6274bef173e7468868be4ff7276 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7d295ddfa463a6274bef173e7…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 10:12:44 2011 +0200 d3d10core: COM cleanup for the ID3D10Texture2D iface. --- dlls/d3d10core/d3d10core_private.h | 2 +- dlls/d3d10core/device.c | 8 ++++---- dlls/d3d10core/texture.c | 17 +++++++++++------ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 8e3f490..0ddf7f3 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -84,7 +84,7 @@ void d3d10_device_init(struct d3d10_device *device, void *outer_unknown) DECLSPE /* ID3D10Texture2D */ struct d3d10_texture2d { - const struct ID3D10Texture2DVtbl *vtbl; + ID3D10Texture2D ID3D10Texture2D_iface; LONG refcount; IUnknown *dxgi_surface; diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 379ad7d..9ac8638 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -681,7 +681,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *ifac return hr; } - *texture = (ID3D10Texture2D *)object; + *texture = &object->ID3D10Texture2D_iface; TRACE("Created ID3D10Texture2D %p\n", object); @@ -1380,7 +1380,7 @@ static HRESULT CDECL device_parent_create_surface(struct wined3d_device_parent * *surface = texture->wined3d_surface; wined3d_surface_incref(*surface); - ID3D10Texture2D_Release((ID3D10Texture2D *)texture); + ID3D10Texture2D_Release(&texture->ID3D10Texture2D_iface); return S_OK; } @@ -1423,7 +1423,7 @@ static HRESULT CDECL device_parent_create_rendertarget(struct wined3d_device_par *surface = texture->wined3d_surface; wined3d_surface_incref(*surface); - ID3D10Texture2D_Release((ID3D10Texture2D *)texture); + ID3D10Texture2D_Release(&texture->ID3D10Texture2D_iface); return S_OK; } @@ -1464,7 +1464,7 @@ static HRESULT CDECL device_parent_create_depth_stencil(struct wined3d_device_pa *surface = texture->wined3d_surface; wined3d_surface_incref(*surface); - ID3D10Texture2D_Release((ID3D10Texture2D *)texture); + ID3D10Texture2D_Release(&texture->ID3D10Texture2D_iface); return S_OK; } diff --git a/dlls/d3d10core/texture.c b/dlls/d3d10core/texture.c index 191df00..0f8d750 100644 --- a/dlls/d3d10core/texture.c +++ b/dlls/d3d10core/texture.c @@ -24,11 +24,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10core); +static inline struct d3d10_texture2d *impl_from_ID3D10Texture2D(ID3D10Texture2D *iface) +{ + return CONTAINING_RECORD(iface, struct d3d10_texture2d, ID3D10Texture2D_iface); +} + /* IUnknown methods */ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_QueryInterface(ID3D10Texture2D *iface, REFIID riid, void **object) { - struct d3d10_texture2d *This = (struct d3d10_texture2d *)iface; + struct d3d10_texture2d *This = impl_from_ID3D10Texture2D(iface); TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); @@ -56,7 +61,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_QueryInterface(ID3D10Texture2D static ULONG STDMETHODCALLTYPE d3d10_texture2d_AddRef(ID3D10Texture2D *iface) { - struct d3d10_texture2d *This = (struct d3d10_texture2d *)iface; + struct d3d10_texture2d *This = impl_from_ID3D10Texture2D(iface); ULONG refcount = InterlockedIncrement(&This->refcount); TRACE("%p increasing refcount to %u\n", This, refcount); @@ -77,7 +82,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_wined3d_object_released(void *pare static ULONG STDMETHODCALLTYPE d3d10_texture2d_Release(ID3D10Texture2D *iface) { - struct d3d10_texture2d *This = (struct d3d10_texture2d *)iface; + struct d3d10_texture2d *This = impl_from_ID3D10Texture2D(iface); ULONG refcount = InterlockedDecrement(&This->refcount); TRACE("%p decreasing refcount to %u\n", This, refcount); @@ -166,7 +171,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT static void STDMETHODCALLTYPE d3d10_texture2d_GetDesc(ID3D10Texture2D *iface, D3D10_TEXTURE2D_DESC *desc) { - struct d3d10_texture2d *This = (struct d3d10_texture2d *)iface; + struct d3d10_texture2d *This = impl_from_ID3D10Texture2D(iface); TRACE("iface %p, desc %p\n", iface, desc); @@ -204,7 +209,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic { HRESULT hr; - texture->vtbl = &d3d10_texture2d_vtbl; + texture->ID3D10Texture2D_iface.lpVtbl = &d3d10_texture2d_vtbl; texture->refcount = 1; texture->desc = *desc; @@ -220,7 +225,7 @@ HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_devic } hr = IWineDXGIDevice_create_surface(wine_device, NULL, 0, NULL, - (IUnknown *)texture, (void **)&texture->dxgi_surface); + (IUnknown *)&texture->ID3D10Texture2D_iface, (void **)&texture->dxgi_surface); IWineDXGIDevice_Release(wine_device); if (FAILED(hr)) {
1
0
0
0
Michael Stefaniuc : fusion: COM cleanup for the IAssemblyName iface.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: b5a103d2d1c4e9b658ab9b8dc98ff55467b584ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b5a103d2d1c4e9b658ab9b8dc…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 00:30:06 2011 +0200 fusion: COM cleanup for the IAssemblyName iface. --- dlls/fusion/asmname.c | 40 ++++++++++++++++++++++++---------------- 1 files changed, 24 insertions(+), 16 deletions(-) diff --git a/dlls/fusion/asmname.c b/dlls/fusion/asmname.c index 669b7b6..c79690f 100644 --- a/dlls/fusion/asmname.c +++ b/dlls/fusion/asmname.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(fusion); typedef struct { - const IAssemblyNameVtbl *lpIAssemblyNameVtbl; + IAssemblyName IAssemblyName_iface; LPWSTR path; @@ -67,10 +67,15 @@ static const WCHAR procarch[] = {'p','r','o','c','e','s','s','o','r', #define CHARS_PER_PUBKEY 16 +static inline IAssemblyNameImpl *impl_from_IAssemblyName(IAssemblyName *iface) +{ + return CONTAINING_RECORD(iface, IAssemblyNameImpl, IAssemblyName_iface); +} + static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface, REFIID riid, LPVOID *ppobj) { - IAssemblyNameImpl *This = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *This = impl_from_IAssemblyName(iface); TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj); @@ -90,7 +95,7 @@ static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface, static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface) { - IAssemblyNameImpl *This = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *This = impl_from_IAssemblyName(iface); ULONG refCount = InterlockedIncrement(&This->ref); TRACE("(%p)->(ref before = %u)\n", This, refCount - 1); @@ -100,7 +105,7 @@ static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface) static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface) { - IAssemblyNameImpl *This = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *This = impl_from_IAssemblyName(iface); ULONG refCount = InterlockedDecrement(&This->ref); TRACE("(%p)->(ref before = %u)\n", This, refCount + 1); @@ -132,7 +137,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface, LPVOID pvProperty, LPDWORD pcbProperty) { - IAssemblyNameImpl *name = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *name = impl_from_IAssemblyName(iface); TRACE("(%p, %d, %p, %p)\n", iface, PropertyId, pvProperty, pcbProperty); @@ -223,7 +228,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface, LPDWORD pccDisplayName, DWORD dwDisplayFlags) { - IAssemblyNameImpl *name = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *name = impl_from_IAssemblyName(iface); WCHAR verstr[30]; DWORD size; LPWSTR cultureval = 0; @@ -363,7 +368,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface, LPDWORD lpcwBuffer, WCHAR *pwzName) { - IAssemblyNameImpl *name = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *name = impl_from_IAssemblyName(iface); TRACE("(%p, %p, %p)\n", iface, lpcwBuffer, pwzName); @@ -384,7 +389,7 @@ static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface, LPDWORD pdwVersionHi, LPDWORD pdwVersionLow) { - IAssemblyNameImpl *name = (IAssemblyNameImpl *)iface; + IAssemblyNameImpl *name = impl_from_IAssemblyName(iface); TRACE("(%p, %p, %p)\n", iface, pdwVersionHi, pdwVersionLow); @@ -431,11 +436,16 @@ static const IAssemblyNameVtbl AssemblyNameVtbl = { }; /* Internal methods */ -HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) +static inline IAssemblyNameImpl *unsafe_impl_from_IAssemblyName(IAssemblyName *iface) { - IAssemblyNameImpl *name = (IAssemblyNameImpl *)iface; + assert(iface->lpVtbl == &AssemblyNameVtbl); - assert(name->lpIAssemblyNameVtbl == &AssemblyNameVtbl); + return impl_from_IAssemblyName(iface); +} + +HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) +{ + IAssemblyNameImpl *name = unsafe_impl_from_IAssemblyName(iface); name->path = strdupW(path); if (!name->path) @@ -447,9 +457,7 @@ HRESULT IAssemblyName_SetPath(IAssemblyName *iface, LPCWSTR path) HRESULT IAssemblyName_GetPath(IAssemblyName *iface, LPWSTR buf, ULONG *len) { ULONG buffer_size = *len; - IAssemblyNameImpl *name = (IAssemblyNameImpl *)iface; - - assert(name->lpIAssemblyNameVtbl == &AssemblyNameVtbl); + IAssemblyNameImpl *name = unsafe_impl_from_IAssemblyName(iface); if (!name->path) return S_OK; @@ -672,7 +680,7 @@ HRESULT WINAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj, if (!name) return E_OUTOFMEMORY; - name->lpIAssemblyNameVtbl = &AssemblyNameVtbl; + name->IAssemblyName_iface.lpVtbl = &AssemblyNameVtbl; name->ref = 1; hr = parse_display_name(name, szAssemblyName); @@ -682,7 +690,7 @@ HRESULT WINAPI CreateAssemblyNameObject(LPASSEMBLYNAME *ppAssemblyNameObj, return hr; } - *ppAssemblyNameObj = (IAssemblyName *)name; + *ppAssemblyNameObj = &name->IAssemblyName_iface; return S_OK; }
1
0
0
0
Michael Stefaniuc : shell32: COM cleanup in shfldr_netplaces.c.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: 7f39b9e9859399c2880ab6917c7b49833806af0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7f39b9e9859399c2880ab6917…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 00:26:27 2011 +0200 shell32: COM cleanup in shfldr_netplaces.c. --- dlls/shell32/shfldr_netplaces.c | 84 +++++++++++++++++++++------------------ 1 files changed, 45 insertions(+), 39 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7f39b9e9859399c2880ab…
1
0
0
0
Michael Stefaniuc : infosoft/tests: COM cleanup in infosoft.c.
by Alexandre Julliard
01 Jun '11
01 Jun '11
Module: wine Branch: master Commit: a3a09cd3f2d352651d649269b22b58ff1e0b9cb1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a3a09cd3f2d352651d649269b…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 1 00:22:53 2011 +0200 infosoft/tests: COM cleanup in infosoft.c. --- dlls/infosoft/tests/infosoft.c | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-) diff --git a/dlls/infosoft/tests/infosoft.c b/dlls/infosoft/tests/infosoft.c index 9570636..efebedc 100644 --- a/dlls/infosoft/tests/infosoft.c +++ b/dlls/infosoft/tests/infosoft.c @@ -19,6 +19,7 @@ */ #define COBJMACROS +#define CONST_VTABLE #include <stdio.h> #include <ole2.h> @@ -53,26 +54,25 @@ static struct expected testres[] = { { 23, 3, {'b','o','x',0}}, }; -static HRESULT WINAPI ws_QueryInterface(IWordSink *ws, REFIID riid, void **ppvObject) +static HRESULT WINAPI ws_QueryInterface(IWordSink *iface, REFIID riid, void **ppvObject) { ok(0, "not expected\n"); return E_NOINTERFACE; } -static ULONG WINAPI ws_AddRef(IWordSink *ws) +static ULONG WINAPI ws_AddRef(IWordSink *iface) { ok(0, "not expected\n"); return 2; } -static ULONG WINAPI ws_Release(IWordSink *ws) +static ULONG WINAPI ws_Release(IWordSink *iface) { ok(0, "not expected\n"); return 1; } -static HRESULT WINAPI ws_PutWord(IWordSink *ws, - ULONG cwc, const WCHAR * pwcInBuf, +static HRESULT WINAPI ws_PutWord(IWordSink *iface, ULONG cwc, const WCHAR *pwcInBuf, ULONG cwcSrcLen, ULONG cwcSrcPos) { ok(testres[wordnum].len == cwcSrcLen, "wrong length\n"); @@ -82,27 +82,26 @@ static HRESULT WINAPI ws_PutWord(IWordSink *ws, return S_OK; } -static HRESULT WINAPI ws_PutAltWord(IWordSink *ws, - ULONG cwc, const WCHAR * pwcInBuf, +static HRESULT WINAPI ws_PutAltWord(IWordSink *iface, ULONG cwc, const WCHAR *pwcInBuf, ULONG cwcSrcLen, ULONG cwcSrcPos) { ok(0, "not expected\n"); return S_OK; } -static HRESULT WINAPI ws_StartAltPhrase(IWordSink *ws) +static HRESULT WINAPI ws_StartAltPhrase(IWordSink *iface) { ok(0, "not expected\n"); return S_OK; } -static HRESULT WINAPI ws_EndAltPhrase(IWordSink *ws) +static HRESULT WINAPI ws_EndAltPhrase(IWordSink *iface) { ok(0, "not expected\n"); return S_OK; } -static HRESULT WINAPI ws_PutBreak(IWordSink *ws, WORDREP_BREAK_TYPE breakType) +static HRESULT WINAPI ws_PutBreak(IWordSink *iface, WORDREP_BREAK_TYPE breakType) { ok(0, "not expected\n"); return S_OK; @@ -122,10 +121,10 @@ static const IWordSinkVtbl wsvt = typedef struct _wordsink_impl { - const IWordSinkVtbl *vtbl; + IWordSink IWordSink_iface; } wordsink_impl; -static wordsink_impl wordsink = { &wsvt }; +static wordsink_impl wordsink = { { &wsvt } }; static HRESULT WINAPI fillbuf_none(TEXT_SOURCE *ts) { @@ -180,7 +179,7 @@ START_TEST(infosoft) ts.awcBuffer = teststring; ts.iEnd = lstrlenW(ts.awcBuffer); ts.iCur = 0; - r = IWordBreaker_BreakText( wb, &ts, (IWordSink*) &wordsink, NULL); + r = IWordBreaker_BreakText(wb, &ts, &wordsink.IWordSink_iface, NULL); ok( r == S_OK, "failed\n"); ok(wordnum == 4, "words not processed\n"); @@ -194,7 +193,7 @@ START_TEST(infosoft) r = fillbuf_many(&ts); ok( r == S_OK, "failed\n"); - r = IWordBreaker_BreakText( wb, &ts, (IWordSink*) &wordsink, NULL); + r = IWordBreaker_BreakText(wb, &ts, &wordsink.IWordSink_iface, NULL); ok( r == S_OK, "failed\n"); ok(wordnum == 4, "words not processed\n");
1
0
0
0
← Newer
1
...
78
79
80
81
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Results per page:
10
25
50
100
200