[PATCH v2] d2d1: Implement ID2D1DeviceContext::CreateImageBrush().

Dmitry Timoshkov dmitry at baikal.ru
Fri May 6 14:33:49 CDT 2022


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> > +static void STDMETHODCALLTYPE d2d_image_brush_SetImage(ID2D1ImageBrush *iface, ID2D1Image *image)
> > +{
> > +    struct d2d_brush *brush = impl_from_ID2D1ImageBrush(iface);
> > +
> > +    TRACE("iface %p, image %p.\n", iface, image);
> > +
> > +    if (brush->u.image.image)
> > +        ID2D1Image_Release(brush->u.image.image);
> > +    brush->u.image.image = image;
> > +}
> This one is probably missing an AddRef. Is it possible to have null 
> images here? If not, it could be unconditional here, and on release.

This implementation is based on the ::SetBitmap(), and it looks like
I really missed the AddRef, thanks for spotting that, much appreciated.

-- 
Dmitry.



More information about the wine-devel mailing list