diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-08 15:29:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-08 15:35:34 +0300 |
commit | e830334357d1f73afbeeeb421ffcbed8e99b2fab (patch) | |
tree | 01042f96ba220e1afba8f090730b9933c257d31d /source/blender/editors/mesh/editmesh_select.c | |
parent | 0634fd0e974573d4e9452795ce99b2c8105f9fee (diff) |
Math Lib: use x-span for fill_poly_v2i_n callback
Instead of running the callback per-pixel,
pass the x-span to the callback.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index a770fc26cba..83a1cdbedc6 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -249,10 +249,14 @@ struct LassoMaskData { int width; }; -static void edbm_mask_lasso_px_cb(int x, int y, void *user_data) +static void edbm_mask_lasso_px_cb(int x, int x_end, int y, void *user_data) { struct LassoMaskData *data = user_data; - data->px[(y * data->width) + x] = true; + unsigned int *px = &data->px[(y * data->width) + x]; + do { + *px = true; + px++; + } while (++x != x_end); } |