[gnome-shell] st-texture-cache: Remove st_texture_cache_load_from_raw



commit 4b095d532c40dc29d78ab78eacd41935eef43b1c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jan 2 09:33:30 2013 -0500

    st-texture-cache: Remove st_texture_cache_load_from_raw
    
    This is now unused.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691019

 src/st/st-texture-cache.c |   59 ---------------------------------------------
 src/st/st-texture-cache.h |   10 -------
 2 files changed, 0 insertions(+), 69 deletions(-)
---
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index c562a77..7cd4b36 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -30,8 +30,6 @@
 #define CACHE_PREFIX_ICON "icon:"
 #define CACHE_PREFIX_URI "uri:"
 #define CACHE_PREFIX_URI_FOR_CAIRO "uri-for-cairo:"
-#define CACHE_PREFIX_RAW_CHECKSUM "raw-checksum:"
-#define CACHE_PREFIX_COMPRESSED_CHECKSUM "compressed-checksum:"
 
 struct _StTextureCachePrivate
 {
@@ -1414,63 +1412,6 @@ st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
   return surface;
 }
 
-/**
- * st_texture_cache_load_from_raw:
- * @cache: a #StTextureCache
- * @data: (array length=len): raw pixel data
- * @len: the length of @data
- * @has_alpha: whether @data includes an alpha channel
- * @width: width in pixels of @data
- * @height: width in pixels of @data
- * @rowstride: rowstride of @data
- * @size: size of icon to return
- *
- * Creates (or retrieves from cache) an icon based on raw pixel data.
- *
- * Return value: (transfer none): a new #ClutterActor displaying a
- * pixbuf created from @data and the other parameters.
- **/
-ClutterActor *
-st_texture_cache_load_from_raw (StTextureCache    *cache,
-                                const guchar      *data,
-                                gsize              len,
-                                gboolean           has_alpha,
-                                int                width,
-                                int                height,
-                                int                rowstride,
-                                int                size,
-                                GError           **error)
-{
-  ClutterTexture *texture;
-  CoglHandle texdata;
-  char *key;
-  char *checksum;
-
-  texture = create_default_texture ();
-  clutter_actor_set_size (CLUTTER_ACTOR (texture), size, size);
-
-  /* In theory, two images of with different width and height could have the same
-   * pixel data and thus hash the same. (Say, a 16x16 and a 8x32 blank image.)
-   * We ignore this for now. If anybody hits this problem they should use
-   * GChecksum directly to compute a checksum including the width and height.
-   */
-  checksum = g_compute_checksum_for_data (G_CHECKSUM_SHA1, data, len);
-  key = g_strdup_printf (CACHE_PREFIX_RAW_CHECKSUM "checksum=%s", checksum);
-  g_free (checksum);
-
-  texdata = g_hash_table_lookup (cache->priv->keyed_cache, key);
-  if (texdata == NULL)
-    {
-      texdata = data_to_cogl_handle (data, has_alpha, width, height, rowstride, TRUE);
-      g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texdata);
-    }
-
-  g_free (key);
-
-  set_texture_cogl_texture (texture, texdata);
-  return CLUTTER_ACTOR (texture);
-}
-
 static StTextureCache *instance = NULL;
 
 /**
diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
index c913b39..fa9746c 100644
--- a/src/st/st-texture-cache.h
+++ b/src/st/st-texture-cache.h
@@ -96,16 +96,6 @@ CoglHandle    st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
 cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
                                                               const gchar    *file_path);
 
-ClutterActor *st_texture_cache_load_from_raw  (StTextureCache    *cache,
-                                               const guchar      *data,
-                                               gsize              len,
-                                               gboolean           has_alpha,
-                                               int                width,
-                                               int                height,
-                                               int                rowstride,
-                                               int                size,
-                                               GError           **error);
-
 /**
  * StTextureCacheLoader: (skip)
  * @cache: a #StTextureCache



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