wined3d: Do not increment the reference count of the returned buffer in wined3d_device_get_stream_source().

None of the other getters increment the reference count either.
This commit is contained in:
Henri Verbeet 2014-09-18 10:56:26 +02:00 committed by Alexandre Julliard
parent b5a91d1246
commit 74ab8e8ce9
4 changed files with 0 additions and 6 deletions

View File

@ -2798,7 +2798,6 @@ static HRESULT WINAPI d3d8_device_GetStreamSource(IDirect3DDevice8 *iface,
buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
*buffer = &buffer_impl->IDirect3DVertexBuffer8_iface;
IDirect3DVertexBuffer8_AddRef(*buffer);
wined3d_buffer_decref(wined3d_buffer);
}
else
{

View File

@ -2769,7 +2769,6 @@ static HRESULT WINAPI d3d9_device_GetStreamSource(IDirect3DDevice9Ex *iface,
buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
*buffer = &buffer_impl->IDirect3DVertexBuffer9_iface;
IDirect3DVertexBuffer9_AddRef(*buffer);
wined3d_buffer_decref(wined3d_buffer);
}
else
{

View File

@ -159,8 +159,6 @@ static ULONG WINAPI d3d_vertex_buffer7_Release(IDirect3DVertexBuffer7 *iface)
0, &curVB, &offset, &stride);
if (curVB == buffer->wineD3DVertexBuffer)
wined3d_device_set_stream_source(buffer->ddraw->wined3d_device, 0, NULL, 0, 0);
if (curVB)
wined3d_buffer_decref(curVB); /* For the GetStreamSource */
wined3d_vertex_declaration_decref(buffer->wineD3DVertexDeclaration);
wined3d_buffer_decref(buffer->wineD3DVertexBuffer);

View File

@ -1276,8 +1276,6 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi
stream = &device->state.streams[stream_idx];
*buffer = stream->buffer;
if (*buffer)
wined3d_buffer_incref(*buffer);
if (offset)
*offset = stream->offset;
*stride = stream->stride;