gl renderer: Mark pointer textures as used

Otherwise we remove them, causing additional texture uploads.
This commit is contained in:
Timm Bäder 2019-03-05 09:00:55 +01:00
parent 3a3b325f8e
commit eeed55d45c

View File

@ -547,6 +547,25 @@ gsk_gl_driver_get_texture_for_pointer (GskGLDriver *self,
id = GPOINTER_TO_INT (g_hash_table_lookup (self->pointer_textures, pointer));
if (id != 0)
{
GHashTableIter iter;
gpointer value_p;
/* Find the texture in self->textures and mark it used */
g_hash_table_iter_init (&iter, self->textures);
while (g_hash_table_iter_next (&iter, NULL, &value_p))
{
Texture *t = value_p;
if (t->texture_id == id)
{
t->in_use = TRUE;
break;
}
}
}
return id;
}