diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-03-06 21:54:44 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-03-06 21:54:44 +0400 |
commit | 2a167dafc2bf1582d6f56e0feab9f57ef9d48d5e (patch) | |
tree | c4e4a5316483cdd49cf24beb0d39f8651d7f1f94 | |
parent | 43486bbdb9772c6912538377c5d257d8667dc99d (diff) |
Forgo one rect union function, partial rect is inferred from nodes that
are tagged for update anyway. The important part of the fix was updating
the previous rectangle in the draw function.
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index a60e3a806f1..e2df6a4a197 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -511,19 +511,6 @@ static void sculpt_extend_redraw_rect_previous(Object *ob, rcti *rect) } } -static void sculpt_extend_redraw_rect_current(Object *ob, rcti *rect) -{ - /* redraw rectangles do not get flushed immediately. There may be many update steps - * before a redraw is issued. All those need to be accumulated this happens in the current_r - * which is finally united with the previous rectangle to get the final rectangle */ - SculptSession *ss = ob->sculpt; - - if (ss->cache) { - if (!BLI_rcti_is_empty(&ss->cache->current_r)) - BLI_rcti_union(rect, &ss->cache->current_r); - } -} - /* Get a screen-space rectangle of the modified area */ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, Object *ob, rcti *rect) @@ -567,7 +554,6 @@ void sculpt_get_redraw_planes(float planes[4][4], ARegion *ar, * the current. Thus we avoid the rectangle needlessly growing to include * all the stroke area */ ob->sculpt->cache->previous_r = ob->sculpt->cache->current_r; - BLI_rcti_init(&ob->sculpt->cache->current_r, 0, 0, 0, 0); /* clear redraw flag from nodes */ if (pbvh) @@ -4434,8 +4420,6 @@ static void sculpt_flush_update(bContext *C) sculpt_update_object_bounding_box(ob); if (sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, &r)) { - sculpt_extend_redraw_rect_current(ob, &r); - if (ss->cache) { ss->cache->current_r = r; } |