Signed-off-by: Ziqing Hui zhui@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); +}