You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drawing TT2020 glyphs is possible, but renders on my machine at only around 15FPS. Not as bad as FontForge's 0.33FPS, but not ideal.
I think it's mostly due to how many paths we're creating. (perf backs this theory up if I'm reading it right.) I think I can solve this with a little good old fashioned indirection, by drawing every point that will be the same color/stroke width in a single path.
15 FPS:
60+ FPS:
(Also, we probably shouldn't draw selected points twice, but this isn't as big a problem as creating thousands of Paths/Paints.)
Rust iterators should make this easier. Basically the current draw_point will just add a rect/triangle/circle to a one-per-render_frame struct, then we'll draw all the points with only four or five Paths/Paints.
This might be post-1.0 as it's premature optimization, but am writing it down so don't forget.
The text was updated successfully, but these errors were encountered:
I'm going to look into batching the point/direction markers into a single path (well two with selected taken into account). This should improve performance for these types of cases.
Drawing TT2020 glyphs is possible, but renders on my machine at only around 15FPS. Not as bad as FontForge's 0.33FPS, but not ideal.
I think it's mostly due to how many paths we're creating. (
perf
backs this theory up if I'm reading it right.) I think I can solve this with a little good old fashioned indirection, by drawing every point that will be the same color/stroke width in a single path.15 FPS:
60+ FPS:
(Also, we probably shouldn't draw selected points twice, but this isn't as big a problem as creating thousands of
Path
s/Paint
s.)Rust iterators should make this easier. Basically the current
draw_point
will just add a rect/triangle/circle to a one-per-render_frame
struct, then we'll draw all the points with only four or fivePath
s/Paint
s.This might be post-1.0 as it's premature optimization, but am writing it down so don't forget.
The text was updated successfully, but these errors were encountered: