[PATCH 3/6] wined3d: Get rid of wined3d_device_update_surface().
Henri Verbeet
hverbeet at codeweavers.com
Mon Feb 8 11:32:03 CST 2016
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/device.c | 22 +---------------------
dlls/wined3d/wined3d.spec | 1 -
include/wine/wined3d.h | 2 --
3 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 18fdc1d..14e1f51 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3676,7 +3676,7 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device,
i * src_levels + j + src_skip_levels));
dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture,
i * dst_levels + j));
- if (FAILED(hr = wined3d_device_update_surface(device, src_surface, NULL, dst_surface, NULL)))
+ if (FAILED(hr = surface_upload_from_surface(dst_surface, NULL, src_surface, NULL)))
{
WARN("Failed to update surface, hr %#x.\n", hr);
return hr;
@@ -3850,26 +3850,6 @@ float CDECL wined3d_device_get_npatch_mode(const struct wined3d_device *device)
return 0.0f;
}
-/* FIXME: Callers should probably use wined3d_device_update_sub_resource()
- * instead. */
-HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device,
- struct wined3d_surface *src_surface, const RECT *src_rect,
- struct wined3d_surface *dst_surface, const POINT *dst_point)
-{
- TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n",
- device, src_surface, wine_dbgstr_rect(src_rect),
- dst_surface, wine_dbgstr_point(dst_point));
-
- if (src_surface->resource.pool != WINED3D_POOL_SYSTEM_MEM || dst_surface->resource.pool != WINED3D_POOL_DEFAULT)
- {
- WARN("source %p must be SYSTEMMEM and dest %p must be DEFAULT, returning WINED3DERR_INVALIDCALL\n",
- src_surface, dst_surface);
- return WINED3DERR_INVALIDCALL;
- }
-
- return surface_upload_from_surface(dst_surface, dst_point, src_surface, src_rect);
-}
-
void CDECL wined3d_device_copy_resource(struct wined3d_device *device,
struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource)
{
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index d31cf9a..532702e 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -160,7 +160,6 @@
@ cdecl wined3d_device_uninit_3d(ptr)
@ cdecl wined3d_device_uninit_gdi(ptr)
@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long)
-@ cdecl wined3d_device_update_surface(ptr ptr ptr ptr ptr)
@ cdecl wined3d_device_update_texture(ptr ptr ptr)
@ cdecl wined3d_device_validate_device(ptr ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 0b8bf7b..420a55b 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2319,8 +2319,6 @@ HRESULT __cdecl wined3d_device_uninit_gdi(struct wined3d_device *device);
void __cdecl wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
unsigned int depth_pitch);
-HRESULT __cdecl wined3d_device_update_surface(struct wined3d_device *device, struct wined3d_surface *src_surface,
- const RECT *src_rect, struct wined3d_surface *dst_surface, const POINT *dst_point);
HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device,
struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture);
HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes);
--
2.1.4
More information about the wine-patches
mailing list