[PATCH 3/4] wined3d: Get rid of IWineD3DSurface::GetData().

Henri Verbeet hverbeet at codeweavers.com
Thu Jan 20 12:52:00 CST 2011


---
 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 insertions(+), 19 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 887546a..71c63b2 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 d6734a7..2e97985 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 4449bf0..21c81a2 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 9616489..dff1c35 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 10d41d1..2be655b 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
     );
-- 
1.7.3.4




More information about the wine-patches mailing list