Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-01-09 23:23:49 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-09 23:23:49 +0400
commit3d10343888325b4fcf3ca45c76e3a418594e9767 (patch)
tree720b6a38136ee2c573b5e2dc28d24e329184da2e /source/blender/blenkernel
parent492277b4a140f153a760a5cb5f110bab4d8039ce (diff)
Code cleanup: remove WIP code came from the GSoC branch
DAG node tagging was rather an experiment to make derived render working. However, it ended up in a whole can of worms and need to be re-considered. It is likely that regular object update tagging and scene update routines are to be used for this. Meanwhile no need to keep extra field in dag node. Would save us the whole byte of the struct which we can use for other purposes meanwhile.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_depsgraph.h6
-rw-r--r--source/blender/blenkernel/depsgraph_private.h2
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c76
3 files changed, 3 insertions, 81 deletions
diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h
index be5ae7fc353..76ce8c327ac 100644
--- a/source/blender/blenkernel/BKE_depsgraph.h
+++ b/source/blender/blenkernel/BKE_depsgraph.h
@@ -145,14 +145,10 @@ void DAG_threaded_update_handle_node_updated(void *node_v,
void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Object *ob);
-/* Tagging and querying */
-void DAG_tag_clear_nodes(struct Scene *scene);
-void DAG_tag_node_for_object(struct Scene *scene, void *object);
-void DAG_tag_flush_nodes(struct Scene *scene);
+/* ************************ DAG querying ********************* */
struct Object *DAG_get_node_object(void *node_v);
const char *DAG_get_node_name(void *node_v);
-bool DAG_get_node_tag(void *node_v);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h
index f4a6e4417e0..8aa929ca793 100644
--- a/source/blender/blenkernel/depsgraph_private.h
+++ b/source/blender/blenkernel/depsgraph_private.h
@@ -99,7 +99,7 @@ typedef struct DagNode {
* Used by threaded update for faster detect whether node could be
* updated aready.
*/
- bool tag, scheduled;
+ bool scheduled;
} DagNode;
typedef struct DagNodeQueueElem {
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index cdbf59d688b..7200ec1560d 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2819,74 +2819,7 @@ void DAG_print_dependencies(Main *bmain, Scene *scene, Object *ob)
dag_print_dependencies = 0;
}
-/* ************************ DAG tagging and querying ********************* */
-
-void DAG_tag_clear_nodes(Scene *scene)
-{
- DagNode *node;
-
- for (node = scene->theDag->DagNode.first; node; node = node->next) {
- node->tag = false;
- }
-}
-
-void DAG_tag_node_for_object(Scene *scene, void *object)
-{
- DagNode *node = dag_get_node(scene->theDag, object);
-
- node->tag = true;
-}
-
-void DAG_tag_flush_nodes(Scene *scene)
-{
- DagNodeQueue *node_queue;
- DagNode *node, *root_node;
-
- node_queue = queue_create(DAGQUEUEALLOC);
-
- for (node = scene->theDag->DagNode.first; node; node = node->next) {
- node->color = DAG_WHITE;
- }
-
- root_node = scene->theDag->DagNode.first;
- root_node->color = DAG_GRAY;
- push_stack(node_queue, root_node);
-
- while (node_queue->count) {
- DagAdjList *itA;
- bool has_new_nodes = false;
-
- node = get_top_node_queue(node_queue);
-
- /* Schedule all child nodes. */
- for (itA = node->child; itA; itA = itA->next) {
- if (itA->node->color == DAG_WHITE) {
- itA->node->color = DAG_GRAY;
- push_stack(node_queue, itA->node);
- has_new_nodes = true;
- }
- }
-
- if (!has_new_nodes) {
- node = pop_queue(node_queue);
- if (node->ob == scene) {
- break;
- }
-
- /* Flush tag from child to current node. */
- for (itA = node->child; itA; itA = itA->next) {
- if (itA->node->tag) {
- node->tag = true;
- break;
- }
- }
-
- node->color = DAG_BLACK;
- }
- }
-
- queue_delete(node_queue);
-}
+/* ************************ DAG querying ********************* */
/* Will return Object ID if node represents Object,
* and will return NULL otherwise.
@@ -2909,10 +2842,3 @@ const char *DAG_get_node_name(void *node_v)
return dag_node_name(node);
}
-
-bool DAG_get_node_tag(void *node_v)
-{
- DagNode *node = node_v;
-
- return node->tag;
-}