diff --git a/cogl/cogl/cogl-matrix-stack-private.h b/cogl/cogl/cogl-matrix-stack-private.h index b2f124202..9a4bcc3d6 100644 --- a/cogl/cogl/cogl-matrix-stack-private.h +++ b/cogl/cogl/cogl-matrix-stack-private.h @@ -56,10 +56,9 @@ struct _CoglMatrixEntry CoglMatrixOp op; unsigned int ref_count; -#ifdef COGL_DEBUG_ENABLED - /* used for performance tracing */ + /* Debugging, only used when defined(COGL_ENABLE_DEBUG) + * Used for performance tracing */ int composite_gets; -#endif }; typedef struct _CoglMatrixEntryTranslate diff --git a/cogl/cogl/cogl-matrix-stack.c b/cogl/cogl/cogl-matrix-stack.c index 5504d465e..96ac1e3e5 100644 --- a/cogl/cogl/cogl-matrix-stack.c +++ b/cogl/cogl/cogl-matrix-stack.c @@ -56,7 +56,7 @@ _cogl_matrix_entry_new (CoglMatrixOp operation) entry->ref_count = 1; entry->op = operation; -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG entry->composite_gets = 0; #endif @@ -154,7 +154,7 @@ _cogl_matrix_entry_identity_init (CoglMatrixEntry *entry) entry->ref_count = 1; entry->op = COGL_MATRIX_OP_LOAD_IDENTITY; entry->parent = NULL; -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG entry->composite_gets = 0; #endif } diff --git a/cogl/cogl/cogl-pipeline-debug.c b/cogl/cogl/cogl-pipeline-debug.c index 82c5873ce..39a92d48f 100644 --- a/cogl/cogl/cogl-pipeline-debug.c +++ b/cogl/cogl/cogl-pipeline-debug.c @@ -163,7 +163,7 @@ dump_pipeline_cb (CoglNode *node, void *user_data) pipeline_id, pipeline, G_OBJECT (pipeline)->ref_count, -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG pipeline->has_static_breadcrumb ? pipeline->static_breadcrumb : "NULL" #else diff --git a/cogl/cogl/cogl-pipeline-private.h b/cogl/cogl/cogl-pipeline-private.h index 2584603b9..3c729d3a5 100644 --- a/cogl/cogl/cogl-pipeline-private.h +++ b/cogl/cogl/cogl-pipeline-private.h @@ -308,13 +308,6 @@ struct _CoglPipeline * be allocated dynamically when required... */ CoglPipelineBigState *big_state; -#ifdef COGL_DEBUG_ENABLED - /* For debugging purposes it's possible to associate a static const - * string with a pipeline which can be an aid when trying to trace - * where the pipeline originates from */ - const char *static_breadcrumb; -#endif - /* Cached state... */ /* A cached, complete list of the layers this pipeline depends @@ -360,12 +353,17 @@ struct _CoglPipeline unsigned int layers_cache_dirty:1; -#ifdef COGL_DEBUG_ENABLED + /* Debugging, only used when defined(COGL_ENABLE_DEBUG) */ + /* For debugging purposes it's possible to associate a static const * string with a pipeline which can be an aid when trying to trace * where the pipeline originates from */ unsigned int has_static_breadcrumb:1; -#endif + + /* For debugging purposes it's possible to associate a static const + * string with a pipeline which can be an aid when trying to trace + * where the pipeline originates from */ + const char *static_breadcrumb; }; struct _CoglPipelineClass @@ -728,7 +726,7 @@ void _cogl_pipeline_apply_overrides (CoglPipeline *pipeline, CoglPipelineFlushOptions *options); -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG void _cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline, const char *breadcrumb); diff --git a/cogl/cogl/cogl-pipeline.c b/cogl/cogl/cogl-pipeline.c index 46704824f..8cfd232e4 100644 --- a/cogl/cogl/cogl-pipeline.c +++ b/cogl/cogl/cogl-pipeline.c @@ -373,7 +373,7 @@ cogl_pipeline_new (CoglContext *context) { CoglPipeline *new = cogl_pipeline_copy (context->default_pipeline); -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG _cogl_pipeline_set_static_breadcrumb (new, "new"); #endif return new; @@ -1159,7 +1159,7 @@ _cogl_pipeline_pre_change_notify (CoglPipeline *pipeline, new_authority = cogl_pipeline_copy (_cogl_pipeline_get_parent (pipeline)); -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG _cogl_pipeline_set_static_breadcrumb (new_authority, "pre_change_notify:copy-on-write"); #endif @@ -2302,7 +2302,7 @@ _cogl_pipeline_journal_unref (CoglPipeline *pipeline) g_object_unref (pipeline); } -#ifdef COGL_DEBUG_ENABLED +#ifdef COGL_ENABLE_DEBUG void _cogl_pipeline_set_static_breadcrumb (CoglPipeline *pipeline, const char *breadcrumb)