forked from AuroraMiddleware/gtk
Small savings
This commit is contained in:
parent
8862bf9233
commit
9c0f0bb451
@ -1,5 +1,7 @@
|
||||
2006-04-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.c: Get rid of a duplicate copy of the visual names.
|
||||
|
||||
* gtk/gtkmain.c: Make gtk_args const.
|
||||
|
||||
* gtk/gtkicontheme.c (pixbuf_supports_svg): Save one static.
|
||||
|
@ -1,5 +1,7 @@
|
||||
2006-04-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkrgb.c: Get rid of a duplicate copy of the visual names.
|
||||
|
||||
* gtk/gtkmain.c: Make gtk_args const.
|
||||
|
||||
* gtk/gtkicontheme.c (pixbuf_supports_svg): Save one static.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-04-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf.c: No point in making the error path fast by
|
||||
caching quarks.
|
||||
|
||||
2006-03-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Remove a
|
||||
|
@ -542,11 +542,7 @@ GDK_PIXBUF_VAR const char *gdk_pixbuf_version = GDK_PIXBUF_VERSION;
|
||||
GQuark
|
||||
gdk_pixbuf_error_quark (void)
|
||||
{
|
||||
static GQuark q = 0;
|
||||
if (q == 0)
|
||||
q = g_quark_from_static_string ("gdk-pixbuf-error-quark");
|
||||
|
||||
return q;
|
||||
return g_quark_from_static_string ("gdk-pixbuf-error-quark");
|
||||
}
|
||||
|
||||
/**
|
||||
|
22
gdk/gdkrgb.c
22
gdk/gdkrgb.c
@ -54,16 +54,6 @@ typedef void (*GdkRgbConvFunc) (GdkRgbInfo *image_info, GdkImage *image,
|
||||
gint x_align, gint y_align,
|
||||
GdkRgbCmap *cmap);
|
||||
|
||||
static const gchar *const visual_names[] =
|
||||
{
|
||||
"static gray",
|
||||
"grayscale",
|
||||
"static color",
|
||||
"pseudo color",
|
||||
"true color",
|
||||
"direct color",
|
||||
};
|
||||
|
||||
#define STAGE_ROWSTRIDE (GDK_SCRATCH_IMAGE_WIDTH * 3)
|
||||
|
||||
/* Some of these fields should go, as they're not being used at all. (?)
|
||||
@ -445,8 +435,8 @@ gdk_rgb_score_visual (GdkVisual *visual)
|
||||
pseudo = (visual->type == GDK_VISUAL_PSEUDO_COLOR || visual->type == GDK_VISUAL_TRUE_COLOR);
|
||||
|
||||
if (gdk_rgb_verbose)
|
||||
g_print ("Visual type = %s, depth = %d, %x:%x:%x%s; score=%x\n",
|
||||
visual_names[visual->type],
|
||||
g_print ("Visual type = %d, depth = %d, %x:%x:%x%s; score=%x\n",
|
||||
visual->type,
|
||||
visual->depth,
|
||||
visual->red_mask,
|
||||
visual->green_mask,
|
||||
@ -3066,8 +3056,8 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
|
||||
|
||||
byte_order = image_info->visual->byte_order;
|
||||
if (gdk_rgb_verbose)
|
||||
g_print ("Chose visual type=%s depth=%d, image bpp=%d, %s first\n",
|
||||
visual_names[image_info->visual->type], image_info->visual->depth,
|
||||
g_print ("Chose visual type=%d depth=%d, image bpp=%d, %s first\n",
|
||||
image_info->visual->type, image_info->visual->depth,
|
||||
bpp, byte_order == GDK_LSB_FIRST ? "lsb" : "msb");
|
||||
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
@ -3235,10 +3225,10 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
|
||||
|
||||
if (!conv)
|
||||
{
|
||||
g_warning ("Visual type=%s depth=%d, image bpp=%d, %s first\n"
|
||||
g_warning ("Visual type=%d depth=%d, image bpp=%d, %s first\n"
|
||||
"is not supported by GdkRGB. Please submit a bug report\n"
|
||||
"with the above values to bugzilla.gnome.org",
|
||||
visual_names[vtype], depth, bpp,
|
||||
vtype, depth, bpp,
|
||||
byte_order == GDK_LSB_FIRST ? "lsb" : "msb");
|
||||
exit (1);
|
||||
}
|
||||
|
@ -539,12 +539,12 @@ pixbuf_supports_svg (void)
|
||||
{
|
||||
GSList *formats = gdk_pixbuf_get_formats ();
|
||||
GSList *tmp_list;
|
||||
static gboolean found_svg = FALSE;
|
||||
static gboolean value_known = FALSE;
|
||||
static gint found_svg = -1;
|
||||
|
||||
if (value_known)
|
||||
if (found_svg != -1)
|
||||
return found_svg;
|
||||
|
||||
|
||||
found_svg = FALSE;
|
||||
for (tmp_list = formats; tmp_list && !found_svg; tmp_list = tmp_list->next)
|
||||
{
|
||||
gchar **mime_types = gdk_pixbuf_format_get_mime_types (tmp_list->data);
|
||||
@ -560,7 +560,6 @@ pixbuf_supports_svg (void)
|
||||
}
|
||||
|
||||
g_slist_free (formats);
|
||||
value_known = TRUE;
|
||||
|
||||
return found_svg;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user