On Fri Dec 15 16:05:24 2023 +0000, David Kahurani wrote:
I guess the way forward would be:
- Optimize `GdipGetRegionHrgn` in GDI+ which is done in this
MR(assuming we remove the last patch) 2) Optimize `DrawPoly` in gdi32
My thinking is that we will eventually need to implement an equivalent for `GdipGetRegionHrgn` that returns some raw data instead of an HRGN, and more importantly optimizes generally for known bounding boxes (this would include the Graphics bounding box as well as its clip region). See https://gitlab.winehq.org/wine/wine/-/merge_requests/4206 for some of my initial work on that.
If we do the translation outside of gdi32, we can do it by scanline and treat the path as a set of independent line segments. We can then ignore scanlines and line segments outside of our output range. I think `create_polypolygon_region` in win32 does something similar, but sadly I don't think there's a way to pass in a value for `clip_rect` from the outside.