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
fd9f1e44
Commit
fd9f1e44
authored
Jun 18, 2022
by
Ziqing Hui
Committed by
Alexandre Julliard
Jun 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement UnregisterEffect().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
967bd312
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
17 deletions
+31
-17
factory.c
dlls/d2d1/factory.c
+18
-2
d2d1.c
dlls/d2d1/tests/d2d1.c
+13
-15
No files found.
dlls/d2d1/factory.c
View file @
fd9f1e44
...
...
@@ -953,9 +953,25 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Facto
static
HRESULT
STDMETHODCALLTYPE
d2d_factory_UnregisterEffect
(
ID2D1Factory3
*
iface
,
REFCLSID
effect_id
)
{
FIXME
(
"iface %p, effect_id %s stub!
\n
"
,
iface
,
debugstr_guid
(
effect_id
));
struct
d2d_factory
*
factory
=
impl_from_ID2D1Factory3
(
iface
);
struct
d2d_effect_registration
*
effect
;
return
E_NOTIMPL
;
TRACE
(
"iface %p, effect_id %s.
\n
"
,
iface
,
debugstr_guid
(
effect_id
));
LIST_FOR_EACH_ENTRY
(
effect
,
&
factory
->
effects
,
struct
d2d_effect_registration
,
entry
)
{
if
(
IsEqualGUID
(
effect_id
,
&
effect
->
id
))
{
if
(
!--
effect
->
registration_count
)
{
list_remove
(
&
effect
->
entry
);
d2d_effect_registration_cleanup
(
effect
);
}
return
S_OK
;
}
}
return
D2DERR_EFFECT_IS_NOT_REGISTERED
;
}
static
HRESULT
STDMETHODCALLTYPE
d2d_factory_GetRegisteredEffects
(
ID2D1Factory3
*
iface
,
...
...
dlls/d2d1/tests/d2d1.c
View file @
fd9f1e44
...
...
@@ -10715,7 +10715,7 @@ static void test_effect_register(BOOL d3d11)
winetest_push_context
(
"Test %u"
,
i
);
hr
=
ID2D1Factory1_RegisterEffectFromString
(
factory
,
&
CLSID_TestEffect
,
test
->
xml
,
NULL
,
0
,
effect_impl_create
);
todo_wine_if
(
test
->
hr
!=
S_OK
)
todo_wine_if
(
i
==
5
)
ok
(
hr
==
test
->
hr
,
"Got unexpected hr %#lx, expected %#lx.
\n
"
,
hr
,
test
->
hr
);
if
(
hr
==
S_OK
)
{
...
...
@@ -10723,9 +10723,9 @@ static void test_effect_register(BOOL d3d11)
hr
=
ID2D1DeviceContext_CreateEffect
(
device_context
,
&
CLSID_TestEffect
,
&
effect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
if
(
effect
)
ID2D1Effect_Release
(
effect
);
}
...
...
@@ -10748,11 +10748,11 @@ static void test_effect_register(BOOL d3d11)
hr
=
ID2D1Factory1_RegisterEffectFromString
(
factory
,
&
CLSID_TestEffect
,
test
->
xml
,
NULL
,
0
,
effect_impl_create
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
winetest_pop_context
();
}
...
...
@@ -10787,9 +10787,9 @@ static void test_effect_register(BOOL d3d11)
}
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Register effect with property binding */
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
binding_tests
);
++
i
)
...
...
@@ -10799,7 +10799,6 @@ static void test_effect_register(BOOL d3d11)
hr
=
ID2D1Factory1_RegisterEffectFromString
(
factory
,
&
CLSID_TestEffect
,
test
->
effect_xml
,
test
->
binding
,
test
->
binding_count
,
effect_impl_create
);
todo_wine_if
(
test
->
hr
!=
S_OK
)
ok
(
hr
==
test
->
hr
,
"Got unexpected hr %#lx, expected %#lx.
\n
"
,
hr
,
test
->
hr
);
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
...
...
@@ -10848,13 +10847,13 @@ static void test_effect_register(BOOL d3d11)
}
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
/* Unregister builtin effect */
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_D2D1Composite
);
todo_wine
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D2DERR_EFFECT_IS_NOT_REGISTERED
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
release_test_context
(
&
ctx
);
}
...
...
@@ -10932,7 +10931,6 @@ done:
if
(
effect
)
ID2D1Effect_Release
(
effect
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
release_test_context
(
&
ctx
);
}
...
...
@@ -11089,7 +11087,7 @@ static void test_effect_properties(BOOL d3d11)
if
(
effect
)
ID2D1Effect_Release
(
effect
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
winetest_pop_context
();
}
...
...
@@ -11182,7 +11180,7 @@ done:
if
(
effect
)
ID2D1Effect_Release
(
effect
);
hr
=
ID2D1Factory1_UnregisterEffect
(
factory
,
&
CLSID_TestEffect
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
release_test_context
(
&
ctx
);
}
...
...
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