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>2019-10-10 12:03:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-10-11 11:42:45 +0300
commitc9d6eb4fb42b231037b00d64602ab0c589120cbb (patch)
tree066c13998ed9d6e416fc04165b4dbf6939c1e8c9 /source/blender/depsgraph
parentf9b7f3e930bd5d8dfa7d894df8cd841a71879c0e (diff)
Depsgraph: Cleanup, promote is_evaluating query
This way it might be used for sanity checks in RNA API as well.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph.h4
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc8
-rw-r--r--source/blender/depsgraph/intern/depsgraph.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_debug.cc6
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc4
5 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph.h b/source/blender/depsgraph/DEG_depsgraph.h
index e44dddbcf54..d5a93d21b99 100644
--- a/source/blender/depsgraph/DEG_depsgraph.h
+++ b/source/blender/depsgraph/DEG_depsgraph.h
@@ -179,14 +179,14 @@ void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, DEG_EditorUpdateSce
/* Evaluation ----------------------------------- */
+bool DEG_is_evaluating(struct Depsgraph *depsgraph);
+
bool DEG_is_active(const struct Depsgraph *depsgraph);
void DEG_make_active(struct Depsgraph *depsgraph);
void DEG_make_inactive(struct Depsgraph *depsgraph);
/* Evaluation Debug ------------------------------ */
-bool DEG_debug_is_evaluating(struct Depsgraph *depsgraph);
-
void DEG_debug_print_begin(struct Depsgraph *depsgraph);
void DEG_debug_print_eval(struct Depsgraph *depsgraph,
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index dcdea87fe1a..8f9595d2476 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -76,7 +76,7 @@ Depsgraph::Depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluati
ctime(BKE_scene_frame_get(scene)),
scene_cow(NULL),
is_active(false),
- debug_is_evaluating(false),
+ is_evaluating(false),
is_render_pipeline_depsgraph(false)
{
BLI_spin_init(&lock);
@@ -334,6 +334,12 @@ void DEG_graph_free(Depsgraph *graph)
OBJECT_GUARDED_DELETE(deg_depsgraph, Depsgraph);
}
+bool DEG_is_evaluating(struct Depsgraph *depsgraph)
+{
+ DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
+ return deg_graph->is_evaluating;
+}
+
bool DEG_is_active(const struct Depsgraph *depsgraph)
{
if (depsgraph == NULL) {
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index 30ae4edde34..43829f4e045 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -198,7 +198,7 @@ struct Depsgraph {
int debug_flags;
string debug_name;
- bool debug_is_evaluating;
+ bool is_evaluating;
/* Is set to truth for dependency graph which are used for post-processing (compositor and
* sequencer).
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc
index d079c958e04..bb60db5209c 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cc
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cc
@@ -246,12 +246,6 @@ void DEG_stats_simple(const Depsgraph *graph,
}
}
-bool DEG_debug_is_evaluating(struct Depsgraph *depsgraph)
-{
- DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph);
- return deg_graph->debug_is_evaluating;
-}
-
static DEG::string depsgraph_name_for_logging(struct Depsgraph *depsgraph)
{
const char *name = DEG_debug_name_get(depsgraph);
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 6b7d102c675..d6b3c54a149 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -257,7 +257,7 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
}
const bool do_time_debug = ((G.debug & G_DEBUG_DEPSGRAPH_TIME) != 0);
const double start_time = do_time_debug ? PIL_check_seconds_timer() : 0;
- graph->debug_is_evaluating = true;
+ graph->is_evaluating = true;
depsgraph_ensure_view_layer(graph);
/* Set up evaluation state. */
DepsgraphEvalState state;
@@ -298,7 +298,7 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
if (need_free_scheduler) {
BLI_task_scheduler_free(task_scheduler);
}
- graph->debug_is_evaluating = false;
+ graph->is_evaluating = false;
if (do_time_debug) {
printf("Depsgraph updated in %f seconds.\n", PIL_check_seconds_timer() - start_time);
}