[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30186] branches/soc-2010-jwilkins/source/ blender: * Bug Fix: dirty rectangles for partial redraw did not include the previous frames rectangles so if the update area did not completely overlap the last frames updates some parts were not updated .

Jason Wilkins Jason.A.Wilkins at gmail.com
Sat Jul 10 19:00:11 CEST 2010


Revision: 30186
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30186
Author:   jwilkins
Date:     2010-07-10 19:00:09 +0200 (Sat, 10 Jul 2010)

Log Message:
-----------
* Bug Fix: dirty rectangles for partial redraw did not include the previous frames rectangles so if the update area did not completely overlap the last frames updates some parts were not updated.  The fix is to keep the previous frames rectangle and combine it with the new frame so the old image gets erased along with drawing the new area.

(No complicated tracking of where the mouse was as implied in the Wiki)

Modified Paths:
--------------
    branches/soc-2010-jwilkins/source/blender/blenkernel/BKE_paint.h
    branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c

Modified: branches/soc-2010-jwilkins/source/blender/blenkernel/BKE_paint.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenkernel/BKE_paint.h	2010-07-10 16:51:59 UTC (rev 30185)
+++ branches/soc-2010-jwilkins/source/blender/blenkernel/BKE_paint.h	2010-07-10 17:00:09 UTC (rev 30186)
@@ -28,6 +28,8 @@
 #ifndef BKE_PAINT_H
 #define BKE_PAINT_H
 
+#include "DNA_vec_types.h"
+
 struct Brush;
 struct MFace;
 struct MultireModifierData;
@@ -96,6 +98,8 @@
 	struct GPUDrawObject *drawobject;
 
 	int modifiers_active;
+
+	rcti previous_r;
 } SculptSession;
 
 void free_sculptsession(struct Object *ob);

Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-10 16:51:59 UTC (rev 30185)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-10 17:00:09 UTC (rev 30186)
@@ -3313,6 +3313,7 @@
 		ED_region_tag_redraw(ar);
 	}
 	else {
+		rcti tmp;
 		rcti r;
 
 		BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB, NULL);
@@ -3323,7 +3324,14 @@
 			r.xmax += ar->winrct.xmin - 1;
 			r.ymin += ar->winrct.ymin + 1;
 			r.ymax += ar->winrct.ymin - 1;
-			
+
+			tmp = r;
+
+			if (!BLI_rcti_is_empty(&ss->previous_r))
+				BLI_union_rcti(&r, &ss->previous_r);
+
+			ss->previous_r = tmp;
+
 			ss->partial_redraw = 1;
 			ED_region_tag_redraw_partial(ar, &r);
 		}





More information about the Bf-blender-cvs mailing list