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

Dmitry Timoshkov dmitry at baikal.ru
Wed May 25 10:58:29 CDT 2022


Dmitry Timoshkov <dmitry at baikal.ru> 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.
> 
> v2: Fix test crashes with image == NULL.
> v3: Add a QueryInterface() check to SetImage().

Is there anything that could be improved in this patch to make it acceptable?
Probably I should add once again, that this patch allows a bitmap work as an
image brush (unlike current broken state) and actually makes work the app that
have here.

-- 
Dmitry.



More information about the wine-devel mailing list