[PATCH v3] d2d1: Make ID2D1Device::CreateImageBrush() accept only bitmap as a source image.

Dmitry Timoshkov dmitry at baikal.ru
Thu May 26 12:40:09 CDT 2022


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> >>>> I suspect black color is from this in sample_brush():
> >>>>
> >>>> return float4(0.0, 0.0, 0.0, brush.opacity);
> >>>>
> >>>> Which means you didn't set brush type correctly in the constant buffer.
> >>> I also think that's the source of the problem. However that's the shader
> >>> code, and you mentioned above that I don't need them to make image brush
> >>> work. Or did I misunderstand something? Do you have a suggestion for that?
> >>>
> >> Brush type is set in d2d_brush_fill_cb(), trying setting it "correctly"
> >> to bitmap brush type.
> > Thank you very much, setting cb->type to TYPE_BITMAP in the TYPE_IMAGE case
> > has fixed painting in my application. Do you think that the patch I attached
> > in my previous reply with this fix is an acceptable solution, or there are
> > other things you'd like to see addressed?
> >
> I think we should avoid duplication of bind_bitmap() function, since 
> it's exactly the same. Probably passing image brush description there, 
> which could be filled from bitmap brush description, expect for source 
> rectangle.

Thanks.

> By the way, in application you're testing, how does it set this source 
> rectangle?

I haven't looked into particular details about this in the logs. Probably
I could try to figure that out if that makes a difference and/or is really
important for the implementation.

-- 
Dmitry.



More information about the wine-devel mailing list