diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-10-26 12:26:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-10-26 15:24:58 +0300 |
commit | 44522a5b98f908928e93ab32c9d6046de4342d9b (patch) | |
tree | 648cce798671cfced20d10276b11cb4d44d5385c /extern/rangetree | |
parent | 8125271ddb29f8e42d00ee7667c24412d67fb2f5 (diff) |
BLI_bitmap_draw_2d: optimize polygon filling
Existing method was fine for basic polygons but didn't scale well
because its was checking all coordinates for every y-pixel.
Heres an optimized version.
Basic logic remains the same this just maintains an ordered list of intersections,
tracking in-out points, to avoid re-computing every row,
this means sorting is only done once when out of order segments are found,
the segments only need to be re-ordered if they cross each other.
Speedup isn't linear, test with full-screen complex lasso gave 11x speedup.
Diffstat (limited to 'extern/rangetree')
0 files changed, 0 insertions, 0 deletions