Blender Git Loki

Git Commits -> Revision 44522a5

Revision 44522a5 by Campbell Barton (master)
October 26, 2016, 12:24 (GMT)
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.

Commit Details:

Full Hash: 44522a5b98f908928e93ab32c9d6046de4342d9b
Parent Commit: 8125271
Lines Changed: +186, -36

1 Modified Path:

/source/blender/blenlib/intern/bitmap_draw_2d.c (+186, -36) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021