[PATCH v4 5/5] d2d1: Implement d2d_effect_GetInput().
Ziqing Hui
zhui at codeweavers.com
Sat Aug 7 23:40:36 CDT 2021
Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
---
dlls/d2d1/effect.c | 9 ++++++++-
dlls/d2d1/tests/d2d1.c | 7 +------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c
index 798b5051647..50894fb6152 100644
--- a/dlls/d2d1/effect.c
+++ b/dlls/d2d1/effect.c
@@ -245,7 +245,14 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UI
static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input)
{
- FIXME("iface %p, index %u, input %p stub!\n", iface, index, input);
+ struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
+
+ TRACE("iface %p, index %u, input %p.\n", iface, index, input);
+
+ if (index < effect->input_count && effect->inputs[index])
+ ID2D1Image_AddRef(*input = effect->inputs[index]);
+ else
+ *input = NULL;
}
static UINT32 STDMETHODCALLTYPE d2d_effect_GetInputCount(ID2D1Effect *iface)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index d8cc3989261..f655274754e 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -9822,7 +9822,6 @@ static void test_effect(BOOL d3d11)
{
winetest_push_context("Input %u", j);
ID2D1Effect_GetInput(effect, j, &image_a);
- todo_wine
ok(image_a == NULL, "Got unexpected image_a %p.\n", image_a);
winetest_pop_context();
}
@@ -9843,14 +9842,11 @@ static void test_effect(BOOL d3d11)
ID2D1Effect_GetInput(effect, j, &image_a);
if (j == 0)
{
- todo_wine
ok(image_a == (ID2D1Image *)bitmap, "Got unexpected image_a %p.\n", image_a);
- if (image_a == (ID2D1Image *)bitmap)
- ID2D1Image_Release(image_a);
+ ID2D1Image_Release(image_a);
}
else
{
- todo_wine
ok(image_a == NULL, "Got unexpected image_a %p.\n", image_a);
}
winetest_pop_context();
@@ -9862,7 +9858,6 @@ static void test_effect(BOOL d3d11)
image_a = (ID2D1Image *)0xdeadbeef;
ID2D1Effect_SetInput(effect, j, (ID2D1Image *)bitmap, FALSE);
ID2D1Effect_GetInput(effect, j, &image_a);
- todo_wine
ok(image_a == NULL, "Got unexpected image_a %p.\n", image_a);
winetest_pop_context();
}
--
2.25.1
More information about the wine-devel
mailing list