static void STDMETHODCALLTYPE d2d_linear_gradient_brush_GetFactory(ID2D1LinearGradientBrush *iface, ID2D1Factory **factory) { struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface); TRACE("iface %p, factory %p.\n", iface, factory); ID2D1Factory_AddRef(*factory = brush->factory); }
static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_AddRef(ID2D1LinearGradientBrush *iface) { struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface); ULONG refcount = InterlockedIncrement(&brush->refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount); return refcount; }
static ULONG STDMETHODCALLTYPE d2d_linear_gradient_brush_Release(ID2D1LinearGradientBrush *iface) { struct d2d_brush *brush = impl_from_ID2D1LinearGradientBrush(iface); ULONG refcount = InterlockedDecrement(&brush->refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount); if (!refcount) HeapFree(GetProcessHeap(), 0, brush); return refcount; }