d3d11: Replace "This" with "device".

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Józef Kucia 2016-06-17 10:41:47 +02:00 committed by Alexandre Julliard
parent 599aa89fb0
commit 18069aaa01
1 changed files with 25 additions and 25 deletions

View File

@ -2867,20 +2867,20 @@ static ULONG STDMETHODCALLTYPE d3d_device_inner_Release(IUnknown *iface)
static HRESULT STDMETHODCALLTYPE d3d10_device_QueryInterface(ID3D10Device1 *iface, REFIID riid, static HRESULT STDMETHODCALLTYPE d3d10_device_QueryInterface(ID3D10Device1 *iface, REFIID riid,
void **ppv) void **ppv)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
return IUnknown_QueryInterface(This->outer_unk, riid, ppv); return IUnknown_QueryInterface(device->outer_unk, riid, ppv);
} }
static ULONG STDMETHODCALLTYPE d3d10_device_AddRef(ID3D10Device1 *iface) static ULONG STDMETHODCALLTYPE d3d10_device_AddRef(ID3D10Device1 *iface)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
return IUnknown_AddRef(This->outer_unk); return IUnknown_AddRef(device->outer_unk);
} }
static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device1 *iface) static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device1 *iface)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
return IUnknown_Release(This->outer_unk); return IUnknown_Release(device->outer_unk);
} }
/* ID3D10Device methods */ /* ID3D10Device methods */
@ -2928,13 +2928,13 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetShaderResources(ID3D10Device1 *i
static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device1 *iface,
ID3D10PixelShader *shader) ID3D10PixelShader *shader)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
struct d3d_pixel_shader *ps = unsafe_impl_from_ID3D10PixelShader(shader); struct d3d_pixel_shader *ps = unsafe_impl_from_ID3D10PixelShader(shader);
TRACE("iface %p, shader %p\n", iface, shader); TRACE("iface %p, shader %p\n", iface, shader);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_pixel_shader(This->wined3d_device, ps ? ps->wined3d_shader : NULL); wined3d_device_set_pixel_shader(device->wined3d_device, ps ? ps->wined3d_shader : NULL);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }
@ -2961,40 +2961,40 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device1 *iface,
static void STDMETHODCALLTYPE d3d10_device_VSSetShader(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_VSSetShader(ID3D10Device1 *iface,
ID3D10VertexShader *shader) ID3D10VertexShader *shader)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
struct d3d_vertex_shader *vs = unsafe_impl_from_ID3D10VertexShader(shader); struct d3d_vertex_shader *vs = unsafe_impl_from_ID3D10VertexShader(shader);
TRACE("iface %p, shader %p\n", iface, shader); TRACE("iface %p, shader %p\n", iface, shader);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_vertex_shader(This->wined3d_device, vs ? vs->wined3d_shader : NULL); wined3d_device_set_vertex_shader(device->wined3d_device, vs ? vs->wined3d_shader : NULL);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }
static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device1 *iface, UINT index_count, static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device1 *iface, UINT index_count,
UINT start_index_location, INT base_vertex_location) UINT start_index_location, INT base_vertex_location)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n", TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n",
iface, index_count, start_index_location, base_vertex_location); iface, index_count, start_index_location, base_vertex_location);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_base_vertex_index(This->wined3d_device, base_vertex_location); wined3d_device_set_base_vertex_index(device->wined3d_device, base_vertex_location);
wined3d_device_draw_indexed_primitive(This->wined3d_device, start_index_location, index_count); wined3d_device_draw_indexed_primitive(device->wined3d_device, start_index_location, index_count);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }
static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device1 *iface, UINT vertex_count, static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device1 *iface, UINT vertex_count,
UINT start_vertex_location) UINT start_vertex_location)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
TRACE("iface %p, vertex_count %u, start_vertex_location %u\n", TRACE("iface %p, vertex_count %u, start_vertex_location %u\n",
iface, vertex_count, start_vertex_location); iface, vertex_count, start_vertex_location);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_draw_primitive(This->wined3d_device, start_vertex_location, vertex_count); wined3d_device_draw_primitive(device->wined3d_device, start_vertex_location, vertex_count);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }
@ -3021,13 +3021,13 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetConstantBuffers(ID3D10Device1 *i
static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device1 *iface,
ID3D10InputLayout *input_layout) ID3D10InputLayout *input_layout)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
struct d3d_input_layout *layout = unsafe_impl_from_ID3D10InputLayout(input_layout); struct d3d_input_layout *layout = unsafe_impl_from_ID3D10InputLayout(input_layout);
TRACE("iface %p, input_layout %p\n", iface, input_layout); TRACE("iface %p, input_layout %p\n", iface, input_layout);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_vertex_declaration(This->wined3d_device, wined3d_device_set_vertex_declaration(device->wined3d_device,
layout ? layout->wined3d_decl : NULL); layout ? layout->wined3d_decl : NULL);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }
@ -3035,7 +3035,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device1 *iface
static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device1 *iface, UINT start_slot, static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device1 *iface, UINT start_slot,
UINT buffer_count, ID3D10Buffer *const *buffers, const UINT *strides, const UINT *offsets) UINT buffer_count, ID3D10Buffer *const *buffers, const UINT *strides, const UINT *offsets)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
unsigned int i; unsigned int i;
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p\n", TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p\n",
@ -3046,7 +3046,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device1 *ifa
{ {
struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]); struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
wined3d_device_set_stream_source(This->wined3d_device, start_slot + i, wined3d_device_set_stream_source(device->wined3d_device, start_slot + i,
buffer ? buffer->wined3d_buffer : NULL, offsets[i], strides[i]); buffer ? buffer->wined3d_buffer : NULL, offsets[i], strides[i]);
} }
wined3d_mutex_unlock(); wined3d_mutex_unlock();
@ -3055,14 +3055,14 @@ static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device1 *ifa
static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device1 *iface,
ID3D10Buffer *buffer, DXGI_FORMAT format, UINT offset) ID3D10Buffer *buffer, DXGI_FORMAT format, UINT offset)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D10Buffer(buffer); struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D10Buffer(buffer);
TRACE("iface %p, buffer %p, format %s, offset %u.\n", TRACE("iface %p, buffer %p, format %s, offset %u.\n",
iface, buffer, debug_dxgi_format(format), offset); iface, buffer, debug_dxgi_format(format), offset);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_index_buffer(This->wined3d_device, wined3d_device_set_index_buffer(device->wined3d_device,
buffer_impl ? buffer_impl->wined3d_buffer : NULL, buffer_impl ? buffer_impl->wined3d_buffer : NULL,
wined3dformat_from_dxgi_format(format), offset); wined3dformat_from_dxgi_format(format), offset);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
@ -3137,12 +3137,12 @@ static void STDMETHODCALLTYPE d3d10_device_GSSetShader(ID3D10Device1 *iface, ID3
static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device1 *iface,
D3D10_PRIMITIVE_TOPOLOGY topology) D3D10_PRIMITIVE_TOPOLOGY topology)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
TRACE("iface %p, topology %s\n", iface, debug_d3d10_primitive_topology(topology)); TRACE("iface %p, topology %s\n", iface, debug_d3d10_primitive_topology(topology));
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_set_primitive_type(This->wined3d_device, (enum wined3d_primitive_type)topology); wined3d_device_set_primitive_type(device->wined3d_device, (enum wined3d_primitive_type)topology);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }
@ -3794,12 +3794,12 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device1 *iface, ID3
static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device1 *iface,
D3D10_PRIMITIVE_TOPOLOGY *topology) D3D10_PRIMITIVE_TOPOLOGY *topology)
{ {
struct d3d_device *This = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
TRACE("iface %p, topology %p\n", iface, topology); TRACE("iface %p, topology %p\n", iface, topology);
wined3d_mutex_lock(); wined3d_mutex_lock();
wined3d_device_get_primitive_type(This->wined3d_device, (enum wined3d_primitive_type *)topology); wined3d_device_get_primitive_type(device->wined3d_device, (enum wined3d_primitive_type *)topology);
wined3d_mutex_unlock(); wined3d_mutex_unlock();
} }