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)
|
if (id != 0)
|
||||||
{
|
{
|
||||||
GHashTableIter iter;
|
Texture *t;
|
||||||
gpointer value_p;
|
|
||||||
/* Find the texture in self->textures and mark it used */
|
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, self->textures);
|
t = g_hash_table_lookup (self->textures, GINT_TO_POINTER (id));
|
||||||
while (g_hash_table_iter_next (&iter, NULL, &value_p))
|
|
||||||
{
|
|
||||||
Texture *t = value_p;
|
|
||||||
|
|
||||||
if (t->texture_id == id)
|
if (t != NULL)
|
||||||
{
|
t->in_use = TRUE;
|
||||||
t->in_use = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
Loading…
Reference in New Issue
Block a user