d2d1/tests: Test to show that WIC bitmap is locked within BeginDraw()/EndDraw().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
71a6eeb732
commit
93959d21e9
|
@ -3971,6 +3971,7 @@ static void test_gdi_interop(void)
|
|||
ID2D1GdiInteropRenderTarget *interop;
|
||||
D2D1_RENDER_TARGET_PROPERTIES desc;
|
||||
IWICImagingFactory *wic_factory;
|
||||
IWICBitmapLock *wic_lock;
|
||||
IWICBitmap *wic_bitmap;
|
||||
ID2D1RenderTarget *rt;
|
||||
ID2D1Factory *factory;
|
||||
|
@ -4065,6 +4066,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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue