summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-10-22 02:39:56 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-10-22 07:16:41 -0400
commit5b508ea94a8a29d5a1cc515a7fc8251b17442b34 (patch)
tree03f09b66777f09e150280534be1819a26698e9f2
parent472d8eebbe742c64587e36ec64ebe636d7ec6bf5 (diff)
downloadgtk+-5b508ea94a8a29d5a1cc515a7fc8251b17442b34.tar.gz
Revert "gl: Speed up icon cache lookups"
This reverts commit dd5ee87b5b65fff51e671ed092e18a524de78379.
-rw-r--r--gsk/gl/gskgliconcache.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/gsk/gl/gskgliconcache.c b/gsk/gl/gskgliconcache.c
index b23325ff5c..2f339eaccb 100644
--- a/gsk/gl/gskgliconcache.c
+++ b/gsk/gl/gskgliconcache.c
@@ -10,10 +10,7 @@
static void
icon_data_free (gpointer p)
{
- IconData *icon_data = p;
-
- gdk_texture_clear_render_data (icon_data->source_texture);
- g_object_unref (icon_data->source_texture);
+ g_object_unref (((IconData *)p)->source_texture);
g_free (p);
}
@@ -99,7 +96,7 @@ gsk_gl_icon_cache_begin_frame (GskGLIconCache *self,
gsk_gl_texture_atlas_mark_unused (icon_data->atlas, width + 2, height + 2);
icon_data->used = FALSE;
}
- }
+ }
icon_data->accessed = FALSE;
}
@@ -113,12 +110,7 @@ gsk_gl_icon_cache_lookup_or_add (GskGLIconCache *self,
GdkTexture *texture,
const IconData **out_icon_data)
{
- IconData *icon_data;
-
- icon_data = gdk_texture_get_render_data (texture, self);
-
- if (!icon_data)
- icon_data = g_hash_table_lookup (self->icons, texture);
+ IconData *icon_data = g_hash_table_lookup (self->icons, texture);
if (icon_data)
{
@@ -234,8 +226,6 @@ gsk_gl_icon_cache_lookup_or_add (GskGLIconCache *self,
gdk_gl_context_pop_debug_group (gdk_gl_context_get_current ());
- gdk_texture_set_render_data (texture, self, icon_data, NULL);
-
*out_icon_data = icon_data;
cairo_surface_destroy (surface);