diff options
author | Neil Roberts <neil@linux.intel.com> | 2011-01-24 14:28:00 +0000 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2011-01-24 15:45:45 +0000 |
commit | c4a94439de2700c550da742143c46ee7e72e7f62 (patch) | |
tree | f4536965d9f9dcdbb834a59cf342a61a8f7c530d /cogl/cogl-blend-string.c | |
parent | 4bb08ba00b4d572b3201a833377304b88f66e3c3 (diff) | |
download | cogl-c4a94439de2700c550da742143c46ee7e72e7f62.tar.gz |
cogl-debug: Split the flags to support more than 32
The CoglDebugFlags are now stored in an array of unsigned ints rather
than a single variable. The flags are accessed using macros instead of
directly peeking at the cogl_debug_flags variable. The index values
are stored in the enum rather than the actual mask values so that the
enum doesn't need to be more than 32 bits wide. The hope is that the
code to determine the index into the array can be optimized out by the
compiler so it should have exactly the same performance as the old
code.
Diffstat (limited to 'cogl/cogl-blend-string.c')
-rw-r--r-- | cogl/cogl-blend-string.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cogl/cogl-blend-string.c b/cogl/cogl-blend-string.c index 9912fdf7..2e7dd5b6 100644 --- a/cogl/cogl-blend-string.c +++ b/cogl/cogl-blend-string.c @@ -197,7 +197,7 @@ error: "Invalid texture combine string: %s", error_string); - if (cogl_debug_flags & COGL_DEBUG_BLEND_STRINGS) + if (COGL_DEBUG_ENABLED (COGL_DEBUG_BLEND_STRINGS)) { g_debug ("Invalid texture combine string: %s", error_string); @@ -321,7 +321,7 @@ error: "blend" : "texture combine", error_string); - if (cogl_debug_flags & COGL_DEBUG_BLEND_STRINGS) + if (COGL_DEBUG_ENABLED (COGL_DEBUG_BLEND_STRINGS)) { g_debug ("Invalid %s string: %s", context == COGL_BLEND_STRING_CONTEXT_BLENDING ? @@ -728,7 +728,7 @@ error: offset, error_string); - if (cogl_debug_flags & COGL_DEBUG_BLEND_STRINGS) + if (COGL_DEBUG_ENABLED (COGL_DEBUG_BLEND_STRINGS)) { g_debug ("Syntax error for argument %d at offset %d: %s", current_arg, offset, error_string); @@ -753,10 +753,10 @@ _cogl_blend_string_compile (const char *string, int remaining_argc = 0; #if 0 - cogl_debug_flags |= COGL_DEBUG_BLEND_STRINGS; + COGL_DEBUG_SET_FLAG (COGL_DEBUG_BLEND_STRINGS); #endif - if (cogl_debug_flags & COGL_DEBUG_BLEND_STRINGS) + if (COGL_DEBUG_ENABLED (COGL_DEBUG_BLEND_STRINGS)) { COGL_NOTE (BLEND_STRINGS, "Compiling %s string:\n%s\n", context == COGL_BLEND_STRING_CONTEXT_BLENDING ? @@ -882,7 +882,7 @@ _cogl_blend_string_compile (const char *string, finished: - if (cogl_debug_flags & COGL_DEBUG_BLEND_STRINGS) + if (COGL_DEBUG_ENABLED (COGL_DEBUG_BLEND_STRINGS)) { if (current_statement > 0) print_statement (0, &statements[0]); @@ -908,7 +908,7 @@ error: offset, error_string); - if (cogl_debug_flags & COGL_DEBUG_BLEND_STRINGS) + if (COGL_DEBUG_ENABLED (COGL_DEBUG_BLEND_STRINGS)) { g_debug ("Syntax error at offset %d: %s", offset, error_string); |