ddraw: Release the surface clipper (if any) in ddraw_surface_wined3d_object_destroyed() (Valgrind).

This commit is contained in:
Henri Verbeet 2015-04-29 17:27:34 +02:00 committed by Alexandre Julliard
parent eb27944e78
commit 4a416f8d37
5 changed files with 15 additions and 4 deletions

View File

@ -5615,6 +5615,9 @@ static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *paren
/* Reduce the ddraw surface count. */
list_remove(&surface->surface_list_entry);
if (surface->clipper)
IDirectDrawClipper_Release(&surface->clipper->IDirectDrawClipper_iface);
if (surface == surface->ddraw->primary)
surface->ddraw->primary = NULL;

View File

@ -627,6 +627,7 @@ static void test_clipper_blt(void)
IDirectDraw *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
@ -819,7 +820,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface_Release(dst_surface);
IDirectDrawSurface_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw_Release(ddraw);
}

View File

@ -521,6 +521,7 @@ static void test_clipper_blt(void)
IDirectDraw2 *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
@ -713,7 +714,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface_Release(dst_surface);
IDirectDrawSurface_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw2_Release(ddraw);
}

View File

@ -742,6 +742,7 @@ static void test_clipper_blt(void)
IDirectDraw4 *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
@ -934,7 +935,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface4_Release(dst_surface);
IDirectDrawSurface4_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw4_Release(ddraw);
}

View File

@ -666,6 +666,7 @@ static void test_clipper_blt(void)
IDirectDraw7 *ddraw;
RGNDATA *rgn_data;
D3DCOLOR color;
ULONG refcount;
HRGN r1, r2;
HWND window;
DDBLTFX fx;
@ -858,7 +859,8 @@ static void test_clipper_blt(void)
IDirectDrawSurface7_Release(dst_surface);
IDirectDrawSurface7_Release(src_surface);
IDirectDrawClipper_Release(clipper);
refcount = IDirectDrawClipper_Release(clipper);
ok(!refcount, "Clipper has %u references left.\n", refcount);
IDirectDraw7_Release(ddraw);
}