[v2 2/5] d3d9: call wined3d_swapchain_get_front_buffer_data instead of wined3d_device_get_front_buffer_data in d3d9_device_GetFrontBuffer
Riccardo Bortolato
rikyz619 at gmail.com
Fri Oct 16 06:59:16 CDT 2015
removed the now unused wined3d_device_get_front_buffer_data from wined3d
Signed-off-by: Riccardo Bortolato <rikyz619 at gmail.com>
---
dlls/d3d9/device.c | 6 ++++--
dlls/wined3d/device.c | 13 -------------
dlls/wined3d/wined3d.spec | 1 -
include/wine/wined3d.h | 2 --
4 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 9c09f65..2934d71 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -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;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 0d607ee..a281c3f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 541f549..1b39e9d 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -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)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 19a4e4f..7d407bb 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -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);
--
1.9.1
More information about the wine-patches
mailing list