[Bf-blender-cvs] [651a2559318] blender2.8: Depsgraph: Cleanup, naming conventions

Sergey Sharybin noreply at git.blender.org
Wed May 2 17:10:54 CEST 2018


Commit: 651a2559318a5e8f3546286a207a5766e33feebe
Author: Sergey Sharybin
Date:   Wed May 2 14:25:32 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB651a2559318a5e8f3546286a207a5766e33feebe

Depsgraph: Cleanup, naming conventions

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

M	source/blender/blenkernel/intern/layer.c
M	source/blender/depsgraph/DEG_depsgraph_debug.h
M	source/blender/depsgraph/intern/depsgraph.cc
M	source/blender/depsgraph/intern/depsgraph_debug.cc
M	source/blender/depsgraph/intern/depsgraph_intern.h

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

diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 9ab318bc58d..fc1cc53ba77 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -2416,7 +2416,7 @@ static void layer_eval_layer_collection(Depsgraph *depsgraph,
                                         LayerCollection *layer_collection,
                                         LayerCollection *parent_layer_collection)
 {
-	if (DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) {
+	if (DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) {
 		/* TODO)sergey): Try to make it more generic and handled by depsgraph messaging. */
 		printf("%s on %s (%p) [%s], parent %s (%p) [%s]\n",
 		       __func__,
diff --git a/source/blender/depsgraph/DEG_depsgraph_debug.h b/source/blender/depsgraph/DEG_depsgraph_debug.h
index 2f4cfc86955..326d2f87ed8 100644
--- a/source/blender/depsgraph/DEG_depsgraph_debug.h
+++ b/source/blender/depsgraph/DEG_depsgraph_debug.h
@@ -47,8 +47,8 @@ struct ViewLayer;
 
 /* NOTE: Those flags are same bitmask as G.debug_flags */
 
-void DEG_set_debug_flags(struct Depsgraph *depsgraph, int flags);
-int DEG_get_debug_flags(const struct Depsgraph *depsgraph);
+void DEG_debug_flags_set(struct Depsgraph *depsgraph, int flags);
+int DEG_debug_flags_get(const struct Depsgraph *depsgraph);
 
 /* ------------------------------------------------ */
 
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 36de325daf0..d75e3b9b3c8 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -607,7 +607,7 @@ void DEG_debug_print_eval(struct Depsgraph *depsgraph,
                           const char *object_name,
                           const void *object_address)
 {
-	if ((DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
+	if ((DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
 		return;
 	}
 	fprintf(stdout,
@@ -628,7 +628,7 @@ void DEG_debug_print_eval_subdata(struct Depsgraph *depsgraph,
                                   const char *subdata_name,
                                   const void *subdata_address)
 {
-	if ((DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
+	if ((DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
 		return;
 	}
 	fprintf(stdout,
@@ -655,7 +655,7 @@ void DEG_debug_print_eval_subdata_index(struct Depsgraph *depsgraph,
                                         const void *subdata_address,
                                         const int subdata_index)
 {
-	if ((DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
+	if ((DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
 		return;
 	}
 	fprintf(stdout,
@@ -680,7 +680,7 @@ void DEG_debug_print_eval_time(struct Depsgraph *depsgraph,
                                const void *object_address,
                                float time)
 {
-	if ((DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
+	if ((DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_EVAL) == 0) {
 		return;
 	}
 	fprintf(stdout,
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc
index 4e8d684f697..6b74c11ed70 100644
--- a/source/blender/depsgraph/intern/depsgraph_debug.cc
+++ b/source/blender/depsgraph/intern/depsgraph_debug.cc
@@ -50,14 +50,14 @@ extern "C" {
 
 #include "util/deg_util_foreach.h"
 
-void DEG_set_debug_flags(Depsgraph *depsgraph, int flags)
+void DEG_debug_flags_set(Depsgraph *depsgraph, int flags)
 {
 	DEG::Depsgraph *deg_graph =
 	        reinterpret_cast<DEG::Depsgraph *>(depsgraph);
 	deg_graph->debug_flags = flags;
 }
 
-int DEG_get_debug_flags(const Depsgraph *depsgraph)
+int DEG_debug_flags_get(const Depsgraph *depsgraph)
 {
 	const DEG::Depsgraph *deg_graph =
 	        reinterpret_cast<const DEG::Depsgraph *>(depsgraph);
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h
index dda482efc8d..f69ddeed355 100644
--- a/source/blender/depsgraph/intern/depsgraph_intern.h
+++ b/source/blender/depsgraph/intern/depsgraph_intern.h
@@ -116,7 +116,7 @@ void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx,
 
 #define DEG_DEBUG_PRINTF(depsgraph, type, ...) \
 	do { \
-		if (DEG_get_debug_flags(depsgraph) & G_DEBUG_DEPSGRAPH_ ## type) { \
+		if (DEG_debug_flags_get(depsgraph) & G_DEBUG_DEPSGRAPH_ ## type) { \
 			fprintf(stderr, __VA_ARGS__); \
 		} \
 	} while (0)



More information about the Bf-blender-cvs mailing list