[Bf-blender-cvs] [59a1ebabcd2] blender2.8: Cleanup: Remove the "SpaceTime->caches" and "SpaceTimeCache" stuff

Joshua Leung noreply at git.blender.org
Fri Apr 20 19:06:38 CEST 2018


Commit: 59a1ebabcd2e5941fa89d06d7ca2c6c669b417bd
Author: Joshua Leung
Date:   Thu Apr 19 16:28:27 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB59a1ebabcd2e5941fa89d06d7ca2c6c669b417bd

Cleanup: Remove the "SpaceTime->caches" and "SpaceTimeCache" stuff

These were runtime only data, used in pre 2.8 Blender to make use of GL vertex arrays
to draw these more efficiently. Maybe we might restore these sometime as an optimisation
step, but for now, they're not needing and were confusing.

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

M	source/blender/blenloader/intern/readfile.c
M	source/blender/editors/space_action/action_draw.c
M	source/blender/editors/space_time/space_time.c
M	source/blender/makesdna/DNA_space_types.h

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b9f9fc638cc..7ca53e00d1b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6540,10 +6540,6 @@ static void direct_link_area(FileData *fd, ScrArea *area)
 			st->scroll_accum[0] = 0.0f;
 			st->scroll_accum[1] = 0.0f;
 		}
-		else if (sl->spacetype == SPACE_TIME) {
-			SpaceTime *stime = (SpaceTime *)sl;
-			BLI_listbase_clear(&stime->caches);
-		}
 		else if (sl->spacetype == SPACE_SEQ) {
 			SpaceSeq *sseq = (SpaceSeq *)sl;
 			
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index b4005faf2f3..3e9b742480a 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -406,8 +406,7 @@ void timeline_draw_cache(SpaceAction *saction, Object *ob, Scene *scene)
 	unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
 	immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-	/* iterate over pointcaches on the active object, 
-	 * add spacetimecache and vertex array for each */
+	/* iterate over pointcaches on the active object, and draw each one's range */
 	for (pid = pidlist.first; pid; pid = pid->next) {
 		float col[4];
 
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index 42027f10fe6..6882fcd396f 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -132,8 +132,7 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene)
 	unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
 	immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-	/* iterate over pointcaches on the active object, 
-	 * add spacetimecache and vertex array for each */
+	/* iterate over pointcaches on the active object, drawing */
 	for (pid = pidlist.first; pid; pid = pid->next) {
 		float col[4];
 
@@ -811,8 +810,6 @@ static SpaceLink *time_duplicate(SpaceLink *sl)
 	SpaceTime *stime = (SpaceTime *)sl;
 	SpaceTime *stimen = MEM_dupallocN(stime);
 	
-	BLI_listbase_clear(&stimen->caches);
-	
 	return (SpaceLink *)stimen;
 }
 
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 284e6ff9154..44386a4a77b 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -474,14 +474,6 @@ typedef enum eSpaceNla_Flag {
 
 /* Timeline =============================================== */
 
-/* Pointcache drawing data */
-# /* Only store the data array in the cache to avoid constant reallocation. */
-# /* No need to store when saved. */
-typedef struct SpaceTimeCache {
-	struct SpaceTimeCache *next, *prev;
-	float *array;
-} SpaceTimeCache;
-
 /* Timeline View */
 typedef struct SpaceTime {
 	SpaceLink *next, *prev;
@@ -491,8 +483,6 @@ typedef struct SpaceTime {
 	
 	View2D v2d DNA_DEPRECATED;  /* deprecated, copied to region */
 
-	ListBase caches;
-
 	int cache_display;
 	int flag;
 } SpaceTime;



More information about the Bf-blender-cvs mailing list