mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 08:20:36 +00:00
gpu: Do a GC run after every tile of large images
When we draw large images, we absolutely do not want to keep memory that we do not need. So do a GC run after every tile. That otentially slows down things, but it also improves the chances of not running out of memory. Here's the node for the image I managed to create after I applied this patch: repeat { bounds: 0 0 50000 50000; child: text { font: "Noto Color Emoji 10000px"; glyphs: 661 0 0 0 color; offset: 0 10000; hint-style: none; } }
This commit is contained in:
parent
0516dca116
commit
d0f8ef09a0
@ -326,6 +326,9 @@ gsk_gpu_renderer_fallback_render_texture (GskGpuRenderer *self,
|
||||
gdk_texture_downloader_finish (&downloader);
|
||||
g_object_unref (texture);
|
||||
g_clear_object (&image);
|
||||
|
||||
/* Let's GC like a madman, we draw oversized stuff and don't want to OOM */
|
||||
gsk_gpu_device_maybe_gc (priv->device);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user