From ce050c89de812567c44a5ae90dff56cc4176596c Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 20 Jan 2011 19:52:00 +0100 Subject: [PATCH] wined3d: Get rid of IWineD3DSurface::GetData(). --- dlls/wined3d/device.c | 2 +- dlls/wined3d/surface.c | 1 - dlls/wined3d/surface_base.c | 14 -------------- dlls/wined3d/surface_gdi.c | 1 - include/wine/wined3d.idl | 2 -- 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 887546a6c9f..71c63b23c82 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5469,7 +5469,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface, update_w = src_rect ? src_rect->right - src_rect->left : src_w; update_h = src_rect ? src_rect->bottom - src_rect->top : src_h; - data = IWineD3DSurface_GetData(src_surface); + data = src_impl->resource.allocatedMemory; if (!data) ERR("Source surface has no allocated memory, but should be a sysmem surface.\n"); ENTER_GL(); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index d6734a7208d..2e97985a55a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4712,7 +4712,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = IWineD3DBaseSurfaceImpl_SetClipper, IWineD3DBaseSurfaceImpl_GetClipper, /* Internal use: */ - IWineD3DBaseSurfaceImpl_GetData, IWineD3DSurfaceImpl_SetFormat, IWineD3DSurfaceImpl_PrivateSetup, IWineD3DSurfaceImpl_GetImplType, diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 4449bf03d73..21c81a25a1f 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -1885,17 +1885,3 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Map(IWineD3DSurface *iface, return WINED3D_OK; } - -/* TODO: think about moving this down to resource? */ -const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) -{ - IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface; - - /* This should only be called for sysmem textures, it may be a good idea - * to extend this to all pools at some point in the future */ - if (This->resource.pool != WINED3DPOOL_SYSTEMMEM) - { - FIXME("(%p) Attempting to get system memory for a non-system memory texture\n", iface); - } - return This->resource.allocatedMemory; -} diff --git a/dlls/wined3d/surface_gdi.c b/dlls/wined3d/surface_gdi.c index 9616489d50e..dff1c358fa0 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -480,7 +480,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = IWineD3DBaseSurfaceImpl_SetClipper, IWineD3DBaseSurfaceImpl_GetClipper, /* Internal use: */ - IWineD3DBaseSurfaceImpl_GetData, IWineD3DBaseSurfaceImpl_SetFormat, IWineGDISurfaceImpl_PrivateSetup, IWineGDISurfaceImpl_GetImplType, diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl index 10d41d12d00..2be655b972a 100644 --- a/include/wine/wined3d.idl +++ b/include/wine/wined3d.idl @@ -2462,8 +2462,6 @@ interface IWineD3DSurface : IWineD3DResource HRESULT GetClipper( [out] IWineD3DClipper **clipper ); - const void *GetData( - ); HRESULT SetFormat( [in] enum wined3d_format_id format_id );