mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
gl: Avoid pointless iteration
This commit is contained in:
parent
dd316c8051
commit
472d8eebbe
@ -554,21 +554,12 @@ gsk_gl_driver_get_texture_for_pointer (GskGLDriver *self,
|
||||
|
||||
if (id != 0)
|
||||
{
|
||||
GHashTableIter iter;
|
||||
gpointer value_p;
|
||||
/* Find the texture in self->textures and mark it used */
|
||||
Texture *t;
|
||||
|
||||
g_hash_table_iter_init (&iter, self->textures);
|
||||
while (g_hash_table_iter_next (&iter, NULL, &value_p))
|
||||
{
|
||||
Texture *t = value_p;
|
||||
t = g_hash_table_lookup (self->textures, GINT_TO_POINTER (id));
|
||||
|
||||
if (t->texture_id == id)
|
||||
{
|
||||
t->in_use = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (t != NULL)
|
||||
t->in_use = TRUE;
|
||||
}
|
||||
|
||||
return id;
|
||||
|
Loading…
Reference in New Issue
Block a user