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
This commit is contained in:
Jasper St. Pierre 2012-03-16 23:19:27 -04:00
parent 36d20eb1b8
commit 0ebddfcf50
2 changed files with 0 additions and 84 deletions

View File

@ -1359,47 +1359,6 @@ out:
return surface;
}
/**
* 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
@ -1474,39 +1433,6 @@ st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
return surface;
}
/**
* 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

View File

@ -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,