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
55f80c4e
Commit
55f80c4e
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/tests: Add a test for transform graph input count.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
6ecd59ca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
d2d1.c
dlls/d2d1/tests/d2d1.c
+28
-1
No files found.
dlls/d2d1/tests/d2d1.c
View file @
55f80c4e
...
...
@@ -267,6 +267,9 @@ L"<?xml version='1.0'?> \
<Input name='Source2'/> \
<Input name='Source3'/> \
</Inputs> \
<Property name='Graph' type='iunknown'> \
<Property name='DisplayName' type='string' value='Graph'/> \
</Property> \
</Effect> \
"
;
...
...
@@ -11284,10 +11287,12 @@ static void test_effect_register(BOOL d3d11)
ID2D1DeviceContext
*
device_context
;
ID2D1EffectContext
*
effect_context
;
struct
d2d1_test_context
ctx
;
ID2D1TransformGraph
*
graph
;
unsigned
int
i
,
integer
;
ID2D1Factory1
*
factory
;
WCHAR
display_name
[
64
];
ID2D1Effect
*
effect
;
UINT32
count
;
HRESULT
hr
;
const
struct
xml_test
...
...
@@ -11320,6 +11325,11 @@ static void test_effect_register(BOOL d3d11)
{
L"DeadBeef"
,
effect_impl_set_integer
,
effect_impl_get_integer
},
};
static
const
D2D1_PROPERTY_BINDING
bindings2
[]
=
{
{
L"Graph"
,
NULL
,
effect_impl_get_graph
},
};
const
struct
binding_test
{
const
D2D1_PROPERTY_BINDING
*
binding
;
...
...
@@ -11502,13 +11512,20 @@ static void test_effect_register(BOOL d3d11)
/* Variable input count. */
hr
=
ID2D1Factory1_RegisterEffectFromString
(
factory
,
&
CLSID_TestEffect
,
effect_variable_input_count
,
NULL
,
0
,
effect_impl_create
);
effect_variable_input_count
,
bindings2
,
ARRAY_SIZE
(
bindings2
)
,
effect_impl_create
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1DeviceContext_CreateEffect
(
device_context
,
&
CLSID_TestEffect
,
&
effect
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
integer
=
ID2D1Effect_GetInputCount
(
effect
);
ok
(
integer
==
3
,
"Unexpected input count %u.
\n
"
,
integer
);
hr
=
ID2D1Effect_GetValueByName
(
effect
,
L"Graph"
,
D2D1_PROPERTY_TYPE_IUNKNOWN
,
(
BYTE
*
)
&
graph
,
sizeof
(
graph
));
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
count
=
ID2D1TransformGraph_GetInputCount
(
graph
);
todo_wine
ok
(
count
==
3
,
"Unexpected input count %u.
\n
"
,
count
);
integer
=
0
;
hr
=
ID2D1Effect_GetValue
(
effect
,
D2D1_PROPERTY_MIN_INPUTS
,
D2D1_PROPERTY_TYPE_UINT32
,
(
BYTE
*
)
&
integer
,
sizeof
(
integer
));
...
...
@@ -11529,6 +11546,12 @@ static void test_effect_register(BOOL d3d11)
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
integer
==
3
,
"Unexpected data %u.
\n
"
,
integer
);
hr
=
ID2D1Effect_GetValueByName
(
effect
,
L"Graph"
,
D2D1_PROPERTY_TYPE_IUNKNOWN
,
(
BYTE
*
)
&
graph
,
sizeof
(
graph
));
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
count
=
ID2D1TransformGraph_GetInputCount
(
graph
);
todo_wine
ok
(
count
==
4
,
"Unexpected input count %u.
\n
"
,
count
);
ID2D1Effect_Release
(
effect
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
...
...
@@ -12696,6 +12719,10 @@ static void test_transform_graph(BOOL d3d11)
D2D1_PROPERTY_TYPE_IUNKNOWN
,
(
BYTE
*
)
&
effect_context
,
sizeof
(
effect_context
));
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
count
=
ID2D1TransformGraph_GetInputCount
(
graph
);
todo_wine
ok
(
count
==
1
,
"Unexpected input count %u.
\n
"
,
count
);
/* Create transforms */
hr
=
ID2D1EffectContext_CreateOffsetTransform
(
effect_context
,
point
,
&
offset_transform
);
todo_wine
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