[PATCH 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
Thu Oct 15 08:41:24 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        | 10 +++++++---
 dlls/wined3d/device.c     | 13 -------------
 dlls/wined3d/wined3d.spec |  1 -
 include/wine/wined3d.h    |  2 --
 4 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index f49664e..1f77cbf 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1255,16 +1255,20 @@ static HRESULT WINAPI d3d9_device_GetRenderTargetData(IDirect3DDevice9Ex *iface,
 }
 
 static HRESULT WINAPI d3d9_device_GetFrontBufferData(IDirect3DDevice9Ex *iface,
-        UINT swapchain, IDirect3DSurface9 *dst_surface)
+        UINT swapchain_idx, IDirect3DSurface9 *dst_surface)
 {
     struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
     struct d3d9_surface *dst_impl = unsafe_impl_from_IDirect3DSurface9(dst_surface);
+    struct wined3d_swapchain *swapchain;
     HRESULT hr;
 
-    TRACE("iface %p, swapchain %u, dst_surface %p.\n", iface, swapchain, dst_surface);
+    TRACE("iface %p, swapchain %u, dst_surface %p.\n", iface, swapchain_idx, dst_surface);
 
     wined3d_mutex_lock();
-    hr = wined3d_device_get_front_buffer_data(device->wined3d_device, swapchain, dst_impl->wined3d_surface);
+    if (!(swapchain = wined3d_device_get_swapchain(device->wined3d_device, swapchain_idx)))
+        hr = D3DERR_INVALIDCALL;
+    else
+        hr = wined3d_swapchain_get_front_buffer_data(swapchain, dst_impl->wined3d_surface);
     wined3d_mutex_unlock();
 
     return hr;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index def042a..c1c0d1f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3650,19 +3650,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 c4ebd35..6356665 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 a82777e..fc0b40e 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