Module: wine Branch: master Commit: 827f19a690626e41f6d7265028fc58ed38e1b255 URL: https://source.winehq.org/git/wine.git/?a=commit;h=827f19a690626e41f6d726502...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Oct 3 08:53:57 2018 +0300
d2d1: Implement d2d_device_context_ID2D1DeviceContext_CreateBitmapFromWicBitmap().
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 967b90d..45b2258 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -1804,9 +1804,16 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBit ID2D1DeviceContext *iface, IWICBitmapSource *bitmap_source, const D2D1_BITMAP_PROPERTIES1 *desc, ID2D1Bitmap1 **bitmap) { - FIXME("iface %p, bitmap_source %p, desc %p, bitmap %p stub!\n", iface, bitmap_source, desc, bitmap); + struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); + struct d2d_bitmap *object; + HRESULT hr;
- return E_NOTIMPL; + TRACE("iface %p, bitmap_source %p, desc %p, bitmap %p.\n", iface, bitmap_source, desc, bitmap); + + if (SUCCEEDED(hr = d2d_bitmap_create_from_wic_bitmap(context, bitmap_source, desc, &object))) + *bitmap = &object->ID2D1Bitmap1_iface; + + return hr; }
static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContext(ID2D1DeviceContext *iface,