mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 11:37:14 +00:00
app: make GimpBrushCache debug spew depend on GIMP_LOG=brush-cache
This commit is contained in:
parent
0315f483e6
commit
a83876040d
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "gimpbrushcache.h"
|
||||
|
||||
#include "gimp-log.h"
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
|
@ -193,12 +194,14 @@ gimp_brush_cache_get (GimpBrushCache *cache,
|
|||
cache->last_angle == angle &&
|
||||
cache->last_hardness == hardness)
|
||||
{
|
||||
g_printerr ("%c", cache->debug_hit);
|
||||
if (gimp_log_flags & GIMP_LOG_BRUSH_CACHE)
|
||||
g_printerr ("%c", cache->debug_hit);
|
||||
|
||||
return (gconstpointer) cache->last_data;
|
||||
}
|
||||
|
||||
g_printerr ("%c", cache->debug_miss);
|
||||
if (gimp_log_flags & GIMP_LOG_BRUSH_CACHE)
|
||||
g_printerr ("%c", cache->debug_miss);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,8 @@ gimp_log_init (void)
|
|||
{ "key-events", GIMP_LOG_KEY_EVENTS },
|
||||
{ "auto-tab-style", GIMP_LOG_AUTO_TAB_STYLE },
|
||||
{ "instances", GIMP_LOG_INSTANCES },
|
||||
{ "rectangle-tool", GIMP_LOG_RECTANGLE_TOOL }
|
||||
{ "rectangle-tool", GIMP_LOG_RECTANGLE_TOOL },
|
||||
{ "brush-cache", GIMP_LOG_BRUSH_CACHE }
|
||||
};
|
||||
|
||||
/* g_parse_debug_string() has special treatment of the string 'help',
|
||||
|
|
|
@ -38,7 +38,8 @@ typedef enum
|
|||
GIMP_LOG_KEY_EVENTS = 1 << 14,
|
||||
GIMP_LOG_AUTO_TAB_STYLE = 1 << 15,
|
||||
GIMP_LOG_INSTANCES = 1 << 16,
|
||||
GIMP_LOG_RECTANGLE_TOOL = 1 << 17
|
||||
GIMP_LOG_RECTANGLE_TOOL = 1 << 17,
|
||||
GIMP_LOG_BRUSH_CACHE = 1 << 18
|
||||
} GimpLogFlags;
|
||||
|
||||
|
||||
|
@ -97,6 +98,7 @@ void gimp_logv (const gchar *function,
|
|||
#define AUTO_TAB_STYLE GIMP_LOG_AUTO_TAB_STYLE
|
||||
#define INSTANCES GIMP_LOG_INSTANCES
|
||||
#define RECTANGLE_TOOL GIMP_LOG_RECTANGLE_TOOL
|
||||
#define BRUSH_CACHE GIMP_LOG_BRUSH_CACHE
|
||||
|
||||
#if 0 /* last resort */
|
||||
# define GIMP_LOG /* nothing => no varargs, no log */
|
||||
|
|
Loading…
Reference in a new issue