d3d10core: COM cleanup for the ID3D10RenderTargetView iface.
This commit is contained in:
parent
0b78866a0f
commit
dc3ee8b947
|
@ -132,7 +132,7 @@ HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view) DECLS
|
||||||
/* ID3D10RenderTargetView */
|
/* ID3D10RenderTargetView */
|
||||||
struct d3d10_rendertarget_view
|
struct d3d10_rendertarget_view
|
||||||
{
|
{
|
||||||
const struct ID3D10RenderTargetViewVtbl *vtbl;
|
ID3D10RenderTargetView ID3D10RenderTargetView_iface;
|
||||||
LONG refcount;
|
LONG refcount;
|
||||||
|
|
||||||
struct wined3d_rendertarget_view *wined3d_view;
|
struct wined3d_rendertarget_view *wined3d_view;
|
||||||
|
|
|
@ -782,7 +782,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Devic
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Created rendertarget view %p.\n", object);
|
TRACE("Created rendertarget view %p.\n", object);
|
||||||
*view = (ID3D10RenderTargetView *)object;
|
*view = &object->ID3D10RenderTargetView_iface;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ HRESULT d3d10_depthstencil_view_init(struct d3d10_depthstencil_view *view)
|
||||||
|
|
||||||
static inline struct d3d10_rendertarget_view *impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface)
|
static inline struct d3d10_rendertarget_view *impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, struct d3d10_rendertarget_view, vtbl);
|
return CONTAINING_RECORD(iface, struct d3d10_rendertarget_view, ID3D10RenderTargetView_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IUnknown methods */
|
/* IUnknown methods */
|
||||||
|
@ -322,7 +322,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_QueryInterface(ID3D10Re
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef(ID3D10RenderTargetView *iface)
|
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef(ID3D10RenderTargetView *iface)
|
||||||
{
|
{
|
||||||
struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface;
|
struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface);
|
||||||
ULONG refcount = InterlockedIncrement(&This->refcount);
|
ULONG refcount = InterlockedIncrement(&This->refcount);
|
||||||
|
|
||||||
TRACE("%p increasing refcount to %u\n", This, refcount);
|
TRACE("%p increasing refcount to %u\n", This, refcount);
|
||||||
|
@ -332,7 +332,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_AddRef(ID3D10RenderTarget
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTargetView *iface)
|
static ULONG STDMETHODCALLTYPE d3d10_rendertarget_view_Release(ID3D10RenderTargetView *iface)
|
||||||
{
|
{
|
||||||
struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface;
|
struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface);
|
||||||
ULONG refcount = InterlockedDecrement(&This->refcount);
|
ULONG refcount = InterlockedDecrement(&This->refcount);
|
||||||
|
|
||||||
TRACE("%p decreasing refcount to %u\n", This, refcount);
|
TRACE("%p decreasing refcount to %u\n", This, refcount);
|
||||||
|
@ -384,7 +384,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_SetPrivateDataInterface
|
||||||
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTargetView *iface,
|
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTargetView *iface,
|
||||||
ID3D10Resource **resource)
|
ID3D10Resource **resource)
|
||||||
{
|
{
|
||||||
struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface;
|
struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface);
|
||||||
struct wined3d_resource *wined3d_resource;
|
struct wined3d_resource *wined3d_resource;
|
||||||
IUnknown *parent;
|
IUnknown *parent;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -414,7 +414,7 @@ static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetResource(ID3D10RenderTa
|
||||||
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDesc(ID3D10RenderTargetView *iface,
|
static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDesc(ID3D10RenderTargetView *iface,
|
||||||
D3D10_RENDER_TARGET_VIEW_DESC *desc)
|
D3D10_RENDER_TARGET_VIEW_DESC *desc)
|
||||||
{
|
{
|
||||||
struct d3d10_rendertarget_view *This = (struct d3d10_rendertarget_view *)iface;
|
struct d3d10_rendertarget_view *This = impl_from_ID3D10RenderTargetView(iface);
|
||||||
|
|
||||||
TRACE("iface %p, desc %p\n", iface, desc);
|
TRACE("iface %p, desc %p\n", iface, desc);
|
||||||
|
|
||||||
|
@ -444,7 +444,7 @@ HRESULT d3d10_rendertarget_view_init(struct d3d10_rendertarget_view *view,
|
||||||
struct wined3d_resource *wined3d_resource;
|
struct wined3d_resource *wined3d_resource;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
view->vtbl = &d3d10_rendertarget_view_vtbl;
|
view->ID3D10RenderTargetView_iface.lpVtbl = &d3d10_rendertarget_view_vtbl;
|
||||||
view->refcount = 1;
|
view->refcount = 1;
|
||||||
|
|
||||||
if (!desc)
|
if (!desc)
|
||||||
|
|
Loading…
Reference in New Issue