From 9775ed22aab46b061d3a6366d2d456a80aedb177 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 29 Sep 2018 02:32:03 +0330 Subject: [PATCH] d2d1: Implement d2d_device_context_ID2D1DeviceContext_CreateBitmap(). Signed-off-by: Nikolay Sivov Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d2d1/device.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index be31ecafc8f..d1c1845171f 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1783,10 +1783,17 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBit D2D1_SIZE_U size, const void *src_data, UINT32 pitch, const D2D1_BITMAP_PROPERTIES1 *desc, ID2D1Bitmap1 **bitmap) { - FIXME("iface %p, size {%u, %u}, src_data %p, pitch %u, desc %p, bitmap %p stub!\n", + struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); + struct d2d_bitmap *object; + HRESULT hr; + + TRACE("iface %p, size {%u, %u}, src_data %p, pitch %u, desc %p, bitmap %p.\n", iface, size.width, size.height, src_data, pitch, desc, bitmap); - return E_NOTIMPL; + if (SUCCEEDED(hr = d2d_bitmap_create(context, size, src_data, pitch, desc, &object))) + *bitmap = &object->ID2D1Bitmap1_iface; + + return hr; } static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmapFromWicBitmap(