cogl debug: hint that all debugging paths are G_UNLIKELY

Most Cogl debugging code conditions are marked as G_UNLIKELY with the
intention of having the CPU branch prediction always assume the
path is disabled so having debugging support in release binaries has
negligible overhead.

This patch simply fixes a few cases where we weren't using G_UNLIKELY.
This commit is contained in:
Robert Bragg
2010-02-17 17:53:28 +00:00
parent 210e618e6d
commit 5751e48756
2 changed files with 6 additions and 5 deletions

View File

@ -487,7 +487,7 @@ cogl_get_features (void)
{
_COGL_GET_CONTEXT (ctx, 0);
if (cogl_debug_flags & COGL_DEBUG_DISABLE_VBOS)
if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_DISABLE_VBOS))
ctx->feature_flags &= ~COGL_FEATURE_VBOS;
return ctx->feature_flags;