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

Dmitry Timoshkov dmitry at baikal.ru
Thu May 19 04:16:20 CDT 2022


Nikolay Sivov <nsivov at codeweavers.com> wrote:

> On 5/19/22 11:56, Dmitry Timoshkov wrote:
> > ID2D1Bitmap derives from ID2D1Image, which in turn derives from ID2D1Resource.
> > That means that ID2D1Device::CreateImageBrush() can't be really passed anything
> > but a ID2D1Bitmap* represented as a ID2D1Image*.
> >
> > I've added QueryInterface+FIXME just in case, probably it could be dropped.
> 
> Command lists and effects outputs are also ID2D1Image, so it's not 
> always a bitmap.

Thanks for pointing that out. Currently images that are not bitmaps can't
work as brushes anyway, Henri already explaned that in response to original
version of my patch. If anything besides bitmaps is supposed to be supported
by ID2D1Device::CreateImageBrush() that needs quite a bit of work. For now
accepting only bitmaps seems a fair limitation, and in fact that makes the app
that I have here happy.

-- 
Dmitry.



More information about the wine-devel mailing list