Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
054c9d85
Commit
054c9d85
authored
Apr 02, 2024
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1/effect: Implement ConnectToEffectInput().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
fb4548b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
5 deletions
+55
-5
d2d1_private.h
dlls/d2d1/d2d1_private.h
+8
-1
effect.c
dlls/d2d1/effect.c
+36
-4
d2d1.c
dlls/d2d1/tests/d2d1.c
+11
-0
No files found.
dlls/d2d1/d2d1_private.h
View file @
054c9d85
...
@@ -728,12 +728,19 @@ struct d2d_transform_node
...
@@ -728,12 +728,19 @@ struct d2d_transform_node
ID2D1TransformNode
*
object
;
ID2D1TransformNode
*
object
;
};
};
struct
d2d_transform_node_connection
{
struct
d2d_transform_node
*
node
;
unsigned
int
index
;
};
struct
d2d_transform_graph
struct
d2d_transform_graph
{
{
ID2D1TransformGraph
ID2D1TransformGraph_iface
;
ID2D1TransformGraph
ID2D1TransformGraph_iface
;
LONG
refcount
;
LONG
refcount
;
UINT32
input_count
;
struct
d2d_transform_node_connection
*
inputs
;
unsigned
int
input_count
;
struct
list
nodes
;
struct
list
nodes
;
};
};
...
...
dlls/d2d1/effect.c
View file @
054c9d85
...
@@ -279,9 +279,17 @@ static HRESULT d2d_transform_graph_add_node(struct d2d_transform_graph *graph,
...
@@ -279,9 +279,17 @@ static HRESULT d2d_transform_graph_add_node(struct d2d_transform_graph *graph,
static
void
d2d_transform_graph_delete_node
(
struct
d2d_transform_graph
*
graph
,
static
void
d2d_transform_graph_delete_node
(
struct
d2d_transform_graph
*
graph
,
struct
d2d_transform_node
*
node
)
struct
d2d_transform_node
*
node
)
{
{
unsigned
int
i
;
list_remove
(
&
node
->
entry
);
list_remove
(
&
node
->
entry
);
ID2D1TransformNode_Release
(
node
->
object
);
ID2D1TransformNode_Release
(
node
->
object
);
for
(
i
=
0
;
i
<
graph
->
input_count
;
++
i
)
{
if
(
graph
->
inputs
[
i
].
node
==
node
)
memset
(
&
graph
->
inputs
[
i
].
node
,
0
,
sizeof
(
graph
->
inputs
[
i
].
node
));
}
free
(
node
);
free
(
node
);
}
}
...
@@ -336,6 +344,7 @@ static ULONG STDMETHODCALLTYPE d2d_transform_graph_Release(ID2D1TransformGraph *
...
@@ -336,6 +344,7 @@ static ULONG STDMETHODCALLTYPE d2d_transform_graph_Release(ID2D1TransformGraph *
if
(
!
refcount
)
if
(
!
refcount
)
{
{
d2d_transform_graph_clear
(
graph
);
d2d_transform_graph_clear
(
graph
);
free
(
graph
->
inputs
);
free
(
graph
);
free
(
graph
);
}
}
...
@@ -403,11 +412,28 @@ static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectNode(ID2D1TransformG
...
@@ -403,11 +412,28 @@ static HRESULT STDMETHODCALLTYPE d2d_transform_graph_ConnectNode(ID2D1TransformG
}
}
static
HRESULT
STDMETHODCALLTYPE
d2d_transform_graph_ConnectToEffectInput
(
ID2D1TransformGraph
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d2d_transform_graph_ConnectToEffectInput
(
ID2D1TransformGraph
*
iface
,
UINT32
input_index
,
ID2D1TransformNode
*
node
,
UINT32
node_index
)
UINT32
input_index
,
ID2D1TransformNode
*
object
,
UINT32
node_index
)
{
{
FIXME
(
"iface %p, input_index %u, node %p, node_index %u stub!
\n
"
,
iface
,
input_index
,
node
,
node_index
);
struct
d2d_transform_graph
*
graph
=
impl_from_ID2D1TransformGraph
(
iface
);
struct
d2d_transform_node
*
node
;
unsigned
int
count
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, input_index %u, object %p, node_index %u.
\n
"
,
iface
,
input_index
,
object
,
node_index
);
if
(
!
(
node
=
d2d_transform_graph_get_node
(
graph
,
object
)))
return
HRESULT_FROM_WIN32
(
ERROR_NOT_FOUND
);
if
(
input_index
>=
graph
->
input_count
)
return
E_INVALIDARG
;
count
=
ID2D1TransformNode_GetInputCount
(
object
);
if
(
node_index
>=
count
)
return
E_INVALIDARG
;
graph
->
inputs
[
input_index
].
node
=
node
;
graph
->
inputs
[
input_index
].
index
=
node_index
;
return
S_OK
;
}
}
static
void
STDMETHODCALLTYPE
d2d_transform_graph_Clear
(
ID2D1TransformGraph
*
iface
)
static
void
STDMETHODCALLTYPE
d2d_transform_graph_Clear
(
ID2D1TransformGraph
*
iface
)
...
@@ -451,9 +477,15 @@ static HRESULT d2d_transform_graph_create(UINT32 input_count, struct d2d_transfo
...
@@ -451,9 +477,15 @@ static HRESULT d2d_transform_graph_create(UINT32 input_count, struct d2d_transfo
object
->
ID2D1TransformGraph_iface
.
lpVtbl
=
&
d2d_transform_graph_vtbl
;
object
->
ID2D1TransformGraph_iface
.
lpVtbl
=
&
d2d_transform_graph_vtbl
;
object
->
refcount
=
1
;
object
->
refcount
=
1
;
object
->
input_count
=
input_count
;
list_init
(
&
object
->
nodes
);
list_init
(
&
object
->
nodes
);
if
(
!
(
object
->
inputs
=
calloc
(
input_count
,
sizeof
(
*
object
->
inputs
))))
{
free
(
object
);
return
E_OUTOFMEMORY
;
}
object
->
input_count
=
input_count
;
*
graph
=
object
;
*
graph
=
object
;
return
S_OK
;
return
S_OK
;
...
...
dlls/d2d1/tests/d2d1.c
View file @
054c9d85
...
@@ -12727,6 +12727,8 @@ static void test_transform_graph(BOOL d3d11)
...
@@ -12727,6 +12727,8 @@ static void test_transform_graph(BOOL d3d11)
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Add nodes */
/* Add nodes */
hr
=
ID2D1TransformGraph_ConnectToEffectInput
(
graph
,
1
,
(
ID2D1TransformNode
*
)
offset_transform
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_NOT_FOUND
),
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1TransformGraph_AddNode
(
graph
,
(
ID2D1TransformNode
*
)
offset_transform
);
hr
=
ID2D1TransformGraph_AddNode
(
graph
,
(
ID2D1TransformNode
*
)
offset_transform
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1TransformGraph_AddNode
(
graph
,
(
ID2D1TransformNode
*
)
offset_transform
);
hr
=
ID2D1TransformGraph_AddNode
(
graph
,
(
ID2D1TransformNode
*
)
offset_transform
);
...
@@ -12734,6 +12736,15 @@ static void test_transform_graph(BOOL d3d11)
...
@@ -12734,6 +12736,15 @@ static void test_transform_graph(BOOL d3d11)
hr
=
ID2D1TransformGraph_AddNode
(
graph
,
(
ID2D1TransformNode
*
)
blend_transform
);
hr
=
ID2D1TransformGraph_AddNode
(
graph
,
(
ID2D1TransformNode
*
)
blend_transform
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Invalid effect input index. */
hr
=
ID2D1TransformGraph_ConnectToEffectInput
(
graph
,
1
,
(
ID2D1TransformNode
*
)
offset_transform
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Invalid object input index. */
hr
=
ID2D1TransformGraph_ConnectToEffectInput
(
graph
,
0
,
(
ID2D1TransformNode
*
)
offset_transform
,
1
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1TransformGraph_ConnectToEffectInput
(
graph
,
0
,
(
ID2D1TransformNode
*
)
offset_transform
,
0
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Remove nodes */
/* Remove nodes */
hr
=
ID2D1TransformGraph_RemoveNode
(
graph
,
(
ID2D1TransformNode
*
)
offset_transform
);
hr
=
ID2D1TransformGraph_RemoveNode
(
graph
,
(
ID2D1TransformNode
*
)
offset_transform
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment