[Bf-blender-cvs] [3083a9c05e8] greasepencil-object: Fix memory leak in GPU

Antonio Vazquez noreply at git.blender.org
Tue Oct 24 19:27:21 CEST 2017


Commit: 3083a9c05e87ec2cfde4f9b2e8d25313feb112d3
Author: Antonio Vazquez
Date:   Tue Oct 24 19:26:59 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rB3083a9c05e87ec2cfde4f9b2e8d25313feb112d3

Fix memory leak in GPU

The problem was the flag was not checked and in some situations this avoided the batch clear.

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 75a255f341e..c76e1c3909e 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -134,6 +134,10 @@ static bool gpencil_batch_cache_valid(Object *ob, bGPdata *gpd, int cfra)
 		return false;
 	}
 
+	if (cache->is_dirty) {
+		return false;
+	}
+
 	return true;
 }



More information about the Bf-blender-cvs mailing list