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:
Matthias Clasen 2023-03-17 22:28:27 -04:00
parent f96d041246
commit 8aa095c4d7

View File

@ -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;