[Bf-blender-cvs] [394b48029c5] master: Sculpt: Remove partial viewport updates from sculpt stroke code
Pablo Dobarro
noreply at git.blender.org
Mon Dec 30 16:25:47 CET 2019
Commit: 394b48029c5335381f774f83524ad6ee5cb986da
Author: Pablo Dobarro
Date: Wed Dec 18 17:35:03 2019 +0100
Branches: master
https://developer.blender.org/rB394b48029c5335381f774f83524ad6ee5cb986da
Sculpt: Remove partial viewport updates from sculpt stroke code
Partial updates are not currently supported in the Workbench engine, so
we can skip the rect calculation during the stroke.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6444
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index b26d706bbf4..10772fa68ba 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -7212,9 +7212,7 @@ static void sculpt_flush_update_step(bContext *C, SculptUpdateType update_flags)
ED_region_tag_redraw(ar);
}
else {
- /* Fast path where we just update the BVH nodes that changed, and redraw
- * only the part of the 3D viewport where changes happened. */
- rcti r;
+ /* Fast path where we just update the BVH nodes that changed. */
if (update_flags & SCULPT_UPDATE_COORDS) {
BKE_pbvh_update_bounds(ss->pbvh, PBVH_UpdateBB);
@@ -7224,21 +7222,7 @@ static void sculpt_flush_update_step(bContext *C, SculptUpdateType update_flags)
sculpt_update_object_bounding_box(ob);
}
- if (sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, &r)) {
- if (ss->cache) {
- ss->cache->current_r = r;
- }
-
- /* previous is not set in the current cache else
- * the partial rect will always grow */
- sculpt_extend_redraw_rect_previous(ob, &r);
-
- r.xmin += ar->winrct.xmin - 2;
- r.xmax += ar->winrct.xmin + 2;
- r.ymin += ar->winrct.ymin - 2;
- r.ymax += ar->winrct.ymin + 2;
- ED_region_tag_redraw_partial(ar, &r, true);
- }
+ ED_region_tag_redraw(ar);
}
}
More information about the Bf-blender-cvs
mailing list