Depsgraph: Cleanup, naming conventions

This commit is contained in:
Sergey Sharybin
2018-05-02 14:25:32 +02:00
parent bb75c4cbe9
commit 651a255931
5 changed files with 10 additions and 10 deletions

View File

@@ -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__,

View File

@@ -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);
/* ------------------------------------------------ */

View File

@@ -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,

View File

@@ -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);

View File

@@ -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)