[PATCH 3/3] d2d1/tests: Test to show that WIC bitmap is locked within BeginDraw()/EndDraw()
Nikolay Sivov
nsivov at codeweavers.com
Sun Feb 12 13:14:59 CST 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/d2d1/tests/d2d1.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index fa29122aa4..dfc45dfda9 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -3928,6 +3928,7 @@ static void test_gdi_interop(void)
ID2D1GdiInteropRenderTarget *interop;
D2D1_RENDER_TARGET_PROPERTIES desc;
IWICImagingFactory *wic_factory;
+ IWICBitmapLock *wic_lock;
IWICBitmap *wic_bitmap;
ID2D1Factory *factory;
ID3D10Device1 *device;
@@ -4023,6 +4024,19 @@ todo_wine
match = compare_wic_bitmap(wic_bitmap, "60cacbf3d72e1e7834203da608037b1bf83b40e8");
ok(match, "Bitmap does not match.\n");
+ /* Bitmap is locked at BeginDraw(). */
+ hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
+ ok(SUCCEEDED(hr), "Expected bitmap to be unlocked, hr %#x.\n", hr);
+ IWICBitmapLock_Release(wic_lock);
+
+ ID2D1RenderTarget_BeginDraw(rt);
+ hr = IWICBitmap_Lock(wic_bitmap, NULL, WICBitmapLockRead, &wic_lock);
+todo_wine
+ ok(hr == WINCODEC_ERR_ALREADYLOCKED, "Expected bitmap to be locked, hr %#x.\n", hr);
+ if (SUCCEEDED(hr))
+ IWICBitmapLock_Release(wic_lock);
+ ID2D1RenderTarget_EndDraw(rt, NULL, NULL);
+
ID2D1GdiInteropRenderTarget_Release(interop);
ID2D1RenderTarget_Release(rt);
--
2.11.0
More information about the wine-patches
mailing list