mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:31:39 +00:00
d2d1/effect: Implement SetPassthroughGraph().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
e4db1b39ea
commit
be646151b9
|
@ -771,6 +771,9 @@ struct d2d_transform_graph
|
|||
|
||||
struct d2d_transform_node *output;
|
||||
|
||||
bool passthrough;
|
||||
unsigned int passthrough_input;
|
||||
|
||||
struct list nodes;
|
||||
};
|
||||
|
||||
|
|
|
@ -659,6 +659,7 @@ static void d2d_transform_graph_clear(struct d2d_transform_graph *graph)
|
|||
{
|
||||
d2d_transform_graph_delete_node(graph, node);
|
||||
}
|
||||
graph->passthrough = false;
|
||||
}
|
||||
|
||||
static inline struct d2d_transform_graph *impl_from_ID2D1TransformGraph(ID2D1TransformGraph *iface)
|
||||
|
@ -788,6 +789,7 @@ static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetOutputNode(ID2D1Transfor
|
|||
return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
|
||||
|
||||
graph->output = node;
|
||||
graph->passthrough = false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -821,6 +823,7 @@ static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectToEffectInput(ID2D1T
|
|||
|
||||
graph->inputs[input_index].node = node;
|
||||
graph->inputs[input_index].index = node_index;
|
||||
graph->passthrough = false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -836,9 +839,19 @@ static void STDMETHODCALLTYPE d2d_transform_graph_Clear(ID2D1TransformGraph *ifa
|
|||
|
||||
static HRESULT STDMETHODCALLTYPE d2d_transform_graph_SetPassthroughGraph(ID2D1TransformGraph *iface, UINT32 index)
|
||||
{
|
||||
FIXME("iface %p, index %u stub!\n", iface, index);
|
||||
struct d2d_transform_graph *graph = impl_from_ID2D1TransformGraph(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, index %u.\n", iface, index);
|
||||
|
||||
if (index >= graph->input_count)
|
||||
return E_INVALIDARG;
|
||||
|
||||
d2d_transform_graph_clear(graph);
|
||||
|
||||
graph->passthrough = true;
|
||||
graph->passthrough_input = index;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const ID2D1TransformGraphVtbl d2d_transform_graph_vtbl =
|
||||
|
|
|
@ -12914,6 +12914,13 @@ static void test_transform_graph(BOOL d3d11)
|
|||
todo_wine
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
/* Passthrough graph. */
|
||||
hr = ID2D1TransformGraph_SetPassthroughGraph(graph, 100);
|
||||
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
hr = ID2D1TransformGraph_SetPassthroughGraph(graph, 0);
|
||||
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
|
||||
|
||||
ID2D1BlendTransform_Release(blend_transform);
|
||||
ID2D1OffsetTransform_Release(offset_transform);
|
||||
ID2D1Effect_Release(effect);
|
||||
|
|
Loading…
Reference in a new issue