[PATCH 4/5] d2d1: Introduce unsafe_impl_from_ID2D1Effect().
Ziqing Hui
zhui at codeweavers.com
Wed Apr 20 03:04:28 CDT 2022
Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
---
dlls/d2d1/d2d1_private.h | 1 +
dlls/d2d1/effect.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h
index aa8e8569455..53c96461bab 100644
--- a/dlls/d2d1/d2d1_private.h
+++ b/dlls/d2d1/d2d1_private.h
@@ -590,6 +590,7 @@ struct d2d_effect
};
HRESULT d2d_effect_init(struct d2d_effect *effect, ID2D1Factory *factory, const CLSID *effect_id) DECLSPEC_HIDDEN;
+struct d2d_effect *unsafe_impl_from_ID2D1Effect(ID2D1Effect *iface) DECLSPEC_HIDDEN;
static inline BOOL d2d_array_reserve(void **elements, size_t *capacity, size_t count, size_t size)
{
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c
index 601932b005b..0bf13c22bab 100644
--- a/dlls/d2d1/effect.c
+++ b/dlls/d2d1/effect.c
@@ -394,3 +394,11 @@ HRESULT d2d_effect_init(struct d2d_effect *effect, ID2D1Factory *factory, const
WARN("Unsupported effect clsid %s.\n", debugstr_guid(effect_id));
return E_FAIL;
}
+
+struct d2d_effect *unsafe_impl_from_ID2D1Effect(ID2D1Effect *iface)
+{
+ if (!iface)
+ return NULL;
+ assert(iface->lpVtbl == (ID2D1EffectVtbl *)&d2d_effect_vtbl);
+ return CONTAINING_RECORD(iface, struct d2d_effect, ID2D1Effect_iface);
+}
--
2.25.1
More information about the wine-devel
mailing list