Module: wine Branch: master Commit: 90112e97eae128bbd8ade6dfccdd12bf91b4d0bb URL: http://source.winehq.org/git/wine.git/?a=commit;h=90112e97eae128bbd8ade6dfcc...
Author: Ričardas Barkauskas rbarkauskas@codeweavers.com Date: Tue Jun 21 00:14:30 2011 +0300
ddraw: Move IDirect3DTexture and IDirect3DTexture2 to IDirectDrawSurface reference counts.
---
dlls/ddraw/surface.c | 8 ++++---- dlls/ddraw/tests/dsurface.c | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index aac680c..b027940 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -329,7 +329,7 @@ static ULONG WINAPI d3d_texture2_AddRef(IDirect3DTexture2 *iface) IDirectDrawSurfaceImpl *This = surface_from_texture2(iface); TRACE("iface %p.\n", iface);
- return ddraw_surface7_AddRef(&This->IDirectDrawSurface7_iface); + return ddraw_surface1_AddRef(&This->IDirectDrawSurface_iface); }
static ULONG WINAPI d3d_texture1_AddRef(IDirect3DTexture *iface) @@ -337,7 +337,7 @@ static ULONG WINAPI d3d_texture1_AddRef(IDirect3DTexture *iface) IDirectDrawSurfaceImpl *This = surface_from_texture1(iface); TRACE("iface %p.\n", iface);
- return ddraw_surface7_AddRef(&This->IDirectDrawSurface7_iface); + return ddraw_surface1_AddRef(&This->IDirectDrawSurface_iface); }
/***************************************************************************** @@ -606,7 +606,7 @@ static ULONG WINAPI d3d_texture2_Release(IDirect3DTexture2 *iface) IDirectDrawSurfaceImpl *This = surface_from_texture2(iface); TRACE("iface %p.\n", iface);
- return ddraw_surface7_Release(&This->IDirectDrawSurface7_iface); + return ddraw_surface1_Release(&This->IDirectDrawSurface_iface); }
static ULONG WINAPI d3d_texture1_Release(IDirect3DTexture *iface) @@ -614,7 +614,7 @@ static ULONG WINAPI d3d_texture1_Release(IDirect3DTexture *iface) IDirectDrawSurfaceImpl *This = surface_from_texture1(iface); TRACE("iface %p.\n", iface);
- return ddraw_surface7_Release(&This->IDirectDrawSurface7_iface); + return ddraw_surface1_Release(&This->IDirectDrawSurface_iface); }
/***************************************************************************** diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index 3af6e6d..0c9cd16 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -1111,29 +1111,29 @@ static void IFaceRefCount(void) if (SUCCEEDED(ret)) { ref = getRefcount((IUnknown *) tex); - todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref); + ok(ref == 2, "Refcount is %u, expected 2\n", ref); ref = getRefcount((IUnknown *) surf); - todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref); + ok(ref == 2, "Refcount is %u, expected 2\n", ref);
IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DTexture2, (void **) &tex2); ref = getRefcount((IUnknown *) tex); - todo_wine ok(ref == 3, "Refcount is %u, expected 3\n", ref); + ok(ref == 3, "Refcount is %u, expected 3\n", ref); ref = getRefcount((IUnknown *) tex2); - todo_wine ok(ref == 3, "Refcount is %u, expected 3\n", ref); + ok(ref == 3, "Refcount is %u, expected 3\n", ref); ref = getRefcount((IUnknown *) surf); - todo_wine ok(ref == 3, "Refcount is %u, expected 3\n", ref); + ok(ref == 3, "Refcount is %u, expected 3\n", ref);
IDirectDrawSurface_QueryInterface(surf, &IID_IDirectDrawGammaControl, (void **) &gamma); ref = getRefcount((IUnknown *) gamma); todo_wine ok(ref == 1, "Refcount is %u, expected 1\n", ref);
ref = IDirect3DTexture2_Release(tex2); /* Release the texture */ - todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref); + ok(ref == 2, "Refcount is %u, expected 2\n", ref); ref = getRefcount((IUnknown *) surf); - todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref); + ok(ref == 2, "Refcount is %u, expected 2\n", ref);
ref = IDirect3DTexture_Release(tex); /* Release the texture */ - todo_wine ok(ref == 1, "Refcount is %u, expected 1\n", ref); + ok(ref == 1, "Refcount is %u, expected 1\n", ref); ref = getRefcount((IUnknown *) surf); ok(ref == 1, "Refcount is %u, expected 1\n", ref);