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>2020-01-24 13:26:15 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-01-24 14:44:16 +0300
commitcf84db61a6baf160fc3521e5b5a4121609b9ea8d (patch)
treefb7b233ee0bb78f751b45ac121e7876a2d074d42 /source/blender/depsgraph/intern/debug
parentc89e103348414feb3396c7b10abb594c77d8c333 (diff)
Depsgraph: Refactor, move debug struct to own file
Diffstat (limited to 'source/blender/depsgraph/intern/debug')
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug.cc4
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug.h11
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/debug/deg_debug.cc b/source/blender/depsgraph/intern/debug/deg_debug.cc
index b811f11f721..b8db18c9958 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug.cc
@@ -32,6 +32,10 @@
namespace DEG {
+DepsgraphDebug::DepsgraphDebug() : flags(G.debug)
+{
+}
+
bool terminal_do_color(void)
{
return (G.debug & G_DEBUG_DEPSGRAPH_PRETTY) != 0;
diff --git a/source/blender/depsgraph/intern/debug/deg_debug.h b/source/blender/depsgraph/intern/debug/deg_debug.h
index 3e4da644641..90a2f7a25fd 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug.h
+++ b/source/blender/depsgraph/intern/debug/deg_debug.h
@@ -31,6 +31,17 @@
namespace DEG {
+struct DepsgraphDebug {
+ DepsgraphDebug();
+
+ /* NOTE: Corresponds to G_DEBUG_DEPSGRAPH_* flags. */
+ int flags;
+
+ /* Name of this dependency graph (is used for debug prints, helping to distinguish graphs
+ * created for different view layer). */
+ string name;
+};
+
#define DEG_DEBUG_PRINTF(depsgraph, type, ...) \
do { \
if (DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_##type) { \