forked from AuroraMiddleware/gtk
gl renderer: Mark pointer textures as used
Otherwise we remove them, causing additional texture uploads.
This commit is contained in:
parent
3a3b325f8e
commit
eeed55d45c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user