On 4/28/22 13:40, Ziqing Hui wrote:
+void d2d_effect_context_init(struct d2d_effect_context *effect_context) +{
- effect_context->ID2D1EffectContext_iface.lpVtbl = &d2d_effect_context_vtbl;
- effect_context->refcount = 1;
+}
This patch introduces unused code. To avoid that I would move existing device_context->CreateEffect() to effect_context->CreateEffect() right away in the first patch.
Regarding init helper and patches 2, 4, 7, it seems easier to keep "struct d2d_device_context *" in effect context instead. It provides access to the factory and d3d device.