Henri Verbeet : wined3d: Don't call IWineD3DSurfaceImpl_GetData() from surface_gdi.c.
Alexandre Julliard
julliard at winehq.org
Tue Nov 25 07:21:52 CST 2008
Module: wine
Branch: master
Commit: 49b55f677efbdb95381e9708eca685b6e8951c82
URL: http://source.winehq.org/git/wine.git/?a=commit;h=49b55f677efbdb95381e9708eca685b6e8951c82
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Nov 25 11:57:39 2008 +0100
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 beb9f6d..1827838 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 5ae80f9..64f05e2 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 a17c007..6266366 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 e3701e8..64daf8a 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);
More information about the wine-cvs
mailing list