mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gsk: Avoid reuploading textures too much
When filtering changes for an already-cached texture, we need to clear the render data before setting the new one, otherwise it does not take and we end up reuploading the texture every frame.
This commit is contained in:
parent
f96d041246
commit
8aa095c4d7
@ -777,6 +777,8 @@ gsk_gl_driver_load_texture (GskGLDriver *self,
|
||||
|
||||
g_hash_table_insert (self->textures, GUINT_TO_POINTER (texture_id), t);
|
||||
|
||||
gdk_texture_clear_render_data (texture);
|
||||
|
||||
if (gdk_texture_set_render_data (texture, self, t, gsk_gl_texture_destroyed))
|
||||
t->user = texture;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user