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

Henri Verbeet hverbeet at gmail.com
Thu May 12 11:59:07 CDT 2022


On Thu, 12 May 2022 at 18:55, Dmitry Timoshkov <dmitry at baikal.ru> wrote:
> Henri Verbeet <hverbeet at gmail.com> wrote:
> > This ignores "image_brush_desc->sourceRectangle". That's fine to some
> > extent, but might be easy to overlook when implementing
> > d2d_image_brush_SetSourceRectangle()/d2d_image_brush_GetSourceRectangle()
> > later.
>
> Also good point, is that fine to just add a FIXME, or it makes sense to also
> save it in the bitmap?

A FIXME should be fine.

> > This doesn't seem wrong, although we could probably introduce a common
> > helper for this and d2d_brush_bind_bitmap(). At the same time though,
> > it's not going to do much as long as the pixel shader (i.e., ps_code[]
> > in d2d_device_context_init()) doesn't handle image brushes. (And in
> > it's current form, we never get here because we set the brush type to
> > D2D_BRUSH_TYPE_BITMAP in d2d_image_brush_create().) It might be best
> > to just go with the FIXME in d2d_brush_bind_resources(), unless we
> > need the brush to actually work.
>
> Thanks for the review and suggestions, I guess that adding a FIXME could be
> a reasonable approach at this point.

Right, but note that there's an existing FIXME in
d2d_brush_bind_resources() that would catch this.



More information about the wine-devel mailing list