st-texture-cache: Obey cache policy in st_texture_cache_load
https://bugzilla.gnome.org/show_bug.cgi?id=663461
This commit is contained in:
parent
e7f2e92410
commit
50e849a186
@ -780,13 +780,13 @@ st_texture_cache_load (StTextureCache *cache,
|
|||||||
if (!texture)
|
if (!texture)
|
||||||
{
|
{
|
||||||
texture = load (cache, key, data, error);
|
texture = load (cache, key, data, error);
|
||||||
if (texture)
|
if (texture && policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
|
||||||
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
|
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cogl_object_ref (texture);
|
if (texture && policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
|
||||||
|
cogl_object_ref (texture);
|
||||||
|
|
||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ st_theme_node_lookup_corner (StThemeNode *node,
|
|||||||
return COGL_INVALID_HANDLE;
|
return COGL_INVALID_HANDLE;
|
||||||
|
|
||||||
key = corner_to_string (&corner);
|
key = corner_to_string (&corner);
|
||||||
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &corner, NULL);
|
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_FOREVER, load_corner, &corner, NULL);
|
||||||
|
|
||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user