Campbell Barton 44522a5b98 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.
2016-10-26 23:24:58 +11:00
2016-10-25 17:34:01 +02:00
2016-09-30 10:36:11 +02:00
2016-10-25 18:29:13 +02:00
2013-12-24 22:57:27 +06:00
2016-07-15 01:28:00 +10:00
2016-07-15 01:26:26 +10:00
S
Description
No description provided
925 MiB
Languages
C++ 78%
Python 11%
C 6.3%
GLSL 2.2%
CMake 1.3%
Other 1.1%