gnome-games r8483 - trunk/libgames-support



Author: chpe
Date: Tue Jan  6 18:20:03 2009
New Revision: 8483
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8483&view=rev

Log:
Add debug flag for the card caches.

Modified:
   trunk/libgames-support/games-card-images.c
   trunk/libgames-support/games-card-textures-cache.c
   trunk/libgames-support/games-debug.c
   trunk/libgames-support/games-debug.h

Modified: trunk/libgames-support/games-card-images.c
==============================================================================
--- trunk/libgames-support/games-card-images.c	(original)
+++ trunk/libgames-support/games-card-images.c	Tue Jan  6 18:20:03 2009
@@ -28,12 +28,10 @@
 
 #include "games-card-images.h"
 
-#include "games-find-file.h"
-#include "games-files.h"
-#include "games-preimage.h"
 #include "games-pixbuf-utils.h"
 #include "games-card.h"
 #include "games-card-private.h"
+#include "games-debug.h"
 
 enum {
   PROP_0,
@@ -68,6 +66,9 @@
 {
   guint i;
 
+  _games_debug_print (GAMES_DEBUG_CARD_CACHE,
+                      "games_card_images_clear_cache\n");
+
   for (i = 0; i < CACHE_SIZE; i++) {
     gpointer data = UNMARK_POINTER (images->cache[i]);
 

Modified: trunk/libgames-support/games-card-textures-cache.c
==============================================================================
--- trunk/libgames-support/games-card-textures-cache.c	(original)
+++ trunk/libgames-support/games-card-textures-cache.c	Tue Jan  6 18:20:03 2009
@@ -26,6 +26,7 @@
 #include "games-card-textures-cache.h"
 
 #include "games-card-private.h"
+#include "games-debug.h"
 
 struct _GamesCardTexturesCachePrivate
 {
@@ -60,7 +61,8 @@
   GamesCardTexturesCachePrivate *priv = cache->priv;
   int i;
 
-  g_print ("games_card_textures_cache_clear\n");
+  _games_debug_print (GAMES_DEBUG_CARD_CACHE,
+                      "games_card_textures_cache_clear\n");
 
   for (i = 0; i < GAMES_CARDS_TOTAL; i++) {
     CoglHandle *handle = priv->cards[i];

Modified: trunk/libgames-support/games-debug.c
==============================================================================
--- trunk/libgames-support/games-debug.c	(original)
+++ trunk/libgames-support/games-debug.c	Tue Jan  6 18:20:03 2009
@@ -32,6 +32,8 @@
 #ifdef GNOME_ENABLE_DEBUG
   const GDebugKey keys[] = {
     { "card-theme", GAMES_DEBUG_CARD_THEME },
+    { "card-cache", GAMES_DEBUG_CARD_CACHE },
+    { "runtime",    GAMES_DEBUG_RUNTIME    },
     { "sound ",     GAMES_DEBUG_SOUND      }
   };
 

Modified: trunk/libgames-support/games-debug.h
==============================================================================
--- trunk/libgames-support/games-debug.h	(original)
+++ trunk/libgames-support/games-debug.h	Tue Jan  6 18:20:03 2009
@@ -29,8 +29,9 @@
 
 typedef enum {
   GAMES_DEBUG_CARD_THEME = 1 << 0,
-  GAMES_DEBUG_RUNTIME    = 1 << 1,
-  GAMES_DEBUG_SOUND      = 1 << 2,
+  GAMES_DEBUG_CARD_CACHE = 1 << 1,
+  GAMES_DEBUG_RUNTIME    = 1 << 2,
+  GAMES_DEBUG_SOUND      = 1 << 3,
 } GamesDebugFlags;
 
 #ifdef GNOME_ENABLE_DEBUG



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]