From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d2d1/effect.c | 16 ++++++++++++++++ dlls/d2d1/tests/d2d1.c | 8 ++------ 2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index bd885b38df3..ac17d36a50e 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -1128,6 +1128,21 @@ L"<?xml version='1.0'?> \ <Property name='ScaleMode' type='enum' /> \ </Effect>";
+static const WCHAR arithmetic_composite_description[] = +L"<?xml version='1.0'?> \ + <Effect> \ + <Property name='DisplayName' type='string' value='Arithmetic Composite'/> \ + <Property name='Author' type='string' value='The Wine Project'/> \ + <Property name='Category' type='string' value='Stub'/> \ + <Property name='Description' type='string' value='Arithmetic Composite'/> \ + <Inputs minimum='2' maximum='2' > \ + <Input name='Source1'/> \ + <Input name='Source2'/> \ + </Inputs> \ + <Property name='Coefficients' type='vector4' /> \ + <Property name='ClampOutput' type='bool' /> \ + </Effect>"; + void d2d_effects_init_builtins(struct d2d_factory *factory) { static const struct builtin_description @@ -1147,6 +1162,7 @@ void d2d_effects_init_builtins(struct d2d_factory *factory) { &CLSID_D2D1Flood, flood_description }, { &CLSID_D2D1GaussianBlur, gaussian_blur_description }, { &CLSID_D2D1PointSpecular, point_specular_description }, + { &CLSID_D2D1ArithmeticComposite, arithmetic_composite_description }, }; unsigned int i; HRESULT hr; diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 34b761945e5..866c1faede2 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -11566,6 +11566,7 @@ static void test_builtin_effect(BOOL d3d11) {&CLSID_D2D1Flood, 1, 0, 0, 0}, {&CLSID_D2D1GaussianBlur, 1, 1, 1, 1}, {&CLSID_D2D1PointSpecular, 1, 1, 1, 1}, + {&CLSID_D2D1ArithmeticComposite, 1, 2, 2, 2}, };
if (!init_test_context(&ctx, d3d11)) @@ -13498,13 +13499,7 @@ static void test_effect_arithmetic_composite(BOOL d3d11) context = ctx.context;
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D1ArithmeticComposite, &effect); - todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); - if (hr != S_OK) - { - release_test_context(&ctx); - return; - }
check_system_properties(effect);
@@ -13519,6 +13514,7 @@ static void test_effect_arithmetic_composite(BOOL d3d11) }
vec4 = effect_get_vec4_prop(effect, D2D1_ARITHMETICCOMPOSITE_PROP_COEFFICIENTS); + todo_wine ok(vec4.x == 1.0f && vec4.y == 0.0f && vec4.z == 0.0f && vec4.w == 0.0f, "Unexpected value {%.8e,%.8e,%.8e,%.8e}.\n", vec4.x, vec4.y, vec4.z, vec4.w);