From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d2d1/d2d1_private.h | 4 +- dlls/d2d1/factory.c | 162 ++++++++++++++++++++++++--------------- 2 files changed, 104 insertions(+), 62 deletions(-)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 705f2182edd..680ec1bd277 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -680,7 +680,7 @@ struct d2d_effect_registration
struct d2d_factory { - ID2D1Factory3 ID2D1Factory3_iface; + ID2D1Factory7 ID2D1Factory7_iface; ID2D1Multithread ID2D1Multithread_iface; LONG refcount;
@@ -698,7 +698,7 @@ struct d2d_factory
static inline struct d2d_factory *unsafe_impl_from_ID2D1Factory(ID2D1Factory *iface) { - return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory3_iface); + return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory7_iface); }
void d2d_effects_init_builtins(struct d2d_factory *factory); diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c index e5350d7100f..1b12670bd1c 100644 --- a/dlls/d2d1/factory.c +++ b/dlls/d2d1/factory.c @@ -36,9 +36,9 @@ static void d2d_effect_registration_cleanup(struct d2d_effect_registration *reg) free(reg); }
-static inline struct d2d_factory *impl_from_ID2D1Factory3(ID2D1Factory3 *iface) +static inline struct d2d_factory *impl_from_ID2D1Factory7(ID2D1Factory7 *iface) { - return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory3_iface); + return CONTAINING_RECORD(iface, struct d2d_factory, ID2D1Factory7_iface); }
static inline struct d2d_factory *impl_from_ID2D1Multithread(ID2D1Multithread *iface) @@ -97,25 +97,29 @@ static HRESULT d2d_factory_reload_sysmetrics(struct d2d_factory *factory) return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_QueryInterface(ID2D1Factory3 *iface, REFIID iid, void **out) +static HRESULT STDMETHODCALLTYPE d2d_factory_QueryInterface(ID2D1Factory7 *iface, REFIID iid, void **out) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
- if ((IsEqualGUID(iid, &IID_ID2D1Factory3) && d2d_settings.max_version_factory >= 3) + if ((IsEqualGUID(iid, &IID_ID2D1Factory7) && d2d_settings.max_version_factory >= 7) + || (IsEqualGUID(iid, &IID_ID2D1Factory6) && d2d_settings.max_version_factory >= 6) + || (IsEqualGUID(iid, &IID_ID2D1Factory5) && d2d_settings.max_version_factory >= 5) + || (IsEqualGUID(iid, &IID_ID2D1Factory4) && d2d_settings.max_version_factory >= 4) + || (IsEqualGUID(iid, &IID_ID2D1Factory3) && d2d_settings.max_version_factory >= 3) || (IsEqualGUID(iid, &IID_ID2D1Factory2) && d2d_settings.max_version_factory >= 2) || (IsEqualGUID(iid, &IID_ID2D1Factory1) && d2d_settings.max_version_factory >= 1) || IsEqualGUID(iid, &IID_ID2D1Factory) || IsEqualGUID(iid, &IID_IUnknown)) { - ID2D1Factory3_AddRef(iface); + ID2D1Factory7_AddRef(iface); *out = iface; return S_OK; } else if (IsEqualGUID(iid, &IID_ID2D1Multithread)) { - ID2D1Factory3_AddRef(iface); + ID2D1Factory7_AddRef(iface); *out = &factory->ID2D1Multithread_iface; return S_OK; } @@ -126,9 +130,9 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_QueryInterface(ID2D1Factory3 *iface return E_NOINTERFACE; }
-static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory3 *iface) +static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory7 *iface) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); ULONG refcount = InterlockedIncrement(&factory->refcount);
TRACE("%p increasing refcount to %lu.\n", iface, refcount); @@ -136,9 +140,9 @@ static ULONG STDMETHODCALLTYPE d2d_factory_AddRef(ID2D1Factory3 *iface) return refcount; }
-static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory3 *iface) +static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory7 *iface) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); ULONG refcount = InterlockedDecrement(&factory->refcount); struct d2d_effect_registration *reg, *reg2;
@@ -159,18 +163,18 @@ static ULONG STDMETHODCALLTYPE d2d_factory_Release(ID2D1Factory3 *iface) return refcount; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_ReloadSystemMetrics(ID2D1Factory3 *iface) +static HRESULT STDMETHODCALLTYPE d2d_factory_ReloadSystemMetrics(ID2D1Factory7 *iface) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
TRACE("iface %p.\n", iface);
return d2d_factory_reload_sysmetrics(factory); }
-static void STDMETHODCALLTYPE d2d_factory_GetDesktopDpi(ID2D1Factory3 *iface, float *dpi_x, float *dpi_y) +static void STDMETHODCALLTYPE d2d_factory_GetDesktopDpi(ID2D1Factory7 *iface, float *dpi_x, float *dpi_y) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
TRACE("iface %p, dpi_x %p, dpi_y %p.\n", iface, dpi_x, dpi_y);
@@ -178,7 +182,7 @@ static void STDMETHODCALLTYPE d2d_factory_GetDesktopDpi(ID2D1Factory3 *iface, fl *dpi_y = factory->dpi_y; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factory7 *iface, const D2D1_RECT_F *rect, ID2D1RectangleGeometry **geometry) { struct d2d_geometry *object; @@ -202,7 +206,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRectangleGeometry(ID2D1Factor return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D1Factory7 *iface, const D2D1_ROUNDED_RECT *rounded_rect, ID2D1RoundedRectangleGeometry **geometry) { struct d2d_geometry *object; @@ -226,7 +230,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateRoundedRectangleGeometry(ID2D return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory7 *iface, const D2D1_ELLIPSE *ellipse, ID2D1EllipseGeometry **geometry) { struct d2d_geometry *object; @@ -250,7 +254,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateEllipseGeometry(ID2D1Factory3 return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory7 *iface, D2D1_FILL_MODE fill_mode, ID2D1Geometry **geometries, UINT32 geometry_count, ID2D1GeometryGroup **group) { struct d2d_geometry *object; @@ -275,7 +279,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGeometryGroup(ID2D1Factory3 * return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Factory7 *iface, ID2D1Geometry *src_geometry, const D2D1_MATRIX_3X2_F *transform, ID2D1TransformedGeometry **transformed_geometry) { @@ -295,7 +299,8 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateTransformedGeometry(ID2D1Fact return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory3 *iface, ID2D1PathGeometry **geometry) +static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory7 *iface, + ID2D1PathGeometry **geometry) { struct d2d_geometry *object;
@@ -312,7 +317,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry(ID2D1Factory3 *i return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory7 *iface, const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count, ID2D1StrokeStyle **stroke_style) { @@ -348,7 +353,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle(ID2D1Factory3 *if return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock(ID2D1Factory7 *iface, const D2D1_DRAWING_STATE_DESCRIPTION *desc, IDWriteRenderingParams *text_rendering_params, ID2D1DrawingStateBlock **state_block) { @@ -388,10 +393,10 @@ static HRESULT d2d_factory_get_device(struct d2d_factory *factory, ID3D10Device1 return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Factory7 *iface, IWICBitmap *target, const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1RenderTarget **render_target) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); struct d2d_wic_render_target *object; ID3D10Device1 *device; HRESULT hr; @@ -420,11 +425,11 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateWicBitmapRenderTarget(ID2D1Fa return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory7 *iface, const D2D1_RENDER_TARGET_PROPERTIES *desc, const D2D1_HWND_RENDER_TARGET_PROPERTIES *hwnd_rt_desc, ID2D1HwndRenderTarget **render_target) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); struct d2d_hwnd_render_target *object; ID3D10Device1 *device; HRESULT hr; @@ -450,7 +455,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateHwndRenderTarget(ID2D1Factory return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1Factory7 *iface, IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1RenderTarget **render_target) { IDXGIDevice *dxgi_device; @@ -479,10 +484,10 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDxgiSurfaceRenderTarget(ID2D1 return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory7 *iface, const D2D1_RENDER_TARGET_PROPERTIES *desc, ID2D1DCRenderTarget **render_target) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); struct d2d_dc_render_target *object; ID3D10Device1 *device; HRESULT hr; @@ -508,14 +513,14 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory3 return S_OK; }
-static HRESULT d2d_factory_create_device(ID2D1Factory3 *iface, IDXGIDevice *dxgi_device, +static HRESULT d2d_factory_create_device(ID2D1Factory1 *iface, IDXGIDevice *dxgi_device, ID2D1Device1 **device) { struct d2d_device *object;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
- d2d_device_init(object, (ID2D1Factory1 *)iface, dxgi_device); + d2d_device_init(object, iface, dxgi_device);
TRACE("Create device %p.\n", object); *device = &object->ID2D1Device1_iface; @@ -523,15 +528,15 @@ static HRESULT d2d_factory_create_device(ID2D1Factory3 *iface, IDXGIDevice *dxgi return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device **device) { TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device);
- return d2d_factory_create_device(iface, dxgi_device, (ID2D1Device1 **)device); + return d2d_factory_create_device((ID2D1Factory1 *)iface, dxgi_device, (ID2D1Device1 **)device); }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory7 *iface, const D2D1_STROKE_STYLE_PROPERTIES1 *desc, const float *dashes, UINT32 dash_count, ID2D1StrokeStyle1 **stroke_style) { @@ -558,7 +563,8 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory3 *i return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory3 *iface, ID2D1PathGeometry1 **geometry) +static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory7 *iface, + ID2D1PathGeometry1 **geometry) { struct d2d_geometry *object;
@@ -575,7 +581,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory3 * return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Factory7 *iface, const D2D1_DRAWING_STATE_DESCRIPTION1 *desc, IDWriteRenderingParams *text_rendering_params, ID2D1DrawingStateBlock1 **state_block) { @@ -595,7 +601,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Facto return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGdiMetafile(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_CreateGdiMetafile(ID2D1Factory7 *iface, IStream *stream, ID2D1GdiMetafile **metafile) { FIXME("iface %p, stream %p, metafile %p stub!\n", iface, stream, metafile); @@ -1029,11 +1035,11 @@ static HRESULT d2d_factory_register_effect_from_stream(struct d2d_factory *facto return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Factory7 *iface, REFCLSID effect_id, IStream *property_xml, const D2D1_PROPERTY_BINDING *bindings, UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
TRACE("iface %p, effect_id %s, property_xml %p, bindings %p, binding_count %u, effect_factory %p.\n", iface, debugstr_guid(effect_id), property_xml, bindings, binding_count, effect_factory); @@ -1076,11 +1082,11 @@ HRESULT d2d_factory_register_builtin_effect(struct d2d_factory *factory, REFCLSI binding_count, effect_factory, TRUE); }
-static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Factory7 *iface, REFCLSID effect_id, const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings, UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
TRACE("iface %p, effect_id %s, property_xml %s, bindings %p, binding_count %u, effect_factory %p.\n", iface, debugstr_guid(effect_id), debugstr_w(property_xml), bindings, binding_count, effect_factory); @@ -1091,9 +1097,9 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Facto binding_count, effect_factory, FALSE); }
-static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *iface, REFCLSID effect_id) +static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory7 *iface, REFCLSID effect_id) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); struct d2d_effect_registration *effect;
TRACE("iface %p, effect_id %s.\n", iface, debugstr_guid(effect_id)); @@ -1117,10 +1123,10 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *ifa return D2DERR_EFFECT_IS_NOT_REGISTERED; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory7 *iface, CLSID *effects, UINT32 effect_count, UINT32 *returned, UINT32 *registered) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); struct d2d_effect_registration *effect; UINT32 ret, reg;
@@ -1152,10 +1158,10 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_GetRegisteredEffects(ID2D1Factory3 return *returned == *registered ? S_OK : D2DERR_INSUFFICIENT_BUFFER; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory3 *iface, +static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory7 *iface, REFCLSID effect_id, ID2D1Properties **props) { - struct d2d_factory *factory = impl_from_ID2D1Factory3(iface); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); const struct d2d_effect_registration *reg;
TRACE("iface %p, effect_id %s, props %p.\n", iface, debugstr_guid(effect_id), props); @@ -1174,23 +1180,55 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory3 * return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory2_CreateDevice(ID2D1Factory3 *iface, IDXGIDevice *dxgi_device, - ID2D1Device1 **device) +static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory2_CreateDevice(ID2D1Factory7 *iface, + IDXGIDevice *dxgi_device, ID2D1Device1 **device) { TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device);
- return d2d_factory_create_device(iface, dxgi_device, device); + return d2d_factory_create_device((ID2D1Factory1 *)iface, dxgi_device, device); }
-static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory3_CreateDevice(ID2D1Factory3 *iface, IDXGIDevice *dxgi_device, - ID2D1Device2 **device) +static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory3_CreateDevice(ID2D1Factory7 *iface, + IDXGIDevice *dxgi_device, ID2D1Device2 **device) { FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device);
return E_NOTIMPL; }
-static const struct ID2D1Factory3Vtbl d2d_factory_vtbl = +static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory4_CreateDevice(ID2D1Factory7 *iface, + IDXGIDevice *dxgi_device, ID2D1Device3 **device) +{ + FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory5_CreateDevice(ID2D1Factory7 *iface, + IDXGIDevice *dxgi_device, ID2D1Device4 **device) +{ + FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory6_CreateDevice(ID2D1Factory7 *iface, + IDXGIDevice *dxgi_device, ID2D1Device5 **device) +{ + FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory7_CreateDevice(ID2D1Factory7 *iface, + IDXGIDevice *dxgi_device, ID2D1Device6 **device) +{ + FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + + return E_NOTIMPL; +} + +static const struct ID2D1Factory7Vtbl d2d_factory_vtbl = { d2d_factory_QueryInterface, d2d_factory_AddRef, @@ -1221,24 +1259,28 @@ static const struct ID2D1Factory3Vtbl d2d_factory_vtbl = d2d_factory_GetEffectProperties, d2d_factory_ID2D1Factory2_CreateDevice, d2d_factory_ID2D1Factory3_CreateDevice, + d2d_factory_ID2D1Factory4_CreateDevice, + d2d_factory_ID2D1Factory5_CreateDevice, + d2d_factory_ID2D1Factory6_CreateDevice, + d2d_factory_ID2D1Factory7_CreateDevice, };
static HRESULT STDMETHODCALLTYPE d2d_factory_mt_QueryInterface(ID2D1Multithread *iface, REFIID iid, void **out) { struct d2d_factory *factory = impl_from_ID2D1Multithread(iface); - return d2d_factory_QueryInterface(&factory->ID2D1Factory3_iface, iid, out); + return d2d_factory_QueryInterface(&factory->ID2D1Factory7_iface, iid, out); }
static ULONG STDMETHODCALLTYPE d2d_factory_mt_AddRef(ID2D1Multithread *iface) { struct d2d_factory *factory = impl_from_ID2D1Multithread(iface); - return d2d_factory_AddRef(&factory->ID2D1Factory3_iface); + return d2d_factory_AddRef(&factory->ID2D1Factory7_iface); }
static ULONG STDMETHODCALLTYPE d2d_factory_mt_Release(ID2D1Multithread *iface) { struct d2d_factory *factory = impl_from_ID2D1Multithread(iface); - return d2d_factory_Release(&factory->ID2D1Factory3_iface); + return d2d_factory_Release(&factory->ID2D1Factory7_iface); }
static BOOL STDMETHODCALLTYPE d2d_factory_mt_GetMultithreadProtected(ID2D1Multithread *iface) @@ -1303,7 +1345,7 @@ static void d2d_factory_init(struct d2d_factory *factory, D2D1_FACTORY_TYPE fact if (factory_options && factory_options->debugLevel != D2D1_DEBUG_LEVEL_NONE) WARN("Ignoring debug level %#x.\n", factory_options->debugLevel);
- factory->ID2D1Factory3_iface.lpVtbl = &d2d_factory_vtbl; + factory->ID2D1Factory7_iface.lpVtbl = &d2d_factory_vtbl; factory->ID2D1Multithread_iface.lpVtbl = factory_type == D2D1_FACTORY_TYPE_SINGLE_THREADED ? &d2d_factory_multithread_noop_vtbl : &d2d_factory_multithread_vtbl; factory->factory_type = factory_type; @@ -1336,8 +1378,8 @@ HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
TRACE("Created factory %p.\n", object);
- hr = ID2D1Factory3_QueryInterface(&object->ID2D1Factory3_iface, iid, factory); - ID2D1Factory3_Release(&object->ID2D1Factory3_iface); + hr = ID2D1Factory7_QueryInterface(&object->ID2D1Factory7_iface, iid, factory); + ID2D1Factory7_Release(&object->ID2D1Factory7_iface);
return hr; }
From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d2d1/command_list.c | 2 +- dlls/d2d1/d2d1_private.h | 2 +- dlls/d2d1/device.c | 528 +++++++++++++++++++++++++++++---------- dlls/d2d1/effect.c | 16 +- 4 files changed, 401 insertions(+), 147 deletions(-)
diff --git a/dlls/d2d1/command_list.c b/dlls/d2d1/command_list.c index bed650516ac..27c2bf3db41 100644 --- a/dlls/d2d1/command_list.c +++ b/dlls/d2d1/command_list.c @@ -551,7 +551,7 @@ static void d2d_command_list_reference_object(struct d2d_command_list *command_l static HRESULT d2d_command_list_create_brush(struct d2d_command_list *command_list, const struct d2d_device_context *ctx, ID2D1Brush *orig_brush, ID2D1Brush **ret) { - ID2D1DeviceContext *context = (ID2D1DeviceContext *)&ctx->ID2D1DeviceContext1_iface; + ID2D1DeviceContext *context = (ID2D1DeviceContext *)&ctx->ID2D1DeviceContext6_iface; struct d2d_brush *brush = unsafe_impl_from_ID2D1Brush(orig_brush); D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES linear_properties; D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES radial_properties; diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 680ec1bd277..7cd72f89830 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -161,7 +161,7 @@ enum d2d_device_context_target_type
struct d2d_device_context { - ID2D1DeviceContext1 ID2D1DeviceContext1_iface; + ID2D1DeviceContext6 ID2D1DeviceContext6_iface; ID2D1GdiInteropRenderTarget ID2D1GdiInteropRenderTarget_iface; IDWriteTextRenderer IDWriteTextRenderer_iface; IUnknown IUnknown_iface; diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 3cc23c0325b..03012845e61 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -209,9 +209,9 @@ static inline struct d2d_device_context *impl_from_IUnknown(IUnknown *iface) return CONTAINING_RECORD(iface, struct d2d_device_context, IUnknown_iface); }
-static inline struct d2d_device_context *impl_from_ID2D1DeviceContext(ID2D1DeviceContext1 *iface) +static inline struct d2d_device_context *impl_from_ID2D1DeviceContext(ID2D1DeviceContext6 *iface) { - return CONTAINING_RECORD(iface, struct d2d_device_context, ID2D1DeviceContext1_iface); + return CONTAINING_RECORD(iface, struct d2d_device_context, ID2D1DeviceContext6_iface); }
static HRESULT STDMETHODCALLTYPE d2d_device_context_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out) @@ -220,14 +220,19 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_inner_QueryInterface(IUnknow
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
- if (IsEqualGUID(iid, &IID_ID2D1DeviceContext1) + if (IsEqualGUID(iid, &IID_ID2D1DeviceContext6) + || IsEqualGUID(iid, &IID_ID2D1DeviceContext5) + || IsEqualGUID(iid, &IID_ID2D1DeviceContext4) + || IsEqualGUID(iid, &IID_ID2D1DeviceContext3) + || IsEqualGUID(iid, &IID_ID2D1DeviceContext2) + || IsEqualGUID(iid, &IID_ID2D1DeviceContext1) || IsEqualGUID(iid, &IID_ID2D1DeviceContext) || IsEqualGUID(iid, &IID_ID2D1RenderTarget) || IsEqualGUID(iid, &IID_ID2D1Resource) || IsEqualGUID(iid, &IID_IUnknown)) { - ID2D1DeviceContext1_AddRef(&context->ID2D1DeviceContext1_iface); - *out = &context->ID2D1DeviceContext1_iface; + ID2D1DeviceContext6_AddRef(&context->ID2D1DeviceContext6_iface); + *out = &context->ID2D1DeviceContext6_iface; return S_OK; } else if (IsEqualGUID(iid, &IID_ID2D1GdiInteropRenderTarget)) @@ -312,7 +317,8 @@ static const struct IUnknownVtbl d2d_device_context_inner_unknown_vtbl = d2d_device_context_inner_Release, };
-static HRESULT STDMETHODCALLTYPE d2d_device_context_QueryInterface(ID2D1DeviceContext1 *iface, REFIID iid, void **out) +static HRESULT STDMETHODCALLTYPE d2d_device_context_QueryInterface(ID2D1DeviceContext6 *iface, + REFIID iid, void **out) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -321,7 +327,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_QueryInterface(ID2D1DeviceCo return IUnknown_QueryInterface(context->outer_unknown, iid, out); }
-static ULONG STDMETHODCALLTYPE d2d_device_context_AddRef(ID2D1DeviceContext1 *iface) +static ULONG STDMETHODCALLTYPE d2d_device_context_AddRef(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -330,7 +336,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_AddRef(ID2D1DeviceContext1 *if return IUnknown_AddRef(context->outer_unknown); }
-static ULONG STDMETHODCALLTYPE d2d_device_context_Release(ID2D1DeviceContext1 *iface) +static ULONG STDMETHODCALLTYPE d2d_device_context_Release(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -339,7 +345,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_Release(ID2D1DeviceContext1 *i return IUnknown_Release(context->outer_unknown); }
-static void STDMETHODCALLTYPE d2d_device_context_GetFactory(ID2D1DeviceContext1 *iface, ID2D1Factory **factory) +static void STDMETHODCALLTYPE d2d_device_context_GetFactory(ID2D1DeviceContext6 *iface, ID2D1Factory **factory) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -349,7 +355,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetFactory(ID2D1DeviceContext1 ID2D1Factory_AddRef(*factory); }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmap(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmap(ID2D1DeviceContext6 *iface, D2D1_SIZE_U size, const void *src_data, UINT32 pitch, const D2D1_BITMAP_PROPERTIES *desc, ID2D1Bitmap **bitmap) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -373,7 +379,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmap(ID2D1DeviceCont return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromWicBitmap(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromWicBitmap(ID2D1DeviceContext6 *iface, IWICBitmapSource *bitmap_source, const D2D1_BITMAP_PROPERTIES *desc, ID2D1Bitmap **bitmap) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -397,7 +403,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromWicBitmap(ID return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSharedBitmap(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSharedBitmap(ID2D1DeviceContext6 *iface, REFIID iid, void *data, const D2D1_BITMAP_PROPERTIES *desc, ID2D1Bitmap **bitmap) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -424,7 +430,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSharedBitmap(ID2D1Devi return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapBrush(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapBrush(ID2D1DeviceContext6 *iface, ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES *bitmap_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1BitmapBrush **brush) { @@ -442,7 +448,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapBrush(ID2D1Devic return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSolidColorBrush(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSolidColorBrush(ID2D1DeviceContext6 *iface, const D2D1_COLOR_F *color, const D2D1_BRUSH_PROPERTIES *desc, ID2D1SolidColorBrush **brush) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -457,7 +463,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSolidColorBrush(ID2D1D return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateGradientStopCollection(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateGradientStopCollection(ID2D1DeviceContext6 *iface, const D2D1_GRADIENT_STOP *stops, UINT32 stop_count, D2D1_GAMMA gamma, D2D1_EXTEND_MODE extend_mode, ID2D1GradientStopCollection **gradient) { @@ -475,7 +481,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateGradientStopCollection return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLinearGradientBrush(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLinearGradientBrush(ID2D1DeviceContext6 *iface, const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1GradientStopCollection *gradient, ID2D1LinearGradientBrush **brush) { @@ -493,7 +499,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLinearGradientBrush(ID return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateRadialGradientBrush(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateRadialGradientBrush(ID2D1DeviceContext6 *iface, const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1GradientStopCollection *gradient, ID2D1RadialGradientBrush **brush) { @@ -511,7 +517,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateRadialGradientBrush(ID return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCompatibleRenderTarget(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCompatibleRenderTarget(ID2D1DeviceContext6 *iface, const D2D1_SIZE_F *size, const D2D1_SIZE_U *pixel_size, const D2D1_PIXEL_FORMAT *format, D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options, ID2D1BitmapRenderTarget **rt) { @@ -539,7 +545,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCompatibleRenderTarget return S_OK; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLayer(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLayer(ID2D1DeviceContext6 *iface, const D2D1_SIZE_F *size, ID2D1Layer **layer) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -554,7 +560,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLayer(ID2D1DeviceConte return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateMesh(ID2D1DeviceContext1 *iface, ID2D1Mesh **mesh) +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateMesh(ID2D1DeviceContext6 *iface, ID2D1Mesh **mesh) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); struct d2d_mesh *object; @@ -568,7 +574,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateMesh(ID2D1DeviceContex return hr; }
-static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext6 *iface, D2D1_POINT_2F p0, D2D1_POINT_2F p1, ID2D1Brush *brush, float stroke_width, ID2D1StrokeStyle *stroke_style) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -605,11 +611,11 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawLine(ID2D1DeviceContext1 *i WARN("Failed to close geometry sink, hr %#lx.\n", hr); ID2D1GeometrySink_Release(sink);
- ID2D1DeviceContext1_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); + ID2D1DeviceContext6_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); ID2D1PathGeometry_Release(geometry); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawRectangle(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawRectangle(ID2D1DeviceContext6 *iface, const D2D1_RECT_F *rect, ID2D1Brush *brush, float stroke_width, ID2D1StrokeStyle *stroke_style) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -631,11 +637,11 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRectangle(ID2D1DeviceContex return; }
- ID2D1DeviceContext1_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); + ID2D1DeviceContext6_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); ID2D1RectangleGeometry_Release(geometry); }
-static void STDMETHODCALLTYPE d2d_device_context_FillRectangle(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_FillRectangle(ID2D1DeviceContext6 *iface, const D2D1_RECT_F *rect, ID2D1Brush *brush) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -656,11 +662,11 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRectangle(ID2D1DeviceContex return; }
- ID2D1DeviceContext1_FillGeometry(iface, (ID2D1Geometry *)geometry, brush, NULL); + ID2D1DeviceContext6_FillGeometry(iface, (ID2D1Geometry *)geometry, brush, NULL); ID2D1RectangleGeometry_Release(geometry); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawRoundedRectangle(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawRoundedRectangle(ID2D1DeviceContext6 *iface, const D2D1_ROUNDED_RECT *rect, ID2D1Brush *brush, float stroke_width, ID2D1StrokeStyle *stroke_style) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -676,11 +682,11 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawRoundedRectangle(ID2D1Devic return; }
- ID2D1DeviceContext1_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); + ID2D1DeviceContext6_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); ID2D1RoundedRectangleGeometry_Release(geometry); }
-static void STDMETHODCALLTYPE d2d_device_context_FillRoundedRectangle(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_FillRoundedRectangle(ID2D1DeviceContext6 *iface, const D2D1_ROUNDED_RECT *rect, ID2D1Brush *brush) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -695,11 +701,11 @@ static void STDMETHODCALLTYPE d2d_device_context_FillRoundedRectangle(ID2D1Devic return; }
- ID2D1DeviceContext1_FillGeometry(iface, (ID2D1Geometry *)geometry, brush, NULL); + ID2D1DeviceContext6_FillGeometry(iface, (ID2D1Geometry *)geometry, brush, NULL); ID2D1RoundedRectangleGeometry_Release(geometry); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawEllipse(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawEllipse(ID2D1DeviceContext6 *iface, const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush, float stroke_width, ID2D1StrokeStyle *stroke_style) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -715,11 +721,11 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawEllipse(ID2D1DeviceContext1 return; }
- ID2D1DeviceContext1_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); + ID2D1DeviceContext6_DrawGeometry(iface, (ID2D1Geometry *)geometry, brush, stroke_width, stroke_style); ID2D1EllipseGeometry_Release(geometry); }
-static void STDMETHODCALLTYPE d2d_device_context_FillEllipse(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_FillEllipse(ID2D1DeviceContext6 *iface, const D2D1_ELLIPSE *ellipse, ID2D1Brush *brush) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -734,7 +740,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillEllipse(ID2D1DeviceContext1 return; }
- ID2D1DeviceContext1_FillGeometry(iface, (ID2D1Geometry *)geometry, brush, NULL); + ID2D1DeviceContext6_FillGeometry(iface, (ID2D1Geometry *)geometry, brush, NULL); ID2D1EllipseGeometry_Release(geometry); }
@@ -943,7 +949,7 @@ static void d2d_device_context_draw_geometry(struct d2d_device_context *render_t } }
-static void STDMETHODCALLTYPE d2d_device_context_DrawGeometry(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawGeometry(ID2D1DeviceContext6 *iface, ID2D1Geometry *geometry, ID2D1Brush *brush, float stroke_width, ID2D1StrokeStyle *stroke_style) { const struct d2d_geometry *geometry_impl = unsafe_impl_from_ID2D1Geometry(geometry); @@ -1068,7 +1074,7 @@ static void d2d_device_context_fill_geometry(struct d2d_device_context *render_t } }
-static void STDMETHODCALLTYPE d2d_device_context_FillGeometry(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_FillGeometry(ID2D1DeviceContext6 *iface, ID2D1Geometry *geometry, ID2D1Brush *brush, ID2D1Brush *opacity_brush) { const struct d2d_geometry *geometry_impl = unsafe_impl_from_ID2D1Geometry(geometry); @@ -1093,7 +1099,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillGeometry(ID2D1DeviceContext d2d_device_context_fill_geometry(context, geometry_impl, brush_impl, opacity_brush_impl); }
-static void STDMETHODCALLTYPE d2d_device_context_FillMesh(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_FillMesh(ID2D1DeviceContext6 *iface, ID2D1Mesh *mesh, ID2D1Brush *brush) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1104,7 +1110,7 @@ static void STDMETHODCALLTYPE d2d_device_context_FillMesh(ID2D1DeviceContext1 *i d2d_command_list_fill_mesh(context->target.command_list, context, mesh, brush); }
-static void STDMETHODCALLTYPE d2d_device_context_FillOpacityMask(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_FillOpacityMask(ID2D1DeviceContext6 *iface, ID2D1Bitmap *mask, ID2D1Brush *brush, D2D1_OPACITY_MASK_CONTENT content, const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect) { @@ -1196,11 +1202,11 @@ static void d2d_device_context_draw_bitmap(struct d2d_device_context *context, I return; }
- d2d_device_context_FillRectangle(&context->ID2D1DeviceContext1_iface, &d, &brush->ID2D1Brush_iface); + d2d_device_context_FillRectangle(&context->ID2D1DeviceContext6_iface, &d, &brush->ID2D1Brush_iface); ID2D1Brush_Release(&brush->ID2D1Brush_iface); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawBitmap(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawBitmap(ID2D1DeviceContext6 *iface, ID2D1Bitmap *bitmap, const D2D1_RECT_F *dst_rect, float opacity, D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode, const D2D1_RECT_F *src_rect) { @@ -1228,7 +1234,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawBitmap(ID2D1DeviceContext1 } }
-static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext6 *iface, const WCHAR *string, UINT32 string_len, IDWriteTextFormat *text_format, const D2D1_RECT_F *layout_rect, ID2D1Brush *brush, D2D1_DRAW_TEXT_OPTIONS options, DWRITE_MEASURING_MODE measuring_mode) { @@ -1268,11 +1274,11 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext1 *i }
d2d_point_set(&origin, min(layout_rect->left, layout_rect->right), min(layout_rect->top, layout_rect->bottom)); - ID2D1DeviceContext1_DrawTextLayout(iface, origin, text_layout, brush, options); + ID2D1DeviceContext1_DrawTextLayout((ID2D1DeviceContext1 *)iface, origin, text_layout, brush, options); IDWriteTextLayout_Release(text_layout); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawTextLayout(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawTextLayout(ID2D1DeviceContext6 *iface, D2D1_POINT_2F origin, IDWriteTextLayout *layout, ID2D1Brush *brush, D2D1_DRAW_TEXT_OPTIONS options) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -1347,7 +1353,7 @@ static void d2d_device_context_draw_glyph_run_outline(struct d2d_device_context ID2D1PathGeometry_Release(geometry); }
-static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *render_target, +static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *context, D2D1_POINT_2F baseline_origin, const DWRITE_GLYPH_RUN *glyph_run, ID2D1Brush *brush, DWRITE_RENDERING_MODE rendering_mode, DWRITE_MEASURING_MODE measuring_mode, DWRITE_TEXT_ANTIALIAS_MODE antialias_mode) @@ -1376,14 +1382,14 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * return; }
- transform = &render_target->drawing_state.transform; + transform = &context->drawing_state.transform;
- scale_x = render_target->desc.dpiX / 96.0f; + scale_x = context->desc.dpiX / 96.0f; m._11 = transform->_11 * scale_x; m._21 = transform->_21 * scale_x; m._31 = transform->_31 * scale_x;
- scale_y = render_target->desc.dpiY / 96.0f; + scale_y = context->desc.dpiY / 96.0f; m._12 = transform->_12 * scale_y; m._22 = transform->_22 * scale_y; m._32 = transform->_32 * scale_y; @@ -1434,11 +1440,11 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
bitmap_desc.pixelFormat.format = DXGI_FORMAT_A8_UNORM; bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; - bitmap_desc.dpiX = render_target->desc.dpiX; + bitmap_desc.dpiX = context->desc.dpiX; if (texture_type == DWRITE_TEXTURE_CLEARTYPE_3x1) bitmap_desc.dpiX *= 3.0f; - bitmap_desc.dpiY = render_target->desc.dpiY; - if (FAILED(hr = d2d_device_context_CreateBitmap(&render_target->ID2D1DeviceContext1_iface, + bitmap_desc.dpiY = context->desc.dpiY; + if (FAILED(hr = d2d_device_context_CreateBitmap(&context->ID2D1DeviceContext6_iface, bitmap_size, opacity_values, bitmap_size.width, &bitmap_desc, &opacity_bitmap))) { ERR("Failed to create opacity bitmap, hr %#lx.\n", hr); @@ -1455,14 +1461,14 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context * brush_desc.transform._22 = 1.0f; brush_desc.transform._31 = run_rect.left; brush_desc.transform._32 = run_rect.top; - if (FAILED(hr = d2d_device_context_CreateBitmapBrush(&render_target->ID2D1DeviceContext1_iface, + if (FAILED(hr = d2d_device_context_CreateBitmapBrush(&context->ID2D1DeviceContext6_iface, opacity_bitmap, NULL, &brush_desc, &opacity_brush))) { ERR("Failed to create opacity bitmap brush, hr %#lx.\n", hr); goto done; }
- if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(render_target->factory, &run_rect, &geometry))) + if (FAILED(hr = ID2D1Factory_CreateRectangleGeometry(context->factory, &run_rect, &geometry))) { ERR("Failed to create geometry, hr %#lx.\n", hr); goto done; @@ -1470,7 +1476,7 @@ static void d2d_device_context_draw_glyph_run_bitmap(struct d2d_device_context *
m = *transform; *transform = identity; - d2d_device_context_fill_geometry(render_target, unsafe_impl_from_ID2D1Geometry((ID2D1Geometry *)geometry), + d2d_device_context_fill_geometry(context, unsafe_impl_from_ID2D1Geometry((ID2D1Geometry *)geometry), unsafe_impl_from_ID2D1Brush(brush), unsafe_impl_from_ID2D1Brush((ID2D1Brush *)opacity_brush)); *transform = m;
@@ -1575,7 +1581,7 @@ static void d2d_device_context_draw_glyph_run(struct d2d_device_context *context rendering_mode, measuring_mode, antialias_mode); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawGlyphRun(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawGlyphRun(ID2D1DeviceContext6 *iface, D2D1_POINT_2F baseline_origin, const DWRITE_GLYPH_RUN *glyph_run, ID2D1Brush *brush, DWRITE_MEASURING_MODE measuring_mode) { @@ -1587,7 +1593,7 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawGlyphRun(ID2D1DeviceContext d2d_device_context_draw_glyph_run(context, baseline_origin, glyph_run, NULL, brush, measuring_mode); }
-static void STDMETHODCALLTYPE d2d_device_context_SetTransform(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SetTransform(ID2D1DeviceContext6 *iface, const D2D1_MATRIX_3X2_F *transform) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1600,7 +1606,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTransform(ID2D1DeviceContext context->drawing_state.transform = *transform; }
-static void STDMETHODCALLTYPE d2d_device_context_GetTransform(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_GetTransform(ID2D1DeviceContext6 *iface, D2D1_MATRIX_3X2_F *transform) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -1610,7 +1616,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetTransform(ID2D1DeviceContext *transform = render_target->drawing_state.transform; }
-static void STDMETHODCALLTYPE d2d_device_context_SetAntialiasMode(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SetAntialiasMode(ID2D1DeviceContext6 *iface, D2D1_ANTIALIAS_MODE antialias_mode) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1623,7 +1629,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetAntialiasMode(ID2D1DeviceCon context->drawing_state.antialiasMode = antialias_mode; }
-static D2D1_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_device_context_GetAntialiasMode(ID2D1DeviceContext1 *iface) +static D2D1_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_device_context_GetAntialiasMode(ID2D1DeviceContext6 *iface) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -1632,7 +1638,7 @@ static D2D1_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_device_context_GetAntialiasMode return render_target->drawing_state.antialiasMode; }
-static void STDMETHODCALLTYPE d2d_device_context_SetTextAntialiasMode(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SetTextAntialiasMode(ID2D1DeviceContext6 *iface, D2D1_TEXT_ANTIALIAS_MODE antialias_mode) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1645,7 +1651,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTextAntialiasMode(ID2D1Devic context->drawing_state.textAntialiasMode = antialias_mode; }
-static D2D1_TEXT_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_device_context_GetTextAntialiasMode(ID2D1DeviceContext1 *iface) +static D2D1_TEXT_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_device_context_GetTextAntialiasMode(ID2D1DeviceContext6 *iface) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -1654,7 +1660,7 @@ static D2D1_TEXT_ANTIALIAS_MODE STDMETHODCALLTYPE d2d_device_context_GetTextAnti return render_target->drawing_state.textAntialiasMode; }
-static void STDMETHODCALLTYPE d2d_device_context_SetTextRenderingParams(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SetTextRenderingParams(ID2D1DeviceContext6 *iface, IDWriteRenderingParams *text_rendering_params) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1671,7 +1677,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTextRenderingParams(ID2D1Dev context->text_rendering_params = text_rendering_params; }
-static void STDMETHODCALLTYPE d2d_device_context_GetTextRenderingParams(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_GetTextRenderingParams(ID2D1DeviceContext6 *iface, IDWriteRenderingParams **text_rendering_params) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -1682,7 +1688,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetTextRenderingParams(ID2D1Dev IDWriteRenderingParams_AddRef(*text_rendering_params); }
-static void STDMETHODCALLTYPE d2d_device_context_SetTags(ID2D1DeviceContext1 *iface, D2D1_TAG tag1, D2D1_TAG tag2) +static void STDMETHODCALLTYPE d2d_device_context_SetTags(ID2D1DeviceContext6 *iface, D2D1_TAG tag1, D2D1_TAG tag2) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -1695,7 +1701,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTags(ID2D1DeviceContext1 *if context->drawing_state.tag2 = tag2; }
-static void STDMETHODCALLTYPE d2d_device_context_GetTags(ID2D1DeviceContext1 *iface, D2D1_TAG *tag1, D2D1_TAG *tag2) +static void STDMETHODCALLTYPE d2d_device_context_GetTags(ID2D1DeviceContext6 *iface, D2D1_TAG *tag1, D2D1_TAG *tag2) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -1705,7 +1711,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetTags(ID2D1DeviceContext1 *if *tag2 = render_target->drawing_state.tag2; }
-static void STDMETHODCALLTYPE d2d_device_context_PushLayer(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_PushLayer(ID2D1DeviceContext6 *iface, const D2D1_LAYER_PARAMETERS *layer_parameters, ID2D1Layer *layer) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1722,7 +1728,7 @@ static void STDMETHODCALLTYPE d2d_device_context_PushLayer(ID2D1DeviceContext1 * } }
-static void STDMETHODCALLTYPE d2d_device_context_PopLayer(ID2D1DeviceContext1 *iface) +static void STDMETHODCALLTYPE d2d_device_context_PopLayer(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -1732,7 +1738,7 @@ static void STDMETHODCALLTYPE d2d_device_context_PopLayer(ID2D1DeviceContext1 *i d2d_command_list_pop_layer(context->target.command_list); }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_Flush(ID2D1DeviceContext1 *iface, D2D1_TAG *tag1, D2D1_TAG *tag2) +static HRESULT STDMETHODCALLTYPE d2d_device_context_Flush(ID2D1DeviceContext6 *iface, D2D1_TAG *tag1, D2D1_TAG *tag2) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -1744,7 +1750,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_Flush(ID2D1DeviceContext1 *i return E_NOTIMPL; }
-static void STDMETHODCALLTYPE d2d_device_context_SaveDrawingState(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SaveDrawingState(ID2D1DeviceContext6 *iface, ID2D1DrawingStateBlock *state_block) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -1761,7 +1767,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SaveDrawingState(ID2D1DeviceCon state_block_impl->text_rendering_params = render_target->text_rendering_params; }
-static void STDMETHODCALLTYPE d2d_device_context_RestoreDrawingState(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_RestoreDrawingState(ID2D1DeviceContext6 *iface, ID2D1DrawingStateBlock *state_block) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1792,7 +1798,7 @@ static void STDMETHODCALLTYPE d2d_device_context_RestoreDrawingState(ID2D1Device context->text_rendering_params = state_block_impl->text_rendering_params; }
-static void STDMETHODCALLTYPE d2d_device_context_PushAxisAlignedClip(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_PushAxisAlignedClip(ID2D1DeviceContext6 *iface, const D2D1_RECT_F *clip_rect, D2D1_ANTIALIAS_MODE antialias_mode) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1827,7 +1833,7 @@ static void STDMETHODCALLTYPE d2d_device_context_PushAxisAlignedClip(ID2D1Device WARN("Failed to push clip rect.\n"); }
-static void STDMETHODCALLTYPE d2d_device_context_PopAxisAlignedClip(ID2D1DeviceContext1 *iface) +static void STDMETHODCALLTYPE d2d_device_context_PopAxisAlignedClip(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -1839,7 +1845,7 @@ static void STDMETHODCALLTYPE d2d_device_context_PopAxisAlignedClip(ID2D1DeviceC d2d_clip_stack_pop(&context->clip_stack); }
-static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext1 *iface, const D2D1_COLOR_F *colour) +static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext6 *iface, const D2D1_COLOR_F *colour) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); D3D11_MAPPED_SUBRESOURCE map_desc; @@ -1916,7 +1922,7 @@ static void STDMETHODCALLTYPE d2d_device_context_Clear(ID2D1DeviceContext1 *ifac context->vb, context->vb_stride, NULL, NULL); }
-static void STDMETHODCALLTYPE d2d_device_context_BeginDraw(ID2D1DeviceContext1 *iface) +static void STDMETHODCALLTYPE d2d_device_context_BeginDraw(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -1928,7 +1934,7 @@ static void STDMETHODCALLTYPE d2d_device_context_BeginDraw(ID2D1DeviceContext1 * memset(&context->error, 0, sizeof(context->error)); }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_EndDraw(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_EndDraw(ID2D1DeviceContext6 *iface, D2D1_TAG *tag1, D2D1_TAG *tag2) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -1956,7 +1962,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_EndDraw(ID2D1DeviceContext1 return context->error.code; }
-static D2D1_PIXEL_FORMAT * STDMETHODCALLTYPE d2d_device_context_GetPixelFormat(ID2D1DeviceContext1 *iface, +static D2D1_PIXEL_FORMAT * STDMETHODCALLTYPE d2d_device_context_GetPixelFormat(ID2D1DeviceContext6 *iface, D2D1_PIXEL_FORMAT *format) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -1967,7 +1973,7 @@ static D2D1_PIXEL_FORMAT * STDMETHODCALLTYPE d2d_device_context_GetPixelFormat(I return format; }
-static void STDMETHODCALLTYPE d2d_device_context_SetDpi(ID2D1DeviceContext1 *iface, float dpi_x, float dpi_y) +static void STDMETHODCALLTYPE d2d_device_context_SetDpi(ID2D1DeviceContext6 *iface, float dpi_x, float dpi_y) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -1985,7 +1991,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetDpi(ID2D1DeviceContext1 *ifa render_target->desc.dpiY = dpi_y; }
-static void STDMETHODCALLTYPE d2d_device_context_GetDpi(ID2D1DeviceContext1 *iface, float *dpi_x, float *dpi_y) +static void STDMETHODCALLTYPE d2d_device_context_GetDpi(ID2D1DeviceContext6 *iface, float *dpi_x, float *dpi_y) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -1995,7 +2001,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetDpi(ID2D1DeviceContext1 *ifa *dpi_y = render_target->desc.dpiY; }
-static D2D1_SIZE_F * STDMETHODCALLTYPE d2d_device_context_GetSize(ID2D1DeviceContext1 *iface, D2D1_SIZE_F *size) +static D2D1_SIZE_F * STDMETHODCALLTYPE d2d_device_context_GetSize(ID2D1DeviceContext6 *iface, D2D1_SIZE_F *size) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface);
@@ -2006,7 +2012,7 @@ static D2D1_SIZE_F * STDMETHODCALLTYPE d2d_device_context_GetSize(ID2D1DeviceCon return size; }
-static D2D1_SIZE_U * STDMETHODCALLTYPE d2d_device_context_GetPixelSize(ID2D1DeviceContext1 *iface, +static D2D1_SIZE_U * STDMETHODCALLTYPE d2d_device_context_GetPixelSize(ID2D1DeviceContext6 *iface, D2D1_SIZE_U *pixel_size) { struct d2d_device_context *render_target = impl_from_ID2D1DeviceContext(iface); @@ -2017,14 +2023,14 @@ static D2D1_SIZE_U * STDMETHODCALLTYPE d2d_device_context_GetPixelSize(ID2D1Devi return pixel_size; }
-static UINT32 STDMETHODCALLTYPE d2d_device_context_GetMaximumBitmapSize(ID2D1DeviceContext1 *iface) +static UINT32 STDMETHODCALLTYPE d2d_device_context_GetMaximumBitmapSize(ID2D1DeviceContext6 *iface) { TRACE("iface %p.\n", iface);
return D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION; }
-static BOOL STDMETHODCALLTYPE d2d_device_context_IsSupported(ID2D1DeviceContext1 *iface, +static BOOL STDMETHODCALLTYPE d2d_device_context_IsSupported(ID2D1DeviceContext6 *iface, const D2D1_RENDER_TARGET_PROPERTIES *desc) { FIXME("iface %p, desc %p stub!\n", iface, desc); @@ -2032,7 +2038,7 @@ static BOOL STDMETHODCALLTYPE d2d_device_context_IsSupported(ID2D1DeviceContext1 return FALSE; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmap(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmap(ID2D1DeviceContext6 *iface, D2D1_SIZE_U size, const void *src_data, UINT32 pitch, const D2D1_BITMAP_PROPERTIES1 *desc, ID2D1Bitmap1 **bitmap) { @@ -2050,7 +2056,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBit }
static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmapFromWicBitmap( - ID2D1DeviceContext1 *iface, IWICBitmapSource *bitmap_source, + ID2D1DeviceContext6 *iface, IWICBitmapSource *bitmap_source, const D2D1_BITMAP_PROPERTIES1 *desc, ID2D1Bitmap1 **bitmap) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2065,7 +2071,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBit return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContext(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContext(ID2D1DeviceContext6 *iface, D2D1_COLOR_SPACE space, const BYTE *profile, UINT32 profile_size, ID2D1ColorContext **color_context) { FIXME("iface %p, space %#x, profile %p, profile_size %u, color_context %p stub!\n", @@ -2074,7 +2080,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContext(ID2D1Devi return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromFilename(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromFilename(ID2D1DeviceContext6 *iface, const WCHAR *filename, ID2D1ColorContext **color_context) { FIXME("iface %p, filename %s, color_context %p stub!\n", iface, debugstr_w(filename), color_context); @@ -2082,7 +2088,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromFilena return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromWicColorContext(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromWicColorContext(ID2D1DeviceContext6 *iface, IWICColorContext *wic_color_context, ID2D1ColorContext **color_context) { FIXME("iface %p, wic_color_context %p, color_context %p stub!\n", iface, wic_color_context, color_context); @@ -2130,7 +2136,7 @@ static BOOL d2d_bitmap_check_options_with_surface(unsigned int options, unsigned return TRUE; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface(ID2D1DeviceContext6 *iface, IDXGISurface *surface, const D2D1_BITMAP_PROPERTIES1 *desc, ID2D1Bitmap1 **bitmap) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2175,7 +2181,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateBitmapFromDxgiSurface( return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceContext6 *iface, REFCLSID effect_id, ID2D1Effect **effect) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2186,7 +2192,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateEffect(ID2D1DeviceCont }
static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateGradientStopCollection( - ID2D1DeviceContext1 *iface, const D2D1_GRADIENT_STOP *stops, UINT32 stop_count, + ID2D1DeviceContext6 *iface, const D2D1_GRADIENT_STOP *stops, UINT32 stop_count, D2D1_COLOR_SPACE preinterpolation_space, D2D1_COLOR_SPACE postinterpolation_space, D2D1_BUFFER_PRECISION buffer_precision, D2D1_EXTEND_MODE extend_mode, D2D1_COLOR_INTERPOLATION_MODE color_interpolation_mode, ID2D1GradientStopCollection1 **gradient) @@ -2199,7 +2205,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateGra return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateImageBrush(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateImageBrush(ID2D1DeviceContext6 *iface, ID2D1Image *image, const D2D1_IMAGE_BRUSH_PROPERTIES *image_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1ImageBrush **brush) { @@ -2217,7 +2223,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateImageBrush(ID2D1Device return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmapBrush(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBitmapBrush(ID2D1DeviceContext6 *iface, ID2D1Bitmap *bitmap, const D2D1_BITMAP_BRUSH_PROPERTIES1 *bitmap_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc, ID2D1BitmapBrush1 **brush) { @@ -2234,7 +2240,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_CreateBit return hr; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCommandList(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCommandList(ID2D1DeviceContext6 *iface, ID2D1CommandList **command_list) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2249,14 +2255,14 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateCommandList(ID2D1Devic return hr; }
-static BOOL STDMETHODCALLTYPE d2d_device_context_IsDxgiFormatSupported(ID2D1DeviceContext1 *iface, DXGI_FORMAT format) +static BOOL STDMETHODCALLTYPE d2d_device_context_IsDxgiFormatSupported(ID2D1DeviceContext6 *iface, DXGI_FORMAT format) { FIXME("iface %p, format %#x stub!\n", iface, format);
return FALSE; }
-static BOOL STDMETHODCALLTYPE d2d_device_context_IsBufferPrecisionSupported(ID2D1DeviceContext1 *iface, +static BOOL STDMETHODCALLTYPE d2d_device_context_IsBufferPrecisionSupported(ID2D1DeviceContext6 *iface, D2D1_BUFFER_PRECISION buffer_precision) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2286,7 +2292,7 @@ static BOOL STDMETHODCALLTYPE d2d_device_context_IsBufferPrecisionSupported(ID2D return !!(support & D3D11_FORMAT_SUPPORT_BUFFER); }
-static void STDMETHODCALLTYPE d2d_device_context_GetImageLocalBounds(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_GetImageLocalBounds(ID2D1DeviceContext6 *iface, ID2D1Image *image, D2D1_RECT_F *local_bounds) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2326,7 +2332,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetImageLocalBounds(ID2D1Device } }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_GetImageWorldBounds(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetImageWorldBounds(ID2D1DeviceContext6 *iface, ID2D1Image *image, D2D1_RECT_F *world_bounds) { FIXME("iface %p, image %p, world_bounds %p stub!\n", iface, image, world_bounds); @@ -2334,7 +2340,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_GetImageWorldBounds(ID2D1Dev return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_GetGlyphRunWorldBounds(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetGlyphRunWorldBounds(ID2D1DeviceContext6 *iface, D2D1_POINT_2F baseline_origin, const DWRITE_GLYPH_RUN *glyph_run, DWRITE_MEASURING_MODE measuring_mode, D2D1_RECT_F *bounds) { @@ -2344,7 +2350,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_GetGlyphRunWorldBounds(ID2D1 return E_NOTIMPL; }
-static void STDMETHODCALLTYPE d2d_device_context_GetDevice(ID2D1DeviceContext1 *iface, ID2D1Device **device) +static void STDMETHODCALLTYPE d2d_device_context_GetDevice(ID2D1DeviceContext6 *iface, ID2D1Device **device) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -2371,7 +2377,7 @@ static void d2d_device_context_reset_target(struct d2d_device_context *context) context->bs = NULL; }
-static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext1 *iface, ID2D1Image *target) +static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext6 *iface, ID2D1Image *target) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); struct d2d_command_list *command_list_impl; @@ -2438,7 +2444,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetTarget(ID2D1DeviceContext1 * } }
-static void STDMETHODCALLTYPE d2d_device_context_GetTarget(ID2D1DeviceContext1 *iface, ID2D1Image **target) +static void STDMETHODCALLTYPE d2d_device_context_GetTarget(ID2D1DeviceContext6 *iface, ID2D1Image **target) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -2449,19 +2455,19 @@ static void STDMETHODCALLTYPE d2d_device_context_GetTarget(ID2D1DeviceContext1 * ID2D1Image_AddRef(*target); }
-static void STDMETHODCALLTYPE d2d_device_context_SetRenderingControls(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SetRenderingControls(ID2D1DeviceContext6 *iface, const D2D1_RENDERING_CONTROLS *rendering_controls) { FIXME("iface %p, rendering_controls %p stub!\n", iface, rendering_controls); }
-static void STDMETHODCALLTYPE d2d_device_context_GetRenderingControls(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_GetRenderingControls(ID2D1DeviceContext6 *iface, D2D1_RENDERING_CONTROLS *rendering_controls) { FIXME("iface %p, rendering_controls %p stub!\n", iface, rendering_controls); }
-static void STDMETHODCALLTYPE d2d_device_context_SetPrimitiveBlend(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_SetPrimitiveBlend(ID2D1DeviceContext6 *iface, D2D1_PRIMITIVE_BLEND primitive_blend) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2480,7 +2486,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetPrimitiveBlend(ID2D1DeviceCo context->drawing_state.primitiveBlend = primitive_blend; }
-static D2D1_PRIMITIVE_BLEND STDMETHODCALLTYPE d2d_device_context_GetPrimitiveBlend(ID2D1DeviceContext1 *iface) +static D2D1_PRIMITIVE_BLEND STDMETHODCALLTYPE d2d_device_context_GetPrimitiveBlend(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -2489,7 +2495,7 @@ static D2D1_PRIMITIVE_BLEND STDMETHODCALLTYPE d2d_device_context_GetPrimitiveBle return context->drawing_state.primitiveBlend; }
-static void STDMETHODCALLTYPE d2d_device_context_SetUnitMode(ID2D1DeviceContext1 *iface, D2D1_UNIT_MODE unit_mode) +static void STDMETHODCALLTYPE d2d_device_context_SetUnitMode(ID2D1DeviceContext6 *iface, D2D1_UNIT_MODE unit_mode) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -2507,7 +2513,7 @@ static void STDMETHODCALLTYPE d2d_device_context_SetUnitMode(ID2D1DeviceContext1 context->drawing_state.unitMode = unit_mode; }
-static D2D1_UNIT_MODE STDMETHODCALLTYPE d2d_device_context_GetUnitMode(ID2D1DeviceContext1 *iface) +static D2D1_UNIT_MODE STDMETHODCALLTYPE d2d_device_context_GetUnitMode(ID2D1DeviceContext6 *iface) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface);
@@ -2516,7 +2522,7 @@ static D2D1_UNIT_MODE STDMETHODCALLTYPE d2d_device_context_GetUnitMode(ID2D1Devi return context->drawing_state.unitMode; }
-static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawGlyphRun(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawGlyphRun(ID2D1DeviceContext6 *iface, D2D1_POINT_2F baseline_origin, const DWRITE_GLYPH_RUN *glyph_run, const DWRITE_GLYPH_RUN_DESCRIPTION *glyph_run_desc, ID2D1Brush *brush, DWRITE_MEASURING_MODE measuring_mode) { @@ -2528,7 +2534,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawGlyphRun d2d_device_context_draw_glyph_run(context, baseline_origin, glyph_run, glyph_run_desc, brush, measuring_mode); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawImage(ID2D1DeviceContext1 *iface, ID2D1Image *image, +static void STDMETHODCALLTYPE d2d_device_context_DrawImage(ID2D1DeviceContext6 *iface, ID2D1Image *image, const D2D1_POINT_2F *target_offset, const D2D1_RECT_F *image_rect, D2D1_INTERPOLATION_MODE interpolation_mode, D2D1_COMPOSITE_MODE composite_mode) { @@ -2560,14 +2566,14 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawImage(ID2D1DeviceContext1 * FIXME("Unhandled image %p.\n", image); }
-static void STDMETHODCALLTYPE d2d_device_context_DrawGdiMetafile(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawGdiMetafile(ID2D1DeviceContext6 *iface, ID2D1GdiMetafile *metafile, const D2D1_POINT_2F *target_offset) { FIXME("iface %p, metafile %p, target_offset %s stub!\n", iface, metafile, debug_d2d_point_2f(target_offset)); }
-static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawBitmap(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawBitmap(ID2D1DeviceContext6 *iface, ID2D1Bitmap *bitmap, const D2D1_RECT_F *dst_rect, float opacity, D2D1_INTERPOLATION_MODE interpolation_mode, const D2D1_RECT_F *src_rect, const D2D1_MATRIX_4X4_F *perspective_transform) { @@ -2590,7 +2596,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_DrawBitmap(I } }
-static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_PushLayer(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_PushLayer(ID2D1DeviceContext6 *iface, const D2D1_LAYER_PARAMETERS1 *layer_parameters, ID2D1Layer *layer) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2601,7 +2607,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_PushLayer(ID d2d_command_list_push_layer(context->target.command_list, context, layer_parameters, layer); }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_InvalidateEffectInputRectangle(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_InvalidateEffectInputRectangle(ID2D1DeviceContext6 *iface, ID2D1Effect *effect, UINT32 input, const D2D1_RECT_F *input_rect) { FIXME("iface %p, effect %p, input %u, input_rect %s stub!\n", @@ -2610,7 +2616,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_InvalidateEffectInputRectang return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectInvalidRectangleCount(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectInvalidRectangleCount(ID2D1DeviceContext6 *iface, ID2D1Effect *effect, UINT32 *rect_count) { FIXME("iface %p, effect %p, rect_count %p stub!\n", iface, effect, rect_count); @@ -2618,7 +2624,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectInvalidRectangleCou return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectInvalidRectangles(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectInvalidRectangles(ID2D1DeviceContext6 *iface, ID2D1Effect *effect, D2D1_RECT_F *rectangles, UINT32 rect_count) { FIXME("iface %p, effect %p, rectangles %p, rect_count %u stub!\n", iface, effect, rectangles, rect_count); @@ -2626,7 +2632,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectInvalidRectangles(I return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectRequiredInputRectangles(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectRequiredInputRectangles(ID2D1DeviceContext6 *iface, ID2D1Effect *effect, const D2D1_RECT_F *image_rect, const D2D1_EFFECT_INPUT_DESCRIPTION *desc, D2D1_RECT_F *input_rect, UINT32 input_count) { @@ -2636,7 +2642,7 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_GetEffectRequiredInputRectan return E_NOTIMPL; }
-static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_FillOpacityMask(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_FillOpacityMask(ID2D1DeviceContext6 *iface, ID2D1Bitmap *mask, ID2D1Brush *brush, const D2D1_RECT_F *dst_rect, const D2D1_RECT_F *src_rect) { struct d2d_device_context *context = impl_from_ID2D1DeviceContext(iface); @@ -2657,7 +2663,7 @@ static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext_FillOpacityM d2d_command_list_fill_opacity_mask(context->target.command_list, context, mask, brush, dst_rect, src_rect); }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateFilledGeometryRealization(ID2D1DeviceContext1 *iface, +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateFilledGeometryRealization(ID2D1DeviceContext6 *iface, ID2D1Geometry *geometry, float tolerance, ID2D1GeometryRealization **realization) { FIXME("iface %p, geometry %p, tolerance %.8e, realization %p stub!\n", iface, geometry, tolerance, @@ -2666,9 +2672,9 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateFilledGeometryRealizat return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateStrokedGeometryRealization(ID2D1DeviceContext1 *iface, - ID2D1Geometry *geometry, float tolerance, float stroke_width, ID2D1StrokeStyle *stroke_style, - ID2D1GeometryRealization **realization) +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateStrokedGeometryRealization( + ID2D1DeviceContext6 *iface, ID2D1Geometry *geometry, float tolerance, float stroke_width, + ID2D1StrokeStyle *stroke_style, ID2D1GeometryRealization **realization) { FIXME("iface %p, geometry %p, tolerance %.8e, stroke_width %.8e, stroke_style %p, realization %p stub!\n", iface, geometry, tolerance, stroke_width, stroke_style, realization); @@ -2676,13 +2682,236 @@ static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateStrokedGeometryRealiza return E_NOTIMPL; }
-static void STDMETHODCALLTYPE d2d_device_context_DrawGeometryRealization(ID2D1DeviceContext1 *iface, +static void STDMETHODCALLTYPE d2d_device_context_DrawGeometryRealization(ID2D1DeviceContext6 *iface, ID2D1GeometryRealization *realization, ID2D1Brush *brush) { FIXME("iface %p, realization %p, brush %p stub!\n", iface, realization, brush); }
-static const struct ID2D1DeviceContext1Vtbl d2d_device_context_vtbl = +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateInk(ID2D1DeviceContext6 *iface, + const D2D1_INK_POINT *start_point, ID2D1Ink **ink) +{ + FIXME("iface %p, start_point %p, ink %p stub!\n", iface, start_point, ink); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateInkStyle(ID2D1DeviceContext6 *iface, + const D2D1_INK_STYLE_PROPERTIES *ink_style_properties, ID2D1InkStyle **ink_style) +{ + FIXME("iface %p, ink_style_properties %p, ink_style %p stub!\n", iface, ink_style_properties, ink_style); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateGradientMesh(ID2D1DeviceContext6 *iface, + const D2D1_GRADIENT_MESH_PATCH *patches, UINT32 patches_count, + ID2D1GradientMesh **gradient_mesh) +{ + FIXME("iface %p, patches %p, patches_count %u, gradient_mesh %p stub!\n", iface, patches, + patches_count, gradient_mesh); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateImageSourceFromWic(ID2D1DeviceContext6 *iface, + IWICBitmapSource *wic_bitmap_source, D2D1_IMAGE_SOURCE_LOADING_OPTIONS loading_options, + D2D1_ALPHA_MODE alpha_mode, ID2D1ImageSourceFromWic **image_source) +{ + FIXME("iface %p, wic_bitmap_source %p, loading_options %#x, alpha_mode %u, image_source %p stub!\n", + iface, wic_bitmap_source, loading_options, alpha_mode, image_source); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateLookupTable3D(ID2D1DeviceContext6 *iface, + D2D1_BUFFER_PRECISION precision, const UINT32 *extents, const BYTE *data, + UINT32 data_count, const UINT32 *strides, ID2D1LookupTable3D **lookup_table) +{ + FIXME("iface %p, precision %u, extents %p, data %p, data_count %u, strides %p, lookup_table %p stub!\n", + iface, precision, extents, data, data_count, strides, lookup_table); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateImageSourceFromDxgi(ID2D1DeviceContext6 *iface, + IDXGISurface **surfaces, UINT32 surface_count, DXGI_COLOR_SPACE_TYPE color_space, + D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS options, ID2D1ImageSource **image_source) +{ + FIXME("iface %p, surfaces %p, surface_count %u, color_space %u, options %#x, image_source %p stub!\n", + iface, surfaces, surface_count, color_space, options, image_source); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetGradientMeshWorldBounds(ID2D1DeviceContext6 *iface, + ID2D1GradientMesh *gradient_mesh, D2D1_RECT_F *bounds) +{ + FIXME("iface %p, gradient_mesh %p, bounds %p stub!\n", iface, gradient_mesh, bounds); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_context_DrawInk(ID2D1DeviceContext6 *iface, ID2D1Ink *ink, + ID2D1Brush *brush, ID2D1InkStyle *ink_style) +{ + FIXME("iface %p, ink %p, brush %p, ink_style %p stub!\n", iface, ink, brush, ink_style); +} + +static void STDMETHODCALLTYPE d2d_device_context_DrawGradientMesh(ID2D1DeviceContext6 *iface, + ID2D1GradientMesh *gradient_mesh) +{ + FIXME("iface %p, gradient_mesh %p stub!\n", iface, gradient_mesh); +} + +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext2_DrawGdiMetafile( + ID2D1DeviceContext6 *iface, ID2D1GdiMetafile *gdi_metafile, const D2D1_RECT_F *dst_rect, + const D2D1_RECT_F *src_rect) +{ + FIXME("iface %p, gdi_metafile %p, dst_rect %s, src_rect %s stub!\n", iface, gdi_metafile, + debug_d2d_rect_f(dst_rect), debug_d2d_rect_f(src_rect)); +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateTransformedImageSource(ID2D1DeviceContext6 *iface, + ID2D1ImageSource *source, const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES *props, + ID2D1TransformedImageSource **transformed) +{ + FIXME("iface %p, source %p, props %p, transformed %p stub!\n", iface, source, props, transformed); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSpriteBatch(ID2D1DeviceContext6 *iface, + ID2D1SpriteBatch **sprite_batch) +{ + FIXME("iface %p, sprite_batch %p stub!\n", iface, sprite_batch); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_context_DrawSpriteBatch(ID2D1DeviceContext6 *iface, + ID2D1SpriteBatch *sprite_batch, UINT32 start_index, UINT32 sprite_count, ID2D1Bitmap *bitmap, + D2D1_BITMAP_INTERPOLATION_MODE interpolation_mode, D2D1_SPRITE_OPTIONS sprite_options) +{ + FIXME("iface %p, sprite_batch %p, start_index %u, sprite_count %u, bitmap %p, interpolation_mode %u," + "sprite_options %u stub!\n", iface, sprite_batch, start_index, sprite_count, bitmap, + interpolation_mode, sprite_options); +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSvgGlyphStyle(ID2D1DeviceContext6 *iface, + ID2D1SvgGlyphStyle **svg_glyph_style) +{ + FIXME("iface %p, svg_glyph_style %p stub!\n", iface, svg_glyph_style); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext4_DrawText(ID2D1DeviceContext6 *iface, + const WCHAR *string, UINT32 string_length, IDWriteTextFormat *text_format, const D2D1_RECT_F *layout_rect, + ID2D1Brush *default_fill_brush, ID2D1SvgGlyphStyle *svg_glyph_style, UINT32 color_palette_index, + D2D1_DRAW_TEXT_OPTIONS options, DWRITE_MEASURING_MODE measuring_mode) +{ + FIXME("iface %p, string %s, string_length %u, text_format %p, layout_rect %s, default_fill_brush %p," + "svg_glyph_style %p, color_palette_index %u, options %#x, measuring_mode %u stub!\n", + iface, debugstr_wn(string, string_length), string_length, text_format, debug_d2d_rect_f(layout_rect), + default_fill_brush, svg_glyph_style, color_palette_index, options, measuring_mode); +} + +static void STDMETHODCALLTYPE d2d_device_context_ID2D1DeviceContext4_DrawTextLayout(ID2D1DeviceContext6 *iface, + D2D1_POINT_2F origin, IDWriteTextLayout *text_layout, ID2D1Brush *default_fill_brush, + ID2D1SvgGlyphStyle *svg_glyph_style, UINT32 color_palette_index, D2D1_DRAW_TEXT_OPTIONS options) +{ + FIXME("iface %p, origin %s, text_layout %p, default_fill_brush %p, svg_glyph_style %p, color_palette_index %u," + "options %#x stub!\n", iface, debug_d2d_point_2f(&origin), text_layout, default_fill_brush, + svg_glyph_style, color_palette_index, options); +} + +static void STDMETHODCALLTYPE d2d_device_context_DrawColorBitmapGlyphRun(ID2D1DeviceContext6 *iface, + DWRITE_GLYPH_IMAGE_FORMATS glyph_image_format, D2D1_POINT_2F baseline_origin, const DWRITE_GLYPH_RUN *glyph_run, + DWRITE_MEASURING_MODE measuring_mode, D2D1_COLOR_BITMAP_GLYPH_SNAP_OPTION bitmap_snap_option) +{ + FIXME("iface %p, glyph_image_format %#x, baseline_origin %s, glyph_run %p, measuring_mode %u, bitmap_snap_option %#x stub!\n", + iface, glyph_image_format, debug_d2d_point_2f(&baseline_origin), glyph_run, measuring_mode, bitmap_snap_option); +} + +static void STDMETHODCALLTYPE d2d_device_context_DrawSvgGlyphRun(ID2D1DeviceContext6 *iface, + D2D1_POINT_2F baseline_origin, const DWRITE_GLYPH_RUN *glyph_run, ID2D1Brush *default_fill_brush, + ID2D1SvgGlyphStyle *svg_glyph_style, UINT32 color_palette_index, DWRITE_MEASURING_MODE measuring_mode) +{ + FIXME("iface %p, baseline_origin %s, glyph_run %p, default_fill_brush %p, svg_glyph_style %p," + "color_palette_index %u, measuring_mode %u stub!\n", iface, debug_d2d_point_2f(&baseline_origin), + glyph_run, default_fill_brush, svg_glyph_style, color_palette_index, measuring_mode); +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetColorBitmapGlyphImage(ID2D1DeviceContext6 *iface, + DWRITE_GLYPH_IMAGE_FORMATS glyph_image_format, D2D1_POINT_2F glyph_origin, IDWriteFontFace *font_face, + FLOAT font_em_size, UINT16 glyph_index, BOOL is_sideways, const D2D1_MATRIX_3X2_F *world_transform, + FLOAT dpi_x, FLOAT dpi_y, D2D1_MATRIX_3X2_F *glyph_transform, ID2D1Image **glyph_image) +{ + FIXME("iface %p, glyph_image_format %u, glyph_origin %s, font_face %p, font_em_size %f, glyph_index %u," + "is_sideways %d, world_transform %p, dpi_x %f, dpi_y %f, glyph_transform %p, glyph_image %p stub!\n", + iface, glyph_image_format, debug_d2d_point_2f(&glyph_origin), font_face, font_em_size, glyph_index, + is_sideways, world_transform, dpi_x, dpi_y, glyph_transform, glyph_image); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_GetSvgGlyphImage(ID2D1DeviceContext6 *iface, + D2D1_POINT_2F glyph_origin, IDWriteFontFace *font_face, FLOAT font_em_size, UINT16 glyph_index, + BOOL is_sideways, const D2D1_MATRIX_3X2_F *world_transform, ID2D1Brush *default_fill_brush, + ID2D1SvgGlyphStyle *svg_glyph_style, UINT32 color_palette_index, D2D1_MATRIX_3X2_F *glyph_transform, + ID2D1CommandList **glyph_image) +{ + FIXME("iface %p, glyph_origin %s, font_face %p, font_em_size %f, glyph_index %u, is_sideways %d," + "world_transform %p, default_fill_brush %p, svg_glyph_style %p, color_palette_index %u," + "glyph_transform %p, glyph_image %p stub!\n", iface, debug_d2d_point_2f(&glyph_origin), + font_face, font_em_size, glyph_index, is_sideways, world_transform, default_fill_brush, + svg_glyph_style, color_palette_index, glyph_transform, glyph_image); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateSvgDocument(ID2D1DeviceContext6 *iface, + IStream *input_xml_stream, D2D1_SIZE_F viewport_size, ID2D1SvgDocument **svg_document) +{ + FIXME("iface %p, input_xml_stream %p, svg_document %p stub!\n", iface, input_xml_stream, + svg_document); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_context_DrawSvgDocument(ID2D1DeviceContext6 *iface, + ID2D1SvgDocument *svg_document) +{ + FIXME("iface %p, svg_document %p stub!\n", iface, svg_document); +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromDxgiColorSpace( + ID2D1DeviceContext6 *iface, DXGI_COLOR_SPACE_TYPE color_space, ID2D1ColorContext1 **color_context) +{ + FIXME("iface %p, color_space %u, color_context %p stub!\n", iface, color_space, color_context); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_context_CreateColorContextFromSimpleColorProfile( + ID2D1DeviceContext6 *iface, const D2D1_SIMPLE_COLOR_PROFILE *simple_profile, ID2D1ColorContext1 **color_context) +{ + FIXME("iface %p, simple_profile %p, color_context %p stub!\n", iface, simple_profile, color_context); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_context_BlendImage(ID2D1DeviceContext6 *iface, ID2D1Image *image, + D2D1_BLEND_MODE blend_mode, const D2D1_POINT_2F *target_offset, const D2D1_RECT_F *image_rect, + D2D1_INTERPOLATION_MODE interpolation_mode) +{ + FIXME("iface %p, image %p, blend_mode %u, target_offset %s, image_rect %s, interpolation_mode %u stub!\n", + iface, image, blend_mode, debug_d2d_point_2f(target_offset), debug_d2d_rect_f(image_rect), + interpolation_mode); +} + +static const struct ID2D1DeviceContext6Vtbl d2d_device_context_vtbl = { d2d_device_context_QueryInterface, d2d_device_context_AddRef, @@ -2779,6 +3008,31 @@ static const struct ID2D1DeviceContext1Vtbl d2d_device_context_vtbl = d2d_device_context_CreateFilledGeometryRealization, d2d_device_context_CreateStrokedGeometryRealization, d2d_device_context_DrawGeometryRealization, + d2d_device_context_CreateInk, + d2d_device_context_CreateInkStyle, + d2d_device_context_CreateGradientMesh, + d2d_device_context_CreateImageSourceFromWic, + d2d_device_context_CreateLookupTable3D, + d2d_device_context_CreateImageSourceFromDxgi, + d2d_device_context_GetGradientMeshWorldBounds, + d2d_device_context_DrawInk, + d2d_device_context_DrawGradientMesh, + d2d_device_context_ID2D1DeviceContext2_DrawGdiMetafile, + d2d_device_context_CreateTransformedImageSource, + d2d_device_context_CreateSpriteBatch, + d2d_device_context_DrawSpriteBatch, + d2d_device_context_CreateSvgGlyphStyle, + d2d_device_context_ID2D1DeviceContext4_DrawText, + d2d_device_context_ID2D1DeviceContext4_DrawTextLayout, + d2d_device_context_DrawColorBitmapGlyphRun, + d2d_device_context_DrawSvgGlyphRun, + d2d_device_context_GetColorBitmapGlyphImage, + d2d_device_context_GetSvgGlyphImage, + d2d_device_context_CreateSvgDocument, + d2d_device_context_DrawSvgDocument, + d2d_device_context_CreateColorContextFromDxgiColorSpace, + d2d_device_context_CreateColorContextFromSimpleColorProfile, + d2d_device_context_BlendImage, };
static inline struct d2d_device_context *impl_from_IDWriteTextRenderer(IDWriteTextRenderer *iface) @@ -2807,20 +3061,20 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_QueryInterface(IDWriteTextRen
static ULONG STDMETHODCALLTYPE d2d_text_renderer_AddRef(IDWriteTextRenderer *iface) { - struct d2d_device_context *render_target = impl_from_IDWriteTextRenderer(iface); + struct d2d_device_context *context = impl_from_IDWriteTextRenderer(iface);
TRACE("iface %p.\n", iface);
- return d2d_device_context_AddRef(&render_target->ID2D1DeviceContext1_iface); + return d2d_device_context_AddRef(&context->ID2D1DeviceContext6_iface); }
static ULONG STDMETHODCALLTYPE d2d_text_renderer_Release(IDWriteTextRenderer *iface) { - struct d2d_device_context *render_target = impl_from_IDWriteTextRenderer(iface); + struct d2d_device_context *context = impl_from_IDWriteTextRenderer(iface);
TRACE("iface %p.\n", iface);
- return d2d_device_context_Release(&render_target->ID2D1DeviceContext1_iface); + return d2d_device_context_Release(&context->ID2D1DeviceContext6_iface); }
static HRESULT STDMETHODCALLTYPE d2d_text_renderer_IsPixelSnappingDisabled(IDWriteTextRenderer *iface, @@ -2838,11 +3092,11 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_IsPixelSnappingDisabled(IDWri static HRESULT STDMETHODCALLTYPE d2d_text_renderer_GetCurrentTransform(IDWriteTextRenderer *iface, void *ctx, DWRITE_MATRIX *transform) { - struct d2d_device_context *render_target = impl_from_IDWriteTextRenderer(iface); + struct d2d_device_context *context = impl_from_IDWriteTextRenderer(iface);
TRACE("iface %p, ctx %p, transform %p.\n", iface, ctx, transform);
- d2d_device_context_GetTransform(&render_target->ID2D1DeviceContext1_iface, (D2D1_MATRIX_3X2_F *)transform); + d2d_device_context_GetTransform(&context->ID2D1DeviceContext6_iface, (D2D1_MATRIX_3X2_F *)transform);
return S_OK; } @@ -2942,7 +3196,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawGlyphRun(IDWriteTextRende color_brush = brush; else { - if (FAILED(hr = d2d_device_context_CreateSolidColorBrush(&render_target->ID2D1DeviceContext1_iface, + if (FAILED(hr = d2d_device_context_CreateSolidColorBrush(&render_target->ID2D1DeviceContext6_iface, &color_run->runColor, NULL, (ID2D1SolidColorBrush **)&color_brush))) { ERR("Failed to create solid colour brush, hr %#lx.\n", hr); @@ -2995,7 +3249,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawUnderline(IDWriteTextRend end.x = start.x + underline->width; end.y = start.y; prev_antialias_mode = d2d_device_context_set_aa_mode_from_text_aa_mode(render_target); - d2d_device_context_DrawLine(&render_target->ID2D1DeviceContext1_iface, start, end, brush, thickness, NULL); + d2d_device_context_DrawLine(&render_target->ID2D1DeviceContext6_iface, start, end, brush, thickness, NULL); render_target->drawing_state.antialiasMode = prev_antialias_mode;
ID2D1Brush_Release(brush); @@ -3028,7 +3282,7 @@ static HRESULT STDMETHODCALLTYPE d2d_text_renderer_DrawStrikethrough(IDWriteText end.x = start.x + strikethrough->width; end.y = start.y; prev_antialias_mode = d2d_device_context_set_aa_mode_from_text_aa_mode(render_target); - d2d_device_context_DrawLine(&render_target->ID2D1DeviceContext1_iface, start, end, brush, thickness, NULL); + d2d_device_context_DrawLine(&render_target->ID2D1DeviceContext6_iface, start, end, brush, thickness, NULL); render_target->drawing_state.antialiasMode = prev_antialias_mode;
ID2D1Brush_Release(brush); @@ -3711,7 +3965,7 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, static const UINT16 indices[] = {0, 1, 2, 2, 1, 3}; static const D3D_FEATURE_LEVEL feature_levels = D3D_FEATURE_LEVEL_10_0;
- render_target->ID2D1DeviceContext1_iface.lpVtbl = &d2d_device_context_vtbl; + render_target->ID2D1DeviceContext6_iface.lpVtbl = &d2d_device_context_vtbl; render_target->ID2D1GdiInteropRenderTarget_iface.lpVtbl = &d2d_gdi_interop_render_target_vtbl; render_target->IDWriteTextRenderer_iface.lpVtbl = &d2d_text_renderer_vtbl; render_target->IUnknown_iface.lpVtbl = &d2d_device_context_inner_unknown_vtbl; @@ -3959,7 +4213,7 @@ HRESULT d2d_d3d_create_render_target(struct d2d_device *device, IDXGISurface *su return hr; }
- ID2D1DeviceContext1_SetDpi(&object->ID2D1DeviceContext1_iface, bitmap_desc.dpiX, bitmap_desc.dpiY); + ID2D1DeviceContext6_SetDpi(&object->ID2D1DeviceContext6_iface, bitmap_desc.dpiX, bitmap_desc.dpiY);
if (surface) { @@ -3969,7 +4223,7 @@ HRESULT d2d_d3d_create_render_target(struct d2d_device *device, IDXGISurface *su bitmap_desc.bitmapOptions |= D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE; bitmap_desc.colorContext = NULL;
- if (FAILED(hr = ID2D1DeviceContext1_CreateBitmapFromDxgiSurface(&object->ID2D1DeviceContext1_iface, + if (FAILED(hr = ID2D1DeviceContext6_CreateBitmapFromDxgiSurface(&object->ID2D1DeviceContext6_iface, surface, &bitmap_desc, &bitmap))) { WARN("Failed to create target bitmap, hr %#lx.\n", hr); @@ -3977,14 +4231,14 @@ HRESULT d2d_d3d_create_render_target(struct d2d_device *device, IDXGISurface *su return hr; }
- ID2D1DeviceContext1_SetTarget(&object->ID2D1DeviceContext1_iface, (ID2D1Image *)bitmap); + ID2D1DeviceContext6_SetTarget(&object->ID2D1DeviceContext6_iface, (ID2D1Image *)bitmap); ID2D1Bitmap1_Release(bitmap); } else object->desc.pixelFormat = desc->pixelFormat;
TRACE("Created render target %p.\n", object); - *render_target = outer_unknown ? &object->IUnknown_iface : (IUnknown *)&object->ID2D1DeviceContext1_iface; + *render_target = outer_unknown ? &object->IUnknown_iface : (IUnknown *)&object->ID2D1DeviceContext6_iface;
return S_OK; } @@ -4070,7 +4324,7 @@ static HRESULT d2d_device_create_device_context(struct d2d_device *device, }
TRACE("Created device context %p.\n", object); - *context = &object->ID2D1DeviceContext1_iface; + *context = (ID2D1DeviceContext1 *)&object->ID2D1DeviceContext6_iface;
return S_OK; } diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index aadf308c60f..e7f9f78284f 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -1372,7 +1372,7 @@ static ULONG STDMETHODCALLTYPE d2d_effect_context_Release(ID2D1EffectContext *if
if (!refcount) { - ID2D1DeviceContext1_Release(&effect_context->device_context->ID2D1DeviceContext1_iface); + ID2D1DeviceContext6_Release(&effect_context->device_context->ID2D1DeviceContext6_iface); free(effect_context); }
@@ -1385,7 +1385,7 @@ static void STDMETHODCALLTYPE d2d_effect_context_GetDpi(ID2D1EffectContext *ifac
TRACE("iface %p, dpi_x %p, dpi_y %p.\n", iface, dpi_x, dpi_y);
- ID2D1DeviceContext1_GetDpi(&effect_context->device_context->ID2D1DeviceContext1_iface, dpi_x, dpi_y); + ID2D1DeviceContext6_GetDpi(&effect_context->device_context->ID2D1DeviceContext6_iface, dpi_x, dpi_y); }
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateEffect(ID2D1EffectContext *iface, @@ -1395,7 +1395,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateEffect(ID2D1EffectCont
TRACE("iface %p, clsid %s, effect %p.\n", iface, debugstr_guid(clsid), effect);
- return ID2D1DeviceContext1_CreateEffect(&effect_context->device_context->ID2D1DeviceContext1_iface, + return ID2D1DeviceContext6_CreateEffect(&effect_context->device_context->ID2D1DeviceContext6_iface, clsid, effect); }
@@ -1578,7 +1578,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContext(ID2D1Effe TRACE("iface %p, space %#x, profile %p, profile_size %u, color_context %p.\n", iface, space, profile, profile_size, color_context);
- return ID2D1DeviceContext1_CreateColorContext(&effect_context->device_context->ID2D1DeviceContext1_iface, + return ID2D1DeviceContext6_CreateColorContext(&effect_context->device_context->ID2D1DeviceContext6_iface, space, profile, profile_size, color_context); }
@@ -1589,7 +1589,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromFilena
TRACE("iface %p, filename %s, color_context %p.\n", iface, debugstr_w(filename), color_context);
- return ID2D1DeviceContext1_CreateColorContextFromFilename(&effect_context->device_context->ID2D1DeviceContext1_iface, + return ID2D1DeviceContext6_CreateColorContextFromFilename(&effect_context->device_context->ID2D1DeviceContext6_iface, filename, color_context); }
@@ -1600,7 +1600,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromWicCol
TRACE("iface %p, wic_color_context %p, color_context %p.\n", iface, wic_color_context, color_context);
- return ID2D1DeviceContext1_CreateColorContextFromWicColorContext(&effect_context->device_context->ID2D1DeviceContext1_iface, + return ID2D1DeviceContext6_CreateColorContextFromWicColorContext(&effect_context->device_context->ID2D1DeviceContext6_iface, wic_color_context, color_context); }
@@ -1633,7 +1633,7 @@ static BOOL STDMETHODCALLTYPE d2d_effect_context_IsBufferPrecisionSupported(ID2D
TRACE("iface %p, precision %u.\n", iface, precision);
- return ID2D1DeviceContext1_IsBufferPrecisionSupported(&effect_context->device_context->ID2D1DeviceContext1_iface, + return ID2D1DeviceContext6_IsBufferPrecisionSupported(&effect_context->device_context->ID2D1DeviceContext6_iface, precision); }
@@ -1670,7 +1670,7 @@ void d2d_effect_context_init(struct d2d_effect_context *effect_context, struct d effect_context->ID2D1EffectContext_iface.lpVtbl = &d2d_effect_context_vtbl; effect_context->refcount = 1; effect_context->device_context = device_context; - ID2D1DeviceContext1_AddRef(&device_context->ID2D1DeviceContext1_iface); + ID2D1DeviceContext6_AddRef(&device_context->ID2D1DeviceContext6_iface); }
static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface)
From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d2d1/d2d1_private.h | 4 +- dlls/d2d1/device.c | 135 +++++++++++++++++++++++++++++++-------- dlls/d2d1/factory.c | 52 ++++++++++----- 3 files changed, 145 insertions(+), 46 deletions(-)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 7cd72f89830..c0ac5ba9a44 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -602,7 +602,7 @@ struct d2d_shader
struct d2d_device { - ID2D1Device1 ID2D1Device1_iface; + ID2D1Device6 ID2D1Device6_iface; LONG refcount; ID2D1Factory1 *factory; IDXGIDevice *dxgi_device; @@ -615,7 +615,6 @@ struct d2d_device } shaders; };
-void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *factory, IDXGIDevice *dxgi_device); struct d2d_device *unsafe_impl_from_ID2D1Device(ID2D1Device1 *iface); HRESULT d2d_device_add_shader(struct d2d_device *device, REFGUID shader_id, IUnknown *shader); BOOL d2d_device_is_shader_loaded(struct d2d_device *device, REFGUID shader_id); @@ -708,6 +707,7 @@ void d2d_factory_register_effect(struct d2d_factory *factory, struct d2d_effect_registration *effect); HRESULT d2d_effect_property_get_uint32_value(const struct d2d_effect_properties *properties, const struct d2d_effect_property *prop, UINT32 *value); +void d2d_device_init(struct d2d_device *device, struct d2d_factory *factory, IDXGIDevice *dxgi_device);
struct d2d_transform { diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 03012845e61..3bb45a6b9f4 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -36,9 +36,9 @@ struct d2d_draw_text_layout_ctx D2D1_DRAW_TEXT_OPTIONS options; };
-static inline struct d2d_device *impl_from_ID2D1Device(ID2D1Device1 *iface) +static inline struct d2d_device *impl_from_ID2D1Device(ID2D1Device6 *iface) { - return CONTAINING_RECORD(iface, struct d2d_device, ID2D1Device1_iface); + return CONTAINING_RECORD(iface, struct d2d_device, ID2D1Device6_iface); }
static ID2D1Brush *d2d_draw_get_text_brush(struct d2d_draw_text_layout_ctx *context, IUnknown *effect) @@ -303,7 +303,7 @@ static ULONG STDMETHODCALLTYPE d2d_device_context_inner_Release(IUnknown *iface) IUnknown_Release(context->target.object); ID3D11Device1_Release(context->d3d_device); ID2D1Factory_Release(context->factory); - ID2D1Device1_Release(&context->device->ID2D1Device1_iface); + ID2D1Device6_Release(&context->device->ID2D1Device6_iface); free(context); }
@@ -2356,7 +2356,7 @@ static void STDMETHODCALLTYPE d2d_device_context_GetDevice(ID2D1DeviceContext6 *
TRACE("iface %p, device %p.\n", iface, device);
- *device = (ID2D1Device *)&context->device->ID2D1Device1_iface; + *device = (ID2D1Device *)&context->device->ID2D1Device6_iface; ID2D1Device_AddRef(*device); }
@@ -3970,9 +3970,9 @@ static HRESULT d2d_device_context_init(struct d2d_device_context *render_target, render_target->IDWriteTextRenderer_iface.lpVtbl = &d2d_text_renderer_vtbl; render_target->IUnknown_iface.lpVtbl = &d2d_device_context_inner_unknown_vtbl; render_target->refcount = 1; - ID2D1Device1_GetFactory(&device->ID2D1Device1_iface, &render_target->factory); + ID2D1Device1_GetFactory((ID2D1Device1 *)&device->ID2D1Device6_iface, &render_target->factory); render_target->device = device; - ID2D1Device1_AddRef(&render_target->device->ID2D1Device1_iface); + ID2D1Device6_AddRef(&render_target->device->ID2D1Device6_iface);
factory = unsafe_impl_from_ID2D1Factory(render_target->factory); if (factory->factory_type == D2D1_FACTORY_TYPE_MULTI_THREADED) @@ -4172,7 +4172,7 @@ err: ID3DDeviceContextState_Release(render_target->d3d_state); if (render_target->d3d_device) ID3D11Device1_Release(render_target->d3d_device); - ID2D1Device1_Release(&render_target->device->ID2D1Device1_iface); + ID2D1Device6_Release(&render_target->device->ID2D1Device6_iface); ID2D1Factory_Release(render_target->factory); return hr; } @@ -4243,16 +4243,21 @@ HRESULT d2d_d3d_create_render_target(struct d2d_device *device, IDXGISurface *su return S_OK; }
-static HRESULT WINAPI d2d_device_QueryInterface(ID2D1Device1 *iface, REFIID iid, void **out) +static HRESULT WINAPI d2d_device_QueryInterface(ID2D1Device6 *iface, REFIID iid, void **out) { TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
- if (IsEqualGUID(iid, &IID_ID2D1Device1) + if (IsEqualGUID(iid, &IID_ID2D1Device6) + || IsEqualGUID(iid, &IID_ID2D1Device5) + || IsEqualGUID(iid, &IID_ID2D1Device4) + || IsEqualGUID(iid, &IID_ID2D1Device3) + || IsEqualGUID(iid, &IID_ID2D1Device2) + || IsEqualGUID(iid, &IID_ID2D1Device1) || IsEqualGUID(iid, &IID_ID2D1Device) || IsEqualGUID(iid, &IID_ID2D1Resource) || IsEqualGUID(iid, &IID_IUnknown)) { - ID2D1Device1_AddRef(iface); + ID2D1Device6_AddRef(iface); *out = iface; return S_OK; } @@ -4263,7 +4268,7 @@ static HRESULT WINAPI d2d_device_QueryInterface(ID2D1Device1 *iface, REFIID iid, return E_NOINTERFACE; }
-static ULONG WINAPI d2d_device_AddRef(ID2D1Device1 *iface) +static ULONG WINAPI d2d_device_AddRef(ID2D1Device6 *iface) { struct d2d_device *device = impl_from_ID2D1Device(iface); ULONG refcount = InterlockedIncrement(&device->refcount); @@ -4273,7 +4278,7 @@ static ULONG WINAPI d2d_device_AddRef(ID2D1Device1 *iface) return refcount; }
-static ULONG WINAPI d2d_device_Release(ID2D1Device1 *iface) +static ULONG WINAPI d2d_device_Release(ID2D1Device6 *iface) { struct d2d_device *device = impl_from_ID2D1Device(iface); ULONG refcount = InterlockedDecrement(&device->refcount); @@ -4294,7 +4299,7 @@ static ULONG WINAPI d2d_device_Release(ID2D1Device1 *iface) return refcount; }
-static void WINAPI d2d_device_GetFactory(ID2D1Device1 *iface, ID2D1Factory **factory) +static void WINAPI d2d_device_GetFactory(ID2D1Device6 *iface, ID2D1Factory **factory) { struct d2d_device *device = impl_from_ID2D1Device(iface);
@@ -4329,7 +4334,7 @@ static HRESULT d2d_device_create_device_context(struct d2d_device *device, return S_OK; }
-static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device1 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, +static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext **context) { struct d2d_device *device = impl_from_ID2D1Device(iface); @@ -4339,7 +4344,7 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device1 *iface, D2D1_D return d2d_device_create_device_context(device, options, (ID2D1DeviceContext1 **)context); }
-static HRESULT WINAPI d2d_device_CreatePrintControl(ID2D1Device1 *iface, IWICImagingFactory *wic_factory, +static HRESULT WINAPI d2d_device_CreatePrintControl(ID2D1Device6 *iface, IWICImagingFactory *wic_factory, IPrintDocumentPackageTarget *document_target, const D2D1_PRINT_CONTROL_PROPERTIES *desc, ID2D1PrintControl **print_control) { @@ -4349,38 +4354,38 @@ static HRESULT WINAPI d2d_device_CreatePrintControl(ID2D1Device1 *iface, IWICIma return E_NOTIMPL; }
-static void WINAPI d2d_device_SetMaximumTextureMemory(ID2D1Device1 *iface, UINT64 max_texture_memory) +static void WINAPI d2d_device_SetMaximumTextureMemory(ID2D1Device6 *iface, UINT64 max_texture_memory) { FIXME("iface %p, max_texture_memory %s stub!\n", iface, wine_dbgstr_longlong(max_texture_memory)); }
-static UINT64 WINAPI d2d_device_GetMaximumTextureMemory(ID2D1Device1 *iface) +static UINT64 WINAPI d2d_device_GetMaximumTextureMemory(ID2D1Device6 *iface) { FIXME("iface %p stub!\n", iface);
return 0; }
-static HRESULT WINAPI d2d_device_ClearResources(ID2D1Device1 *iface, UINT msec_since_use) +static HRESULT WINAPI d2d_device_ClearResources(ID2D1Device6 *iface, UINT msec_since_use) { FIXME("iface %p, msec_since_use %u stub!\n", iface, msec_since_use);
return E_NOTIMPL; }
-static D2D1_RENDERING_PRIORITY WINAPI d2d_device_GetRenderingPriority(ID2D1Device1 *iface) +static D2D1_RENDERING_PRIORITY WINAPI d2d_device_GetRenderingPriority(ID2D1Device6 *iface) { FIXME("iface %p stub!\n", iface);
return D2D1_RENDERING_PRIORITY_NORMAL; }
-static void WINAPI d2d_device_SetRenderingPriority(ID2D1Device1 *iface, D2D1_RENDERING_PRIORITY priority) +static void WINAPI d2d_device_SetRenderingPriority(ID2D1Device6 *iface, D2D1_RENDERING_PRIORITY priority) { FIXME("iface %p, priority %#x stub!\n", iface, priority); }
-static HRESULT WINAPI d2d_device_CreateDeviceContext1(ID2D1Device1 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, +static HRESULT WINAPI d2d_device_CreateDeviceContext1(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext1 **context) { struct d2d_device *device = impl_from_ID2D1Device(iface); @@ -4390,7 +4395,74 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext1(ID2D1Device1 *iface, D2D1_ return d2d_device_create_device_context(device, options, context); }
-static const struct ID2D1Device1Vtbl d2d_device_vtbl = +static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device2_CreateDeviceContext(ID2D1Device6 *iface, + D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext2 **context) +{ + FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_FlushDeviceContexts(ID2D1Device6 *iface, + ID2D1Bitmap *bitmap) +{ + FIXME("iface %p, bitmap %p stub!\n", iface, bitmap); +} + +static HRESULT STDMETHODCALLTYPE d2d_device_GetDxgiDevice(ID2D1Device6 *iface, + IDXGIDevice **dxgi_device) +{ + FIXME("iface %p, dxgi_device %p stub!\n", iface, dxgi_device); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device3_CreateDeviceContext(ID2D1Device6 *iface, + D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext3 **context) +{ + FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device4_CreateDeviceContext(ID2D1Device6 *iface, + D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext4 **context) +{ + FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + + return E_NOTIMPL; +} + +static void STDMETHODCALLTYPE d2d_device_SetMaximumColorGlyphCacheMemory(ID2D1Device6 *iface, + UINT64 size) +{ + FIXME("iface %p, size %s stub!\n", iface, wine_dbgstr_longlong(size)); +} + +static UINT64 STDMETHODCALLTYPE d2d_device_GetMaximumColorGlyphCacheMemory(ID2D1Device6 *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device5_CreateDeviceContext(ID2D1Device6 *iface, + D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext5 **context) +{ + FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device6_CreateDeviceContext(ID2D1Device6 *iface, + D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext6 **context) +{ + FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + + return E_NOTIMPL; +} + +static const struct ID2D1Device6Vtbl d2d_device_vtbl = { d2d_device_QueryInterface, d2d_device_AddRef, @@ -4404,21 +4476,30 @@ static const struct ID2D1Device1Vtbl d2d_device_vtbl = d2d_device_GetRenderingPriority, d2d_device_SetRenderingPriority, d2d_device_CreateDeviceContext1, + d2d_device_ID2D1Device2_CreateDeviceContext, + d2d_device_FlushDeviceContexts, + d2d_device_GetDxgiDevice, + d2d_device_ID2D1Device3_CreateDeviceContext, + d2d_device_ID2D1Device4_CreateDeviceContext, + d2d_device_SetMaximumColorGlyphCacheMemory, + d2d_device_GetMaximumColorGlyphCacheMemory, + d2d_device_ID2D1Device5_CreateDeviceContext, + d2d_device_ID2D1Device6_CreateDeviceContext, };
struct d2d_device *unsafe_impl_from_ID2D1Device(ID2D1Device1 *iface) { if (!iface) return NULL; - assert(iface->lpVtbl == &d2d_device_vtbl); - return CONTAINING_RECORD(iface, struct d2d_device, ID2D1Device1_iface); + assert(iface->lpVtbl == (ID2D1Device1Vtbl *)&d2d_device_vtbl); + return CONTAINING_RECORD(iface, struct d2d_device, ID2D1Device6_iface); }
-void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *iface, IDXGIDevice *dxgi_device) +void d2d_device_init(struct d2d_device *device, struct d2d_factory *factory, IDXGIDevice *dxgi_device) { - device->ID2D1Device1_iface.lpVtbl = &d2d_device_vtbl; + device->ID2D1Device6_iface.lpVtbl = &d2d_device_vtbl; device->refcount = 1; - device->factory = iface; + device->factory = (ID2D1Factory1 *)&factory->ID2D1Factory7_iface; ID2D1Factory1_AddRef(device->factory); device->dxgi_device = dxgi_device; IDXGIDevice_AddRef(device->dxgi_device); diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c index 1b12670bd1c..954d90efc0e 100644 --- a/dlls/d2d1/factory.c +++ b/dlls/d2d1/factory.c @@ -513,27 +513,33 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDCRenderTarget(ID2D1Factory7 return S_OK; }
-static HRESULT d2d_factory_create_device(ID2D1Factory1 *iface, IDXGIDevice *dxgi_device, - ID2D1Device1 **device) { +static HRESULT d2d_factory_create_device(struct d2d_factory *factory, IDXGIDevice *dxgi_device, + REFIID iid, void **device) +{ struct d2d_device *object; + HRESULT hr;
if (!(object = calloc(1, sizeof(*object)))) return E_OUTOFMEMORY;
- d2d_device_init(object, iface, dxgi_device); + d2d_device_init(object, factory, dxgi_device);
TRACE("Create device %p.\n", object); - *device = &object->ID2D1Device1_iface;
- return S_OK; + hr = ID2D1Device6_QueryInterface(&object->ID2D1Device6_iface, iid, device); + ID2D1Device6_Release(&object->ID2D1Device6_iface); + + return hr; }
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device **device) { + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device);
- return d2d_factory_create_device((ID2D1Factory1 *)iface, dxgi_device, (ID2D1Device1 **)device); + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device, (void **)device); }
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory7 *iface, @@ -1183,49 +1189,61 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_GetEffectProperties(ID2D1Factory7 * static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory2_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device1 **device) { + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface); + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device);
- return d2d_factory_create_device((ID2D1Factory1 *)iface, dxgi_device, device); + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device1, (void **)device); }
static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory3_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device2 **device) { - FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
- return E_NOTIMPL; + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device); + + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device2, (void **)device); }
static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory4_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device3 **device) { - FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
- return E_NOTIMPL; + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device); + + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device3, (void **)device); }
static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory5_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device4 **device) { - FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
- return E_NOTIMPL; + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device); + + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device4, (void **)device); }
static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory6_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device5 **device) { - FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
- return E_NOTIMPL; + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device); + + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device5, (void **)device); }
static HRESULT STDMETHODCALLTYPE d2d_factory_ID2D1Factory7_CreateDevice(ID2D1Factory7 *iface, IDXGIDevice *dxgi_device, ID2D1Device6 **device) { - FIXME("iface %p, dxgi_device %p, device %p stub!\n", iface, dxgi_device, device); + struct d2d_factory *factory = impl_from_ID2D1Factory7(iface);
- return E_NOTIMPL; + TRACE("iface %p, dxgi_device %p, device %p.\n", iface, dxgi_device, device); + + return d2d_factory_create_device(factory, dxgi_device, &IID_ID2D1Device6, (void **)device); }
static const struct ID2D1Factory7Vtbl d2d_factory_vtbl =
From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d2d1/device.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-)
diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c index 3bb45a6b9f4..153c79583c7 100644 --- a/dlls/d2d1/device.c +++ b/dlls/d2d1/device.c @@ -4310,7 +4310,7 @@ static void WINAPI d2d_device_GetFactory(ID2D1Device6 *iface, ID2D1Factory **fac }
static HRESULT d2d_device_create_device_context(struct d2d_device *device, - D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext1 **context) + D2D1_DEVICE_CONTEXT_OPTIONS options, REFIID iid, void **context) { struct d2d_device_context *object; HRESULT hr; @@ -4329,9 +4329,11 @@ static HRESULT d2d_device_create_device_context(struct d2d_device *device, }
TRACE("Created device context %p.\n", object); - *context = (ID2D1DeviceContext1 *)&object->ID2D1DeviceContext6_iface;
- return S_OK; + hr = ID2D1DeviceContext6_QueryInterface(&object->ID2D1DeviceContext6_iface, iid, context); + ID2D1DeviceContext6_Release(&object->ID2D1DeviceContext6_iface); + + return hr; }
static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, @@ -4341,7 +4343,7 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext(ID2D1Device6 *iface, D2D1_D
TRACE("iface %p, options %#x, context %p.\n", iface, options, context);
- return d2d_device_create_device_context(device, options, (ID2D1DeviceContext1 **)context); + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext, (void **)context); }
static HRESULT WINAPI d2d_device_CreatePrintControl(ID2D1Device6 *iface, IWICImagingFactory *wic_factory, @@ -4392,15 +4394,17 @@ static HRESULT WINAPI d2d_device_CreateDeviceContext1(ID2D1Device6 *iface, D2D1_
TRACE("iface %p, options %#x, context %p.\n", iface, options, context);
- return d2d_device_create_device_context(device, options, context); + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext1, (void **)context); }
static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device2_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext2 **context) { - FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + struct d2d_device *device = impl_from_ID2D1Device(iface);
- return E_NOTIMPL; + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); + + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext2, (void **)context); }
static void STDMETHODCALLTYPE d2d_device_FlushDeviceContexts(ID2D1Device6 *iface, @@ -4420,17 +4424,21 @@ static HRESULT STDMETHODCALLTYPE d2d_device_GetDxgiDevice(ID2D1Device6 *iface, static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device3_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext3 **context) { - FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + struct d2d_device *device = impl_from_ID2D1Device(iface);
- return E_NOTIMPL; + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); + + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext3, (void **)context); }
static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device4_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext4 **context) { - FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + struct d2d_device *device = impl_from_ID2D1Device(iface);
- return E_NOTIMPL; + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); + + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext4, (void **)context); }
static void STDMETHODCALLTYPE d2d_device_SetMaximumColorGlyphCacheMemory(ID2D1Device6 *iface, @@ -4449,17 +4457,21 @@ static UINT64 STDMETHODCALLTYPE d2d_device_GetMaximumColorGlyphCacheMemory(ID2D1 static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device5_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext5 **context) { - FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + struct d2d_device *device = impl_from_ID2D1Device(iface);
- return E_NOTIMPL; + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); + + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext5, (void **)context); }
static HRESULT STDMETHODCALLTYPE d2d_device_ID2D1Device6_CreateDeviceContext(ID2D1Device6 *iface, D2D1_DEVICE_CONTEXT_OPTIONS options, ID2D1DeviceContext6 **context) { - FIXME("iface %p, options %#x, context %p stub!\n", iface, options, context); + struct d2d_device *device = impl_from_ID2D1Device(iface);
- return E_NOTIMPL; + TRACE("iface %p, options %#x, context %p.\n", iface, options, context); + + return d2d_device_create_device_context(device, options, &IID_ID2D1DeviceContext6, (void **)context); }
static const struct ID2D1Device6Vtbl d2d_device_vtbl =