v3: Don't Unmap on Release.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/d2d1/bitmap.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/d2d1/bitmap.c b/dlls/d2d1/bitmap.c index a75a9be62be..9d9d980b4c9 100644 --- a/dlls/d2d1/bitmap.c +++ b/dlls/d2d1/bitmap.c @@ -285,9 +285,23 @@ static HRESULT STDMETHODCALLTYPE d2d_bitmap_Map(ID2D1Bitmap1 *iface, D2D1_MAP_OP
static HRESULT STDMETHODCALLTYPE d2d_bitmap_Unmap(ID2D1Bitmap1 *iface) { - FIXME("iface %p stub!\n", iface); + struct d2d_bitmap *bitmap = impl_from_ID2D1Bitmap1(iface); + ID3D11Device *device; + ID3D11DeviceContext *context;
- return E_NOTIMPL; + TRACE("iface %p.\n", iface); + + if (!bitmap->staging_resource) + return D2DERR_WRONG_STATE; + + ID3D11Resource_GetDevice(bitmap->resource, &device); + ID3D11Device_GetImmediateContext(device, &context); + ID3D11DeviceContext_Unmap(context, bitmap->staging_resource, 0); + bitmap->staging_resource = NULL; + ID3D11DeviceContext_Release(context); + ID3D11Device_Release(device); + + return S_OK; }
static const struct ID2D1Bitmap1Vtbl d2d_bitmap_vtbl =
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=115660
Your paranoid android.
=== debian11 (64 bit WoW report) ===
d2d1: d2d1: Timeout