[gnome-shell] st-texture-cache: Remove now unused methods



commit 0ebddfcf5056c728fb5a3f837edc482b4b27da7f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Mar 16 23:19:27 2012 -0400

    st-texture-cache: Remove now unused methods
    
    load_uri_sync and load_file_simple are now unused.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672273

 src/st/st-texture-cache.c |   74 ---------------------------------------------
 src/st/st-texture-cache.h |   10 ------
 2 files changed, 0 insertions(+), 84 deletions(-)
---
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index 89d5dc5..1a85afa 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -1360,47 +1360,6 @@ out:
 }
 
 /**
- * st_texture_cache_load_uri_sync:
- *
- * @cache: The texture cache instance
- * @policy: Requested lifecycle of cached data
- * @uri: uri of the image file from which to create a pixbuf
- * @available_width: available width for the image, can be -1 if not limited
- * @available_height: available height for the image, can be -1 if not limited
- * @error: Return location for error
- *
- * Synchronously load an image from a uri.  The image is scaled down to fit the
- * available width and height imensions, but the image is never scaled up beyond
- * its actual size. The pixbuf is rotated according to the associated orientation
- * setting.
- *
- * Return value: (transfer none): A new #ClutterActor with the image file loaded if it was
- *               generated succesfully, %NULL otherwise
- */
-ClutterActor *
-st_texture_cache_load_uri_sync (StTextureCache *cache,
-                                StTextureCachePolicy policy,
-                                const gchar       *uri,
-                                int                available_width,
-                                int                available_height,
-                                GError            **error)
-{
-  CoglHandle texdata;
-  ClutterTexture *texture;
-
-  texdata = st_texture_cache_load_uri_sync_to_cogl_texture (cache, policy, uri, available_width, available_height, error);
-
-  if (texdata == COGL_INVALID_HANDLE)
-    return NULL;
-
-  texture = create_default_texture ();
-  set_texture_cogl_texture (texture, texdata);
-  cogl_handle_unref (texdata);
-
-  return CLUTTER_ACTOR (texture);
-}
-
-/**
  * st_texture_cache_load_file_to_cogl_texture:
  * @cache: A #StTextureCache
  * @file_path: Path to a file in supported image format
@@ -1475,39 +1434,6 @@ st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
 }
 
 /**
- * st_texture_cache_load_file_simple:
- * @cache: A #StTextureCache
- * @file_path: Filesystem path
- *
- * Synchronously load an image into a texture.  The texture will be cached
- * indefinitely.  On error, this function returns an empty texture and prints a warning.
- *
- * Returns: (transfer none): A new #ClutterTexture
- */
-ClutterActor *
-st_texture_cache_load_file_simple (StTextureCache *cache,
-                                   const gchar    *file_path)
-{
-  GFile *file;
-  char *uri;
-  ClutterActor *texture;
-  GError *error = NULL;
-
-  file = g_file_new_for_path (file_path);
-  uri = g_file_get_uri (file);
-
-  texture = st_texture_cache_load_uri_sync (cache, ST_TEXTURE_CACHE_POLICY_FOREVER,
-                                            uri, -1, -1, &error);
-  if (texture == NULL)
-    {
-      g_warning ("Failed to load %s: %s", file_path, error->message);
-      g_clear_error (&error);
-      texture = clutter_texture_new ();
-    }
-  return texture;
-}
-
-/**
  * st_texture_cache_load_from_raw:
  * @cache: a #StTextureCache
  * @data: (array length=len): raw pixel data
diff --git a/src/st/st-texture-cache.h b/src/st/st-texture-cache.h
index f6b896b..ce9f1d6 100644
--- a/src/st/st-texture-cache.h
+++ b/src/st/st-texture-cache.h
@@ -94,22 +94,12 @@ ClutterActor *st_texture_cache_load_uri_async (StTextureCache    *cache,
                                                int                available_width,
                                                int                available_height);
 
-ClutterActor *st_texture_cache_load_uri_sync (StTextureCache       *cache,
-                                              StTextureCachePolicy  policy,
-                                              const gchar          *uri,
-                                              int                   available_width,
-                                              int                   available_height,
-                                              GError              **error);
-
 CoglHandle    st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
                                                           const gchar    *file_path);
 
 cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
                                                               const gchar    *file_path);
 
-ClutterActor *st_texture_cache_load_file_simple (StTextureCache *cache,
-                                                 const gchar    *file_path);
-
 ClutterActor *st_texture_cache_load_from_raw  (StTextureCache    *cache,
                                                const guchar      *data,
                                                gsize              len,



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