From 49b55f677efbdb95381e9708eca685b6e8951c82 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 25 Nov 2008 11:57:39 +0100 Subject: [PATCH] wined3d: Don't call IWineD3DSurfaceImpl_GetData() from surface_gdi.c. --- dlls/wined3d/surface.c | 12 +----------- dlls/wined3d/surface_base.c | 14 ++++++++++++++ dlls/wined3d/surface_gdi.c | 2 +- dlls/wined3d/wined3d_private.h | 3 +-- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index beb9f6df2e6..18278381f21 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -680,16 +680,6 @@ void WINAPI IWineD3DSurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor * *glDescription = &This->glDescription; } -/* TODO: think about moving this down to resource? */ -const void *WINAPI IWineD3DSurfaceImpl_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 (CONST void*)(This->resource.allocatedMemory); -} - /* Read the framebuffer back into the surface */ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, void *dest, UINT pitch) { IWineD3DSwapChainImpl *swapchain; @@ -4801,7 +4791,7 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = IWineD3DSurfaceImpl_SaveSnapshot, IWineD3DSurfaceImpl_SetContainer, IWineD3DSurfaceImpl_GetGlDesc, - IWineD3DSurfaceImpl_GetData, + IWineD3DBaseSurfaceImpl_GetData, IWineD3DSurfaceImpl_SetFormat, IWineD3DSurfaceImpl_PrivateSetup, IWineD3DSurfaceImpl_ModifyLocation, diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c index 5ae80f968c9..64f05e2583b 100644 --- a/dlls/wined3d/surface_base.c +++ b/dlls/wined3d/surface_base.c @@ -1818,3 +1818,17 @@ void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface) { ERR("Should not be called on base texture\n"); return; } + +/* 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 a17c007aba7..6266366b100 100644 --- a/dlls/wined3d/surface_gdi.c +++ b/dlls/wined3d/surface_gdi.c @@ -679,7 +679,7 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl = IWineGDISurfaceImpl_SaveSnapshot, IWineD3DBaseSurfaceImpl_SetContainer, IWineGDISurfaceImpl_GetGlDesc, - IWineD3DSurfaceImpl_GetData, + IWineD3DBaseSurfaceImpl_GetData, IWineD3DBaseSurfaceImpl_SetFormat, IWineGDISurfaceImpl_PrivateSetup, IWineGDISurfaceImpl_ModifyLocation, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index e3701e81a21..64daf8ac621 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1490,8 +1490,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dst IWineD3DSurface *Source, const RECT *rsrc, DWORD trans); HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags); void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface); - -const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface); +const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface); void get_drawable_size_swapchain(IWineD3DSurfaceImpl *This, UINT *width, UINT *height); void get_drawable_size_backbuffer(IWineD3DSurfaceImpl *This, UINT *width, UINT *height);