[PATCH 0/2] MR7343: Add some d2d effects.
For React Native. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7343
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- dlls/d2d1/effect.c | 13 +++++++++++++ dlls/d2d1/tests/d2d1.c | 1 + 2 files changed, 14 insertions(+) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 7ea6673e274..11dd7efba99 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -1071,6 +1071,18 @@ L"<?xml version='1.0'?> \ </Inputs> \ </Effect>"; +static const WCHAR color_matrix_description[] = +L"<?xml version='1.0'?> \ + <Effect> \ + <Property name='DisplayName' type='string' value='Color Matrix'/> \ + <Property name='Author' type='string' value='The Wine Project'/> \ + <Property name='Category' type='string' value='Stub'/> \ + <Property name='Description' type='string' value='Color Matrix'/> \ + <Inputs > \ + <Input name='Source'/> \ + </Inputs> \ + </Effect>"; + void d2d_effects_init_builtins(struct d2d_factory *factory) { static const struct builtin_description @@ -1086,6 +1098,7 @@ void d2d_effects_init_builtins(struct d2d_factory *factory) { &CLSID_D2D1Crop, crop_description }, { &CLSID_D2D1Shadow, shadow_description }, { &CLSID_D2D1Grayscale, grayscale_description }, + { &CLSID_D2D1ColorMatrix, color_matrix_description }, }; unsigned int i; HRESULT hr; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 40bcf5079b8..c286eaf4374 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10991,6 +10991,7 @@ static void test_builtin_effect(BOOL d3d11) {&CLSID_D2D1Crop, 1, 1, 1, 1}, {&CLSID_D2D1Shadow, 1, 1, 1, 1}, {&CLSID_D2D1Grayscale, 3, 1, 1, 1}, + {&CLSID_D2D1ColorMatrix, 1, 1, 1, 1}, }; if (!init_test_context(&ctx, d3d11)) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7343
From: Zhiyi Zhang <zzhang(a)codeweavers.com> --- dlls/d2d1/effect.c | 12 ++++++++++++ dlls/d2d1/tests/d2d1.c | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 11dd7efba99..8e7ee8fda64 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -1083,6 +1083,17 @@ L"<?xml version='1.0'?> \ </Inputs> \ </Effect>"; +static const WCHAR flood_description[] = +L"<?xml version='1.0'?> \ + <Effect> \ + <Property name='DisplayName' type='string' value='Flood'/> \ + <Property name='Author' type='string' value='The Wine Project'/> \ + <Property name='Category' type='string' value='Stub'/> \ + <Property name='Description' type='string' value='Flood'/> \ + <Inputs minimum='0' maximum='0' > \ + </Inputs> \ + </Effect>"; + void d2d_effects_init_builtins(struct d2d_factory *factory) { static const struct builtin_description @@ -1099,6 +1110,7 @@ void d2d_effects_init_builtins(struct d2d_factory *factory) { &CLSID_D2D1Shadow, shadow_description }, { &CLSID_D2D1Grayscale, grayscale_description }, { &CLSID_D2D1ColorMatrix, color_matrix_description }, + { &CLSID_D2D1Flood, flood_description }, }; unsigned int i; HRESULT hr; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index c286eaf4374..b2aa58d36b3 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10992,6 +10992,7 @@ static void test_builtin_effect(BOOL d3d11) {&CLSID_D2D1Shadow, 1, 1, 1, 1}, {&CLSID_D2D1Grayscale, 3, 1, 1, 1}, {&CLSID_D2D1ColorMatrix, 1, 1, 1, 1}, + {&CLSID_D2D1Flood, 1, 0, 0, 0}, }; if (!init_test_context(&ctx, d3d11)) @@ -11140,7 +11141,7 @@ static void test_builtin_effect(BOOL d3d11) winetest_push_context("Input %u", j); image_a = (ID2D1Image *)0xdeadbeef; ID2D1Effect_GetInput(effect, j, &image_a); - if (j == 0) + if (j == 0 && input_count > 0) { ok(image_a == (ID2D1Image *)bitmap, "Got unexpected image_a %p.\n", image_a); ID2D1Image_Release(image_a); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7343
Commit messages should mention that stubs are added, not something that works. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7343#note_94861
participants (3)
-
Nikolay Sivov (@nsivov) -
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)