Commit 7c969b05 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1/effect: Implement SetSingleTransformNode().

parent 3d64da16
......@@ -364,11 +364,33 @@ static UINT32 STDMETHODCALLTYPE d2d_transform_graph_GetInputCount(ID2D1Transform
}
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetSingleTransformNode(ID2D1TransformGraph *iface,
ID2D1TransformNode *node)
ID2D1TransformNode *object)
{
FIXME("iface %p, node %p stub!\n", iface, node);
struct d2d_transform_graph *graph = impl_from_ID2D1TransformGraph(iface);
struct d2d_transform_node *node;
unsigned int i, input_count;
HRESULT hr;
return E_NOTIMPL;
TRACE("iface %p, object %p.\n", iface, object);
d2d_transform_graph_clear(graph);
if (FAILED(hr = d2d_transform_graph_add_node(graph, object)))
return hr;
node = d2d_transform_graph_get_node(graph, object);
graph->output = node;
input_count = ID2D1TransformNode_GetInputCount(object);
if (graph->input_count != input_count)
return E_INVALIDARG;
for (i = 0; i < graph->input_count; ++i)
{
graph->inputs[i].node = node;
graph->inputs[i].index = i;
}
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_AddNode(ID2D1TransformGraph *iface,
......
......@@ -12731,6 +12731,18 @@ static void test_transform_graph(BOOL d3d11)
ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Got unexpected hr %#lx.\n", hr);
hr = ID2D1TransformGraph_SetOutputNode(graph, (ID2D1TransformNode *)offset_transform);
ok(hr == HRESULT_FROM_WIN32(ERROR_NOT_FOUND), "Got unexpected hr %#lx.\n", hr);
/* Single input effect, single input node. */
hr = ID2D1TransformGraph_SetSingleTransformNode(graph, (ID2D1TransformNode *)offset_transform);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
/* Single input effect, two-input node. */
hr = ID2D1TransformGraph_SetSingleTransformNode(graph, (ID2D1TransformNode *)blend_transform);
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1TransformGraph_AddNode(graph, (ID2D1TransformNode *)blend_transform);
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
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 *)offset_transform);
......@@ -14507,13 +14519,7 @@ static void test_effect_custom_pixel_shader(BOOL d3d11)
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_TestEffect, &effect);
todo_wine
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr))
{
release_test_context(&ctx);
return;
}
set_size_u(&input_size, 1, 1);
pixel = 0xabcd00ff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment