From: Ziqing Hui zhui@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/factory.c | 8 ++++---- dlls/d2d1/tests/d2d1.c | 2 +- include/d2derr.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c index a160d7071c2..6eeea8e70ae 100644 --- a/dlls/d2d1/factory.c +++ b/dlls/d2d1/factory.c @@ -634,7 +634,7 @@ static HRESULT parse_effect_get_next_xml_node(IXmlReader *reader, XmlNodeType ex continue;
if (expected_type != XmlNodeType_None && node_type != expected_type) - return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + return D2DERR_NOT_FOUND;
if (expected_name) { @@ -642,7 +642,7 @@ static HRESULT parse_effect_get_next_xml_node(IXmlReader *reader, XmlNodeType ex return hr;
if (wcscmp(node_name, expected_name)) - return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + return D2DERR_NOT_FOUND; }
if (depth) @@ -833,7 +833,7 @@ static HRESULT parse_effect_inputs(IXmlReader *reader, struct d2d_effect_registr { if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr; if (node_type == XmlNodeType_EndElement) continue; - if (node_type != XmlNodeType_Element) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + if (node_type != XmlNodeType_Element) return D2DERR_NOT_FOUND;
if (FAILED(hr = parse_effect_get_attribute(reader, L"name", &name))) return hr;
@@ -846,7 +846,7 @@ static HRESULT parse_effect_inputs(IXmlReader *reader, struct d2d_effect_registr *(UINT32 *)(effect->properties.data.ptr + inputs->data.offset) = input_count;
if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr; - if (node_type != XmlNodeType_EndElement) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + if (node_type != XmlNodeType_EndElement) return D2DERR_NOT_FOUND;
return S_OK; } diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 3a38d593625..9a4b7a82052 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10793,7 +10793,7 @@ static void test_effect_register(BOOL d3d11) {effect_xml_b, S_OK}, {effect_xml_c, S_OK}, {effect_xml_minimum, S_OK}, - {effect_xml_without_version, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, + {effect_xml_without_version, D2DERR_NOT_FOUND}, {effect_xml_without_inputs, E_INVALIDARG}, {effect_xml_without_name, E_INVALIDARG}, {effect_xml_without_author, E_INVALIDARG}, diff --git a/include/d2derr.h b/include/d2derr.h index b31d0aff515..8a03194c1e4 100644 --- a/include/d2derr.h +++ b/include/d2derr.h @@ -19,6 +19,7 @@ #ifndef __WINE_D2DERR_H #define __WINE_D2DERR_H
+#define D2DERR_NOT_FOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND) #define D2DERR_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) #define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT
From: Ziqing Hui zhui@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/tests/d2d1.c | 143 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 142 insertions(+), 1 deletion(-)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 9a4b7a82052..24583479038 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -132,6 +132,9 @@ L"<?xml version='1.0'?> \ <Property name='Integer' type='uint32'> \ <Property name='DisplayName' type='string' value='Integer'/> \ </Property> \ + <Property name='Graph' type='iunknown'> \ + <Property name='DisplayName' type='string' value='Graph'/> \ + </Property> \ </Effect> \ ";
@@ -350,6 +353,7 @@ struct effect_impl LONG refcount; UINT integer; ID2D1EffectContext *effect_context; + ID2D1TransformGraph *transform_graph; };
static void queue_d3d1x_test(void (*test)(BOOL d3d11), BOOL d3d11) @@ -10690,6 +10694,7 @@ static HRESULT STDMETHODCALLTYPE effect_impl_Initialize(ID2D1EffectImpl *iface, { struct effect_impl *effect_impl = impl_from_ID2D1EffectImpl(iface); ID2D1EffectContext_AddRef(effect_impl->effect_context = context); + ID2D1TransformGraph_AddRef(effect_impl->transform_graph = graph); return S_OK; }
@@ -10724,6 +10729,7 @@ static HRESULT STDMETHODCALLTYPE effect_impl_create(IUnknown **effect_impl) object->refcount = 1; object->integer = 10; object->effect_context = NULL; + object->transform_graph = NULL;
*effect_impl = (IUnknown *)&object->ID2D1EffectImpl_iface; return S_OK; @@ -10771,6 +10777,21 @@ static HRESULT STDMETHODCALLTYPE effect_impl_get_context(const IUnknown *iface, return S_OK; }
+static HRESULT STDMETHODCALLTYPE effect_impl_get_graph(const IUnknown *iface, + BYTE *data, UINT32 data_size, UINT32 *actual_size) +{ + struct effect_impl *effect_impl = impl_from_ID2D1EffectImpl((ID2D1EffectImpl *)iface); + + if (!data) + return E_INVALIDARG; + + *((ID2D1TransformGraph **)data) = effect_impl->transform_graph; + if (actual_size) + *actual_size = sizeof(effect_impl->transform_graph); + + return S_OK; +} + static void test_effect_register(BOOL d3d11) { ID2D1DeviceContext *device_context; @@ -11400,7 +11421,7 @@ static void test_effect_properties(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
count = ID2D1Effect_GetPropertyCount(effect); - ok(count == 2, "Got unexpected property count %u.\n", count); + ok(count == 3, "Got unexpected property count %u.\n", count);
index = ID2D1Effect_GetPropertyIndex(effect, L"Context"); ok(index == 0, "Got unexpected index %u.\n", index); @@ -11997,6 +12018,125 @@ static void test_registered_effects(BOOL d3d11) release_test_context(&ctx); }
+static void test_transform_graph(BOOL d3d11) +{ + ID2D1OffsetTransform *offset_transform = NULL; + ID2D1BlendTransform *blend_transform = NULL; + D2D1_BLEND_DESCRIPTION blend_desc = {0}; + ID2D1EffectContext *effect_context; + struct d2d1_test_context ctx; + ID2D1TransformGraph *graph; + ID2D1Factory1 *factory; + POINT point = {0 ,0}; + ID2D1Effect *effect; + UINT i, count; + HRESULT hr; + + const D2D1_PROPERTY_BINDING binding[] = + { + {L"Context", NULL, effect_impl_get_context}, + {L"Graph", NULL, effect_impl_get_graph}, + }; + + if (!init_test_context(&ctx, d3d11)) + return; + + factory = ctx.factory1; + if (!factory) + { + win_skip("ID2D1Factory1 is not supported.\n"); + release_test_context(&ctx); + return; + } + + hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, + effect_xml_c, binding, ARRAY_SIZE(binding), effect_impl_create); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + hr = ID2D1DeviceContext_CreateEffect(ctx.context, &CLSID_TestEffect, &effect); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + hr = ID2D1Effect_GetValueByName(effect, L"Graph", D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&graph, sizeof(graph)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1Effect_GetValueByName(effect, L"Context", + D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + /* Create transforms */ + hr = ID2D1EffectContext_CreateOffsetTransform(effect_context, point, &offset_transform); + todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1EffectContext_CreateBlendTransform(effect_context, 2, &blend_desc, &blend_transform); + todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + if (!offset_transform || !blend_transform) + goto done; + + /* Add nodes */ + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)offset_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)offset_transform); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)blend_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + /* Remove nodes */ + hr = ID2D1TransformGraph_RemoveNode(graph, (ID2D1TransformNode *)offset_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_RemoveNode(graph, (ID2D1TransformNode *)offset_transform); + ok(hr == D2DERR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_RemoveNode(graph, (ID2D1TransformNode *)blend_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + /* Connect nodes which are both un-added */ + ID2D1TransformGraph_Clear(graph); + hr = ID2D1TransformGraph_ConnectNode(graph, + (ID2D1TransformNode *)offset_transform, (ID2D1TransformNode *)blend_transform, 0); + ok(hr == D2DERR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); + + /* Connect added node to un-added node */ + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)offset_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_ConnectNode(graph, + (ID2D1TransformNode *)offset_transform, (ID2D1TransformNode *)blend_transform, 0); + ok(hr == D2DERR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); + + /* Connect un-added node to added node */ + ID2D1TransformGraph_Clear(graph); + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)blend_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_ConnectNode(graph, + (ID2D1TransformNode *)offset_transform, (ID2D1TransformNode *)blend_transform, 0); + ok(hr == D2DERR_NOT_FOUND, "Got unexpected hr %#lx.\n", hr); + + /* Connect nodes */ + ID2D1TransformGraph_Clear(graph); + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)offset_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)blend_transform); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + count = ID2D1BlendTransform_GetInputCount(blend_transform); + for (i = 0; i < count; ++i) + { + hr = ID2D1TransformGraph_ConnectNode(graph, + (ID2D1TransformNode *)offset_transform, (ID2D1TransformNode *)blend_transform, i); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + } + + /* Connect node to out-of-bounds index */ + hr = ID2D1TransformGraph_ConnectNode(graph, + (ID2D1TransformNode *)offset_transform, (ID2D1TransformNode *)blend_transform, count); + ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr); + +done: + if (blend_transform) + ID2D1BlendTransform_Release(blend_transform); + if (offset_transform) + ID2D1OffsetTransform_Release(offset_transform); + ID2D1Effect_Release(effect); + hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + release_test_context(&ctx); +} + static void test_stroke_contains_point(BOOL d3d11) { ID2D1TransformedGeometry *transformed_geometry; @@ -12812,6 +12952,7 @@ START_TEST(d2d1) queue_test(test_effect_crop); queue_test(test_effect_grayscale); queue_test(test_registered_effects); + queue_test(test_transform_graph); queue_d3d10_test(test_stroke_contains_point); queue_test(test_image_bounds); queue_test(test_bitmap_map);
From: Ziqing Hui zhui@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/tests/d2d1.c | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 24583479038..7678c697c5e 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -12137,6 +12137,73 @@ done: release_test_context(&ctx); }
+static void test_offset_transform(BOOL d3d11) +{ + ID2D1OffsetTransform *transform = NULL; + ID2D1EffectContext *effect_context; + D2D1_PROPERTY_BINDING binding; + struct d2d1_test_context ctx; + ID2D1Factory1 *factory; + D2D1_POINT_2L offset; + ID2D1Effect *effect; + UINT input_count; + HRESULT hr; + + if (!init_test_context(&ctx, d3d11)) + return; + + factory = ctx.factory1; + if (!factory) + { + win_skip("ID2D1Factory1 is not supported.\n"); + release_test_context(&ctx); + return; + } + + binding.propertyName = L"Context"; + binding.setFunction = NULL; + binding.getFunction = effect_impl_get_context; + hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, + effect_xml_b, &binding, 1, effect_impl_create); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + hr = ID2D1DeviceContext_CreateEffect(ctx.context, &CLSID_TestEffect, &effect); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + hr = ID2D1Effect_GetValueByName(effect, L"Context", + D2D1_PROPERTY_TYPE_IUNKNOWN, (BYTE *)&effect_context, sizeof(effect_context)); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + /* Create transform */ + offset.x = 1; + offset.y = 2; + hr = ID2D1EffectContext_CreateOffsetTransform(effect_context, offset, &transform); + todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + if (hr != S_OK) + goto done; + offset = ID2D1OffsetTransform_GetOffset(transform); + ok(offset.x == 1 && offset.y == 2, "Got unexpected offset {%ld, %ld}.\n", offset.x, offset.y); + + /* Input count */ + input_count = ID2D1OffsetTransform_GetInputCount(transform); + ok(input_count == 1, "Got unexpected input count %u.\n", input_count); + + /* Set offset */ + offset.x = -10; + offset.y = 20; + ID2D1OffsetTransform_SetOffset(transform, offset); + offset = ID2D1OffsetTransform_GetOffset(transform); + ok(offset.x == -10 && offset.y == 20, "Got unexpected offset {%ld, %ld}.\n", offset.x, offset.y); + +done: + if (transform) + ID2D1OffsetTransform_Release(transform); + ID2D1Effect_Release(effect); + hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + release_test_context(&ctx); +} + static void test_stroke_contains_point(BOOL d3d11) { ID2D1TransformedGeometry *transformed_geometry; @@ -12953,6 +13020,7 @@ START_TEST(d2d1) queue_test(test_effect_grayscale); queue_test(test_registered_effects); queue_test(test_transform_graph); + queue_test(test_offset_transform); queue_d3d10_test(test_stroke_contains_point); queue_test(test_image_bounds); queue_test(test_bitmap_map);
From: Ziqing Hui zhui@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/d2d1_private.h | 7 +++ dlls/d2d1/effect.c | 95 +++++++++++++++++++++++++++++++++++++++- dlls/d2d1/tests/d2d1.c | 14 +++--- 3 files changed, 105 insertions(+), 11 deletions(-)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 98f99744746..6dc89ce51db 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -658,6 +658,13 @@ struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory void d2d_factory_register_effect(struct d2d_factory *factory, struct d2d_effect_registration *effect) DECLSPEC_HIDDEN;
+struct d2d_offset_transform +{ + ID2D1OffsetTransform ID2D1OffsetTransform_iface; + LONG refcount; + D2D1_POINT_2L offset; +}; + struct d2d_transform_graph { ID2D1TransformGraph ID2D1TransformGraph_iface; diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 7b086e20b9b..9437a700fb6 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -20,6 +20,87 @@
WINE_DEFAULT_DEBUG_CHANNEL(d2d);
+static inline struct d2d_offset_transform *impl_from_ID2D1OffsetTransform(ID2D1OffsetTransform *iface) +{ + return CONTAINING_RECORD(iface, struct d2d_offset_transform, ID2D1OffsetTransform_iface); +} + +static HRESULT STDMETHODCALLTYPE d2d_offset_transform_QueryInterface(ID2D1OffsetTransform *iface, REFIID iid, void **out) +{ + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + if (IsEqualGUID(iid, &IID_ID2D1OffsetTransform) + || IsEqualGUID(iid, &IID_ID2D1TransformNode) + || IsEqualGUID(iid, &IID_IUnknown)) + { + ID2D1OffsetTransform_AddRef(iface); + *out = iface; + return S_OK; + } + + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d2d_offset_transform_AddRef(ID2D1OffsetTransform *iface) +{ + struct d2d_offset_transform *transform = impl_from_ID2D1OffsetTransform(iface); + ULONG refcount = InterlockedIncrement(&transform->refcount); + + TRACE("%p increasing refcount to %lu.\n", iface, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d2d_offset_transform_Release(ID2D1OffsetTransform *iface) +{ + struct d2d_offset_transform *transform = impl_from_ID2D1OffsetTransform(iface); + ULONG refcount = InterlockedDecrement(&transform->refcount); + + TRACE("%p decreasing refcount to %lu.\n", iface, refcount); + + if (!refcount) + free(transform); + + return refcount; +} + +static UINT32 STDMETHODCALLTYPE d2d_offset_transform_GetInputCount(ID2D1OffsetTransform *iface) +{ + TRACE("iface %p.\n", iface); + + return 1; +} + +static void STDMETHODCALLTYPE d2d_offset_transform_SetOffset(ID2D1OffsetTransform *iface, D2D1_POINT_2L offset) +{ + struct d2d_offset_transform *transform = impl_from_ID2D1OffsetTransform(iface); + + TRACE("iface %p, offset %s.\n", iface, debug_d2d_point_2l(&offset)); + + transform->offset = offset; +} + +static D2D1_POINT_2L *STDMETHODCALLTYPE d2d_offset_transform_GetOffset(ID2D1OffsetTransform *iface, D2D1_POINT_2L *ret) +{ + struct d2d_offset_transform *transform = impl_from_ID2D1OffsetTransform(iface); + + TRACE("iface %p, ret %p.\n", iface, ret); + + *ret = transform->offset; + return ret; +} + +static const ID2D1OffsetTransformVtbl d2d_offset_transform_vtbl = +{ + d2d_offset_transform_QueryInterface, + d2d_offset_transform_AddRef, + d2d_offset_transform_Release, + d2d_offset_transform_GetInputCount, + d2d_offset_transform_SetOffset, + d2d_offset_transform_GetOffset, +}; + static inline struct d2d_transform_graph *impl_from_ID2D1TransformGraph(ID2D1TransformGraph *iface) { return CONTAINING_RECORD(iface, struct d2d_transform_graph, ID2D1TransformGraph_iface); @@ -754,9 +835,19 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBorderTransform(ID2D1E static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateOffsetTransform(ID2D1EffectContext *iface, D2D1_POINT_2L offset, ID2D1OffsetTransform **transform) { - FIXME("iface %p, offset %s, transform %p stub!\n", iface, debug_d2d_point_2l(&offset), transform); + struct d2d_offset_transform *object;
- return E_NOTIMPL; + TRACE("iface %p, offset %s, transform %p.\n", iface, debug_d2d_point_2l(&offset), transform); + + if (!(object = calloc(1, sizeof(*object)))) + return E_OUTOFMEMORY; + + object->ID2D1OffsetTransform_iface.lpVtbl = &d2d_offset_transform_vtbl; + object->refcount = 1; + object->offset = offset; + *transform = &object->ID2D1OffsetTransform_iface; + + return S_OK; }
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateBoundsAdjustmentTransform(ID2D1EffectContext *iface, diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 7678c697c5e..6f12b91bdf6 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -12064,10 +12064,10 @@ static void test_transform_graph(BOOL d3d11)
/* Create transforms */ hr = ID2D1EffectContext_CreateOffsetTransform(effect_context, point, &offset_transform); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); hr = ID2D1EffectContext_CreateBlendTransform(effect_context, 2, &blend_desc, &blend_transform); todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (!offset_transform || !blend_transform) + if (!blend_transform) goto done;
/* Add nodes */ @@ -12139,8 +12139,8 @@ done:
static void test_offset_transform(BOOL d3d11) { - ID2D1OffsetTransform *transform = NULL; ID2D1EffectContext *effect_context; + ID2D1OffsetTransform *transform; D2D1_PROPERTY_BINDING binding; struct d2d1_test_context ctx; ID2D1Factory1 *factory; @@ -12178,9 +12178,7 @@ static void test_offset_transform(BOOL d3d11) offset.x = 1; offset.y = 2; hr = ID2D1EffectContext_CreateOffsetTransform(effect_context, offset, &transform); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (hr != S_OK) - goto done; + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); offset = ID2D1OffsetTransform_GetOffset(transform); ok(offset.x == 1 && offset.y == 2, "Got unexpected offset {%ld, %ld}.\n", offset.x, offset.y);
@@ -12195,9 +12193,7 @@ static void test_offset_transform(BOOL d3d11) offset = ID2D1OffsetTransform_GetOffset(transform); ok(offset.x == -10 && offset.y == 20, "Got unexpected offset {%ld, %ld}.\n", offset.x, offset.y);
-done: - if (transform) - ID2D1OffsetTransform_Release(transform); + ID2D1OffsetTransform_Release(transform); ID2D1Effect_Release(effect); hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
Nikolay Sivov (@nsivov) commented about include/d2derr.h:
#ifndef __WINE_D2DERR_H #define __WINE_D2DERR_H
+#define D2DERR_NOT_FOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND)
I don't see in 10.0.2200.0 SDK. Where does it come from?