Commit 9875ad2c authored by Riccardo Bortolato's avatar Riccardo Bortolato Committed by Alexandre Julliard

d3d9: Call wined3d_swapchain_get_front_buffer_data instead of…

d3d9: Call wined3d_swapchain_get_front_buffer_data instead of wined3d_device_get_front_buffer_data in d3d9_device_GetFrontBuffer. Removed the now unused wined3d_device_get_front_buffer_data from wined3d. Signed-off-by: 's avatarRiccardo Bortolato <rikyz619@gmail.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cdc24238
......@@ -1281,12 +1281,14 @@ static HRESULT WINAPI d3d9_device_GetFrontBufferData(IDirect3DDevice9Ex *iface,
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
struct d3d9_surface *dst_impl = unsafe_impl_from_IDirect3DSurface9(dst_surface);
HRESULT hr;
HRESULT hr = D3DERR_INVALIDCALL;
TRACE("iface %p, swapchain %u, dst_surface %p.\n", iface, swapchain, dst_surface);
wined3d_mutex_lock();
hr = wined3d_device_get_front_buffer_data(device->wined3d_device, swapchain, dst_impl->wined3d_surface);
if (swapchain < device->implicit_swapchain_count)
hr = wined3d_swapchain_get_front_buffer_data(device->implicit_swapchains[swapchain]->wined3d_swapchain,
dst_impl->wined3d_surface);
wined3d_mutex_unlock();
return hr;
......
......@@ -3632,19 +3632,6 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
return WINED3D_OK;
}
HRESULT CDECL wined3d_device_get_front_buffer_data(const struct wined3d_device *device,
UINT swapchain_idx, struct wined3d_surface *dst_surface)
{
struct wined3d_swapchain *swapchain;
TRACE("device %p, swapchain_idx %u, dst_surface %p.\n", device, swapchain_idx, dst_surface);
if (!(swapchain = wined3d_device_get_swapchain(device, swapchain_idx)))
return WINED3DERR_INVALIDCALL;
return wined3d_swapchain_get_front_buffer_data(swapchain, dst_surface);
}
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
{
const struct wined3d_state *state = &device->state;
......
......@@ -56,7 +56,6 @@
@ cdecl wined3d_device_get_depth_stencil_view(ptr)
@ cdecl wined3d_device_get_device_caps(ptr ptr)
@ cdecl wined3d_device_get_display_mode(ptr long ptr ptr)
@ cdecl wined3d_device_get_front_buffer_data(ptr long ptr)
@ cdecl wined3d_device_get_gamma_ramp(ptr long ptr)
@ cdecl wined3d_device_get_geometry_shader(ptr)
@ cdecl wined3d_device_get_gs_cb(ptr long)
......
......@@ -2159,8 +2159,6 @@ struct wined3d_rendertarget_view * __cdecl wined3d_device_get_depth_stencil_view
HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps);
HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx,
struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation);
HRESULT __cdecl wined3d_device_get_front_buffer_data(const struct wined3d_device *device,
UINT swapchain_idx, struct wined3d_surface *dst_surface);
void __cdecl wined3d_device_get_gamma_ramp(const struct wined3d_device *device,
UINT swapchain_idx, struct wined3d_gamma_ramp *ramp);
struct wined3d_shader * __cdecl wined3d_device_get_geometry_shader(const struct wined3d_device *device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment