[gtk+/wip/csd-flicker: 1/2] updateiconcache: Don't include image data by default anymore
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd-flicker: 1/2] updateiconcache: Don't include image data by default anymore
- Date: Fri, 10 Jan 2014 20:23:48 +0000 (UTC)
commit 1d9b061c903375dd18ba4cc4973594b8d3e0cedd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jan 10 12:14:41 2014 -0500
updateiconcache: Don't include image data by default anymore
Since large images are in the icon cache, and apps don't tend to use that
many icons anymore, simply don't include image data and instead make apps
load files from disk. Additionally, since they're stored in GdkPixbuf data,
that means that we have to first convert them either to a cairo_surface_t,
which requires converting pixel data to be premulitplied, or an OpenGL
texture, which requires a whole GPU upload anyway.
So, even with the icon cache, the goal of icons through zero-copy, mmap()'d
data from disk just isn't doable with the icon cache format we have. The
icon cache on my disk is nearing 100MB, since we include a bunch of
high-resolution application icons, that I doubt would be used by apps at all.
Removing this inefficient pixel data makes memory usage for all applications
go down, with no speed loss.
The icon cache also, however, has an index of what icons are in each folder,
which prevents a readdir() and allows GTK+ to know what icon is where without
having to do a bunch of stat(); calls. Keeping this data is good for GTK+,
so we should still keep the index.
It doesn't make sense to remove any code for mapping pixel data from the icon
cache. There's a plan in the works to have a symbolic icon cache that does
pixel math on 16x16 icons to prevent slow SVG rendering. 16x16 pixels are
fairly small, and such images are flat colors, which should compress easily,
so the icon cache would be worthwhile here. So let's keep the code around
in preparation for that case.
https://bugzilla.gnome.org/show_bug.cgi?id=721895
gtk/updateiconcache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c
index effea7c..6faa3e4 100644
--- a/gtk/updateiconcache.c
+++ b/gtk/updateiconcache.c
@@ -44,7 +44,7 @@
static gboolean force_update = FALSE;
static gboolean ignore_theme_index = FALSE;
static gboolean quiet = FALSE;
-static gboolean index_only = FALSE;
+static gboolean index_only = TRUE;
static gboolean validate = FALSE;
static gchar *var_name = "-";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]