diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-11 14:09:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-11 16:21:41 +0300 |
commit | 114e7eaa0994b07d44b5a9ed5a4b8b14ef9b0791 (patch) | |
tree | cb5ddc3e98086fb47213ccdb90a2be45357974d9 /source/blender/editors/mesh/editmesh_select.c | |
parent | 02b36188737b3e15fe8173dec7a57da7da610922 (diff) |
Add WM_framebuffer_to_index_array
Convert buffer to index in one loop,
also minor cleanup to backbuf/selection functions.
- Use IMB_rectcpy instead of inline pixel copy.
- Redundant WM_framebuffer_to_index call.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 8c2bc154e30..0e4630f7029 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -203,8 +203,9 @@ bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xma } buf = ED_view3d_backbuf_read(vc, xmin, ymin, xmax, ymax); - if (buf == NULL) return false; - if (bm_vertoffs == 0) return false; + if ((buf == NULL) || (bm_vertoffs == 0)) { + return false; + } dr = buf->rect; @@ -278,8 +279,9 @@ bool EDBM_backbuf_border_mask_init(ViewContext *vc, const int mcords[][2], short } buf = ED_view3d_backbuf_read(vc, xmin, ymin, xmax, ymax); - if (buf == NULL) return false; - if (bm_vertoffs == 0) return false; + if ((buf == NULL) || (bm_vertoffs == 0)) { + return false; + } dr = buf->rect; @@ -329,8 +331,9 @@ bool EDBM_backbuf_circle_init(ViewContext *vc, short xs, short ys, short rads) xmin = xs - rads; xmax = xs + rads; ymin = ys - rads; ymax = ys + rads; buf = ED_view3d_backbuf_read(vc, xmin, ymin, xmax, ymax); - if (bm_vertoffs == 0) return false; - if (buf == NULL) return false; + if ((buf == NULL) || (bm_vertoffs == 0)) { + return false; + } dr = buf->rect; |