jrmuizel / raqote

Rust 2D graphics library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parallelize drawing

FloVanGH opened this issue · comments

Hey,

I was thinking about how to parallelize drawing with raqote. My idea is to create for drawing parts that does not overlap a new thread with a new drawtarget and merge the results of the drawtarget after they are finished e.g. with the draw_image method. Would it be a benefit or is will be draw_image a bottleneck? Maybe you know a better way how to parllelize drawing with raqote.

Thank you.

This idea is reasonable. However, the amount of speed up that you see will depend on the content that you're drawing. It will need to be relatively expensive to justify the cost of the extra copy.

Do you have an example where you see slow raqote performance that I could have a look at?

I check all possibilities to improve the performance of OrbTk. And that was one idea. I also checked pathfinder with glutin. It is fast but I having problems with the graphic drivers on some systems e.g. on VMs. There raqote is more portable 😉.

I think I have to compare the current solution and the parallel version and measure. I want also check to use font kit instead of Russ type on Linux, macOS and Windows.