[cogl] Add a PANGO debug flag for CoglPango use
authorEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 28 Feb 2009 16:03:11 +0000 (16:03 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 10 Mar 2009 12:38:02 +0000 (12:38 +0000)
The CoglPango code falls under the COGL "jurisdiction"; this means
that it cannot include Clutter headers unless strictly necessary.

The CoglPangoRenderer code was using the CLUTTER_NOTE() macro. Now
that COGL has it's own COGL_NOTE() similar macro, CoglPango should
use that and avoid including clutter-debug.h (which pulls in
clutter-private.h which in turn pulls in clutter-actor.h).

A new flag, COGL_DEBUG_PANGO, has been added to the COGL debug
flags.

clutter/cogl/cogl-debug.h
clutter/cogl/common/cogl-debug.c
clutter/pango/cogl-pango-render.c

index 815dcbc..44711c1 100644 (file)
@@ -11,7 +11,8 @@ typedef enum {
   COGL_DEBUG_MATERIAL  = 1 << 2,
   COGL_DEBUG_SHADER    = 1 << 3,
   COGL_DEBUG_OFFSCREEN = 1 << 4,
-  COGL_DEBUG_DRAW      = 1 << 5
+  COGL_DEBUG_DRAW      = 1 << 5,
+  COGL_DEBUG_PANGO     = 1 << 6
 } CoglDebugFlags;
 
 #ifdef COGL_ENABLE_DEBUG
index 863da3b..0497d74 100644 (file)
@@ -13,7 +13,8 @@ static const GDebugKey cogl_debug_keys[] = {
   { "material", COGL_DEBUG_MATERIAL },
   { "shader", COGL_DEBUG_SHADER },
   { "offscreen", COGL_DEBUG_OFFSCREEN },
-  { "draw", COGL_DEBUG_DRAW }
+  { "draw", COGL_DEBUG_DRAW },
+  { "pango", COGL_DEBUG_PANGO }
 };
 
 static const gint n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys);
index 2c7bf88..def34f8 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "cogl-pango-private.h"
 #include "cogl-pango-glyph-cache.h"
-#include "../clutter-debug.h"
 
 struct _CoglPangoRenderer
 {
@@ -375,10 +374,10 @@ cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer,
 
       cairo_surface_destroy (surface);
 
-      CLUTTER_NOTE (PANGO, "cache fail    %i", glyph);
+      COGL_NOTE (PANGO, "cache fail    %i", glyph);
     }
   else
-    CLUTTER_NOTE (PANGO, "cache success %i", glyph);
+    COGL_NOTE (PANGO, "cache success %i", glyph);
 
   return value;
 }