StThemeNodeDrawing: Remove useless LoadCornerData

Done as part of my quest to merge Mx and St:

https://github.com/magcius/mx/tree/st-rebase

https://bugzilla.gnome.org/show_bug.cgi?id=660968
This commit is contained in:
Jasper St. Pierre 2011-10-05 04:28:11 -04:00
parent c398f319fc
commit f9b37a21e8

View File

@ -189,20 +189,13 @@ corner_to_string (StCornerSpec *corner)
corner->border_width_2); corner->border_width_2);
} }
typedef struct {
StThemeNode *node;
StCornerSpec *corner;
} LoadCornerData;
static CoglHandle static CoglHandle
load_corner (StTextureCache *cache, load_corner (StTextureCache *cache,
const char *key, const char *key,
void *datap, void *datap,
GError **error) GError **error)
{ {
LoadCornerData *data = datap; return create_corner_material ((StCornerSpec *) datap);
return create_corner_material (data->corner);
} }
/* To match the CSS specification, we want the border to look like it was /* To match the CSS specification, we want the border to look like it was
@ -347,7 +340,6 @@ st_theme_node_lookup_corner (StThemeNode *node,
char *key; char *key;
StTextureCache *cache; StTextureCache *cache;
StCornerSpec corner; StCornerSpec corner;
LoadCornerData data;
guint radius[4]; guint radius[4];
if (node->border_radius[corner_id] == 0) if (node->border_radius[corner_id] == 0)
@ -388,10 +380,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);
data.node = node;
data.corner = &corner;
texture = st_texture_cache_load (cache, key, ST_TEXTURE_CACHE_POLICY_NONE, load_corner, &data, NULL);
material = _st_create_texture_material (texture); material = _st_create_texture_material (texture);
cogl_handle_unref (texture); cogl_handle_unref (texture);